示例#1
0
 protected override void Implementation(Action <Context, CancellationToken> action, Context context, CancellationToken cancellationToken)
 => PolicyWrapEngine.Implementation(
     action,
     context,
     cancellationToken,
     _outer,
     _inner
     );
示例#2
0
 protected override TResult Implementation <TResult>(Func <Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)
 => PolicyWrapEngine.Implementation <TResult>(
     action,
     context,
     cancellationToken,
     _outer,
     _inner
     );
示例#3
0
 /// <summary>
 /// Executes the specified action within the cache policy and returns the result.
 /// </summary>
 /// <typeparam name="TResult">The type of the result.</typeparam>
 /// <param name="action">The action to perform.</param>
 /// <param name="context">Execution context that is passed to the exception policy; defines the cache key to use in cache lookup.</param>
 /// <param name="cancellationToken">The cancellation token.</param>
 /// <returns>The value returned by the action, or the cache.</returns>
 public override TResult Execute <TResult>(Func <Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)
 {
     return(PolicyWrapEngine.Implementation <TResult>(
                action,
                context,
                cancellationToken,
                _outer,
                _inner
                ));
 }
示例#4
0
 internal override TResult ExecuteInternal <TResult>(Func <Context, CancellationToken, TResult> action, Context context, CancellationToken cancellationToken)
 {
     return(PolicyWrapEngine.Implementation <TResult>(
                action,
                context,
                cancellationToken,
                (ISyncPolicy)_outer,
                (ISyncPolicy)_inner
                ));
 }