Class OpenIddictServerHandlerDescriptor.Builder<TContext>
Contains methods allowing to build a descriptor instance.
Inheritance
Inherited Members
Namespace: OpenIddict.Server
Assembly: cs.temp.dll.dll
Syntax
public class Builder<TContext>
where TContext : OpenIddictValidationEvents.BaseContext
Type Parameters
Name | Description |
---|---|
TContext | The event context type. |
Methods
AddFilter(Type)
Adds the type of a handler filter to the filters list.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> AddFilter(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The event handler filter type. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
AddFilter<TFilter>()
Adds the type of a handler filter to the filters list.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> AddFilter<TFilter>()
where TFilter : IOpenIddictServerHandlerFilter<TContext>
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
TFilter | The event handler filter type. |
Build()
Build a new descriptor instance, based on the parameters that were previously set.
Declaration
public OpenIddictServerHandlerDescriptor Build()
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor | The builder instance, so that calls can be easily chained. |
Import(OpenIddictServerHandlerDescriptor)
Imports the properties set on the specified descriptor.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> Import(OpenIddictServerHandlerDescriptor descriptor)
Parameters
Type | Name | Description |
---|---|---|
OpenIddictServerHandlerDescriptor | descriptor | The existing descriptor properties are copied from. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Remarks
All the properties previously set on this instance are automatically replaced.
SetOrder(Int32)
Sets the order in which the event handler will be invoked.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> SetOrder(int order)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | order | The handler order. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
SetServiceDescriptor(ServiceDescriptor)
Sets the service descriptor.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> SetServiceDescriptor(ServiceDescriptor descriptor)
Parameters
Type | Name | Description |
---|---|---|
ServiceDescriptor | descriptor | The service descriptor. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
SetType(OpenIddictServerHandlerType)
Sets the type associated to the handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> SetType(OpenIddictServerHandlerType type)
Parameters
Type | Name | Description |
---|---|---|
OpenIddictServerHandlerType | type | The handler type. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
UseInlineHandler(Func<TContext, ValueTask>)
Configures the descriptor to use the specified inline handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseInlineHandler(Func<TContext, ValueTask> handler)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TContext, System.Threading.Tasks.ValueTask> | handler | The handler instance. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
UseScopedHandler<THandler>()
Configures the descriptor to use the specified scoped handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseScopedHandler<THandler>()
where THandler : IOpenIddictServerHandler<TContext>
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
THandler | The handler type. |
UseScopedHandler<THandler>(Func<IServiceProvider, Object>)
Configures the descriptor to use the specified scoped handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseScopedHandler<THandler>(Func<IServiceProvider, object> factory)
where THandler : IOpenIddictServerHandler<TContext>
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.IServiceProvider, System.Object> | factory | The factory used to create the handler. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
THandler | The handler type. |
UseSingletonHandler<THandler>()
Configures the descriptor to use the specified singleton handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseSingletonHandler<THandler>()
where THandler : IOpenIddictServerHandler<TContext>
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
THandler | The handler type. |
UseSingletonHandler<THandler>(THandler)
Configures the descriptor to use the specified singleton handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseSingletonHandler<THandler>(THandler handler)
where THandler : IOpenIddictServerHandler<TContext>
Parameters
Type | Name | Description |
---|---|---|
THandler | handler | The handler instance. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
THandler | The handler type. |
UseSingletonHandler<THandler>(Func<IServiceProvider, Object>)
Configures the descriptor to use the specified singleton handler.
Declaration
public OpenIddictServerHandlerDescriptor.Builder<TContext> UseSingletonHandler<THandler>(Func<IServiceProvider, object> factory)
where THandler : IOpenIddictServerHandler<TContext>
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.IServiceProvider, System.Object> | factory | The factory used to create the handler. |
Returns
Type | Description |
---|---|
OpenIddictServerHandlerDescriptor.Builder<TContext> | The builder instance, so that calls can be easily chained. |
Type Parameters
Name | Description |
---|---|
THandler | The handler type. |