了解标识方法的 C# 文档

问题描述 投票:0回答:0

我正在使用 Microsoft.AspNetCore.Identity 编写教程并编写了这行代码:

services.AddIdentity<ApplicationUser, ApplicationRole>().AddEntityFrameworkStores<ApplicationDbContext>().AddUserStore<UserStore<ApplicationUser, ApplicationRole, ApplicationDbContext, Guid>>().AddRoleStore<RoleStore<ApplicationRole, ApplicationDbContext, Guid>>();

我不明白的是如何阅读有关通用方法的文档,例如

AddRoleStore<>

如果我去微软的网站,我会从 Intellisense 获得相同的信息: Screenshot of Website

话虽如此,如果您查看代码,相同的方法最多可以接收 3 个“嵌套”泛型类型?

.AddRoleStore<RoleStore<ApplicationRole, ApplicationDbContext, Guid>>();
网站只说1个!

public virtual Microsoft.AspNetCore.Identity.IdentityBuilder AddRoleStore<TStore> () where TStore : class;

也许我只是不知道如何阅读文档因为也许答案是this

如果不询问别人或寻求教程,我仍然无法弄清楚如何理解文档

谢谢!

c# .net documentation identity
© www.soinside.com 2019 - 2024. All rights reserved.