2 interfaces inheriting from IRoleStore
Microsoft.Extensions.Identity.Core (2)
IQueryableRoleStore.cs (1)
12public interface IQueryableRoleStore<TRole> : IRoleStore<TRole> where TRole : class
IRoleClaimStore.cs (1)
15public interface IRoleClaimStore<TRole> : IRoleStore<TRole> where TRole : class
3 implementations of IRoleStore
Microsoft.AspNetCore.Identity.Test (3)
IdentityBuilderTest.cs (1)
271private class MyUberThingy : IUserValidator<PocoUser>, IPasswordValidator<PocoUser>, IRoleValidator<PocoRole>, IUserStore<PocoUser>, IRoleStore<PocoRole>
NoopRoleStore.cs (1)
6public class NoopRoleStore : IRoleStore<PocoRole>
RoleManagerTest.cs (1)
151private class NotImplementedStore : IRoleStore<PocoRole>
41 references to IRoleStore
Microsoft.AspNetCore.Identity (1)
AspNetRoleManager.cs (1)
26public AspNetRoleManager(IRoleStore<TRole> store,
Microsoft.AspNetCore.Identity.EntityFrameworkCore (1)
IdentityEntityFrameworkBuilderExtensions.cs (1)
71services.TryAddScoped(typeof(IRoleStore<>).MakeGenericType(roleType), roleStoreType);
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (8)
SqlStoreTestBase.cs (1)
114services.AddSingleton<IRoleStore<TRole>>(new RoleStore<TRole, TestDbContext, TKey>((TestDbContext)context));
src\Identity\test\Shared\MockHelpers.cs (4)
24public static Mock<RoleManager<TRole>> MockRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 26store = store ?? new Mock<IRoleStore<TRole>>().Object; 54public static RoleManager<TRole> TestRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 56store = store ?? new Mock<IRoleStore<TRole>>().Object;
UserStoreGuidKeyTest.cs (1)
51services.AddSingleton<IRoleStore<GuidRole>>(new ApplicationRoleStore((TestDbContext)context));
UserStoreTest.cs (1)
60services.AddSingleton<IRoleStore<IdentityRole>>(new RoleStore<IdentityRole, IdentityDbContext>((IdentityDbContext)context));
UserStoreWithGenericsTest.cs (1)
41services.AddSingleton<IRoleStore<MyIdentityRole>>(new RoleStoreWithGenerics((ContextWithGenerics)context, "TestContext"));
Microsoft.AspNetCore.Identity.InMemory.Test (10)
ControllerTest.cs (2)
38services.AddSingleton<IRoleStore<PocoRole>, InMemoryStore<PocoUser, PocoRole>>(); 89services.AddSingleton<IRoleStore<PocoRole>, InMemoryStore<PocoUser, PocoRole>>();
FunctionalTest.cs (1)
393services.AddSingleton<IRoleStore<PocoRole>>(store);
InMemoryStore.cs (2)
110Task<TRole> IRoleStore<TRole>.FindByIdAsync(string roleId, CancellationToken cancellationToken) 119Task<TRole> IRoleStore<TRole>.FindByNameAsync(string roleName, CancellationToken cancellationToken)
InMemoryStoreTest.cs (1)
25services.AddSingleton<IRoleStore<PocoRole>>((InMemoryStore<PocoUser, PocoRole>)context);
src\Identity\test\Shared\MockHelpers.cs (4)
24public static Mock<RoleManager<TRole>> MockRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 26store = store ?? new Mock<IRoleStore<TRole>>().Object; 54public static RoleManager<TRole> TestRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 56store = store ?? new Mock<IRoleStore<TRole>>().Object;
Microsoft.AspNetCore.Identity.Test (17)
IdentityBuilderTest.cs (6)
23Assert.IsType<NoopRoleStore>(sp.GetRequiredService<IRoleStore<PocoRole>>()); 49Assert.Null(sp.GetService<IRoleStore<PocoRole>>()); 69var thingy = services.BuildServiceProvider().GetRequiredService<IRoleStore<PocoRole>>() as MyUberThingy; 383Task<PocoRole> IRoleStore<PocoRole>.FindByIdAsync(string roleId, CancellationToken cancellationToken) 388Task<PocoRole> IRoleStore<PocoRole>.FindByNameAsync(string roleName, CancellationToken cancellationToken) 413public MyRoleManager(IRoleStore<PocoRole> store,
RoleManagerTest.cs (6)
15var store = new Mock<IRoleStore<PocoRole>>(); 35var store = new Mock<IRoleStore<PocoRole>>(); 63var store = new Mock<IRoleStore<PocoRole>>(); 80var store = new Mock<IRoleStore<PocoRole>>(); 99var store = new Mock<IRoleStore<PocoRole>>(); 146private static RoleManager<PocoRole> CreateRoleManager(IRoleStore<PocoRole> roleStore)
src\Identity\test\Shared\MockHelpers.cs (4)
24public static Mock<RoleManager<TRole>> MockRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 26store = store ?? new Mock<IRoleStore<TRole>>().Object; 54public static RoleManager<TRole> TestRoleManager<TRole>(IRoleStore<TRole> store = null) where TRole : class 56store = store ?? new Mock<IRoleStore<TRole>>().Object;
UserManagerTest.cs (1)
58public CustomRoleManager() : base(new Mock<IRoleStore<PocoRole>>().Object, null, null, null, null)
Microsoft.Extensions.Identity.Core (4)
IdentityBuilder.cs (2)
236/// Adds a <see cref="IRoleStore{TRole}"/> for the <see cref="RoleType"/>. 247return AddScoped(typeof(IRoleStore<>).MakeGenericType(RoleType), typeof(TStore));
RoleManager.cs (2)
38public RoleManager(IRoleStore<TRole> store, 63protected IRoleStore<TRole> Store { get; private set; }