Class RoleValidator<TInterface>
Contains the role validation logic.
Inheritance
InterfaceInterceptor<TInterface>
AspectInterceptor<TInterface>
RoleValidator<TInterface>
Implements
IProxyAccess<TInterface>
Inherited Members
Namespace: Solti.Utils.Rpc.Aspects
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class RoleValidator<TInterface> : AspectInterceptor<TInterface>, IHasTarget<TInterface>, IProxyAccess<TInterface> where TInterface : class
Type Parameters
Name | Description |
---|---|
TInterface |
Remarks
In order to use this interceptor you have to implement and register the IRoleManager service.
Constructors
RoleValidator(TInterface, IRpcRequestContext, IRoleManager)
Creates a new RoleValidator<TInterface> instance.
Declaration
public RoleValidator(TInterface target, IRpcRequestContext requestContext, IRoleManager roleManager)
Parameters
Type | Name | Description |
---|---|---|
TInterface | target | |
IRpcRequestContext | requestContext | |
IRoleManager | roleManager |
Methods
Decorator(InvocationContext, Func<Object>)
The decorator function.
Declaration
protected override object Decorator(InvocationContext context, Func<object> callNext)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context | |
Func<Object> | callNext |
Returns
Type | Description |
---|---|
Object |
Overrides
Solti.Utils.Rpc.Internals.AspectInterceptor<TInterface>.Decorator(Solti.Utils.Proxy.InvocationContext, System.Func<System.Object>)
DecoratorAsync(InvocationContext, Func<Task>)
The decorator function.
Declaration
protected override async Task<Task> DecoratorAsync(InvocationContext context, Func<Task> callNext)
Parameters
Type | Name | Description |
---|---|---|
InvocationContext | context | |
Func<Task> | callNext |
Returns
Type | Description |
---|---|
Task<Task> |
Overrides
Solti.Utils.Rpc.Internals.AspectInterceptor<TInterface>.DecoratorAsync(Solti.Utils.Proxy.InvocationContext, System.Func<System.Threading.Tasks.Task>)