Class DeadlineInvokerBuilderExtensions
- Namespace
- IceRpc.Extensions.DependencyInjection
- Assembly
- IceRpc.Deadline.dll
Provides extension methods for IInvokerBuilder to add the deadline interceptor.
public static class DeadlineInvokerBuilderExtensions
- Inheritance
-
DeadlineInvokerBuilderExtensions
- Inherited Members
Methods
UseDeadline(IInvokerBuilder)
Adds a DeadlineInterceptor with an infinite default timeout to this invoker builder. This interceptor enforces the deadlines it receives and does not create new deadlines.
public static IInvokerBuilder UseDeadline(this IInvokerBuilder builder)
Parameters
builder
IInvokerBuilderThe builder being configured.
Returns
- IInvokerBuilder
The builder being configured.
UseDeadline(IInvokerBuilder, TimeSpan, bool)
Adds a DeadlineInterceptor to this invoker builder.
public static IInvokerBuilder UseDeadline(this IInvokerBuilder builder, TimeSpan defaultTimeout, bool alwaysEnforceDeadline = false)
Parameters
builder
IInvokerBuilderThe builder being configured.
defaultTimeout
TimeSpanThe default timeout. When not infinite, the interceptor adds a deadline to requests without a deadline.
alwaysEnforceDeadline
boolWhen true and the request carries a deadline, the interceptor always creates a cancellation token source to enforce this deadline. When false and the request carries a deadline, the interceptor creates a cancellation token source to enforce this deadline only when the invocation's cancellation token cannot be canceled. The default value is false.
Returns
- IInvokerBuilder
The builder being configured.