Class ParameterValidator<TInterface>
Validates parameters on interface methods
Inheritance
InterfaceInterceptor<TInterface>
AspectInterceptor<TInterface>
ParameterValidator<TInterface>
Implements
IProxyAccess<TInterface>
Inherited Members
Namespace: Solti.Utils.Rpc.Aspects
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class ParameterValidator<TInterface> : AspectInterceptor<TInterface>, IHasTarget<TInterface>, IProxyAccess<TInterface> where TInterface : class
Type Parameters
Name | Description |
---|---|
TInterface |
Constructors
ParameterValidator(TInterface, IInjector)
Creates a new ParameterValidator<TInterface> instance.
Declaration
[ServiceActivator]
public ParameterValidator(TInterface target, IInjector currentScope)
Parameters
Type | Name | Description |
---|---|---|
TInterface | target | |
Solti.Utils.DI.Interfaces.IInjector | currentScope |
ParameterValidator(TInterface, IInjector, Boolean)
Creates a new ParameterValidator<TInterface> instance.
Declaration
public ParameterValidator(TInterface target, IInjector currentScope, bool aggregate)
Parameters
Type | Name | Description |
---|---|---|
TInterface | target | |
Solti.Utils.DI.Interfaces.IInjector | currentScope | |
Boolean | aggregate |
Properties
Aggregate
Returns true if the validator should collect all the validation errors.
Declaration
public bool Aggregate { get; }
Property Value
Type | Description |
---|---|
Boolean |
CurrentScope
The current scope.
Declaration
public IInjector CurrentScope { get; }
Property Value
Type | Description |
---|---|
Solti.Utils.DI.Interfaces.IInjector |
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>)