C# Класс Patterns.Interception.DelegateInterceptor

Provides an interceptor that allows its interception logic to be injected; no-op fall-backs are used when no logic has been specified for an interception step.
Наследование: IInterceptor
Показать файл Открыть проект

Открытые методы

Метод Описание
DelegateInterceptor ( Action after = null, Action before = null, bool>.Func condition = null, Action @finally = null, Func onError = null, Action proceed = null ) : System

Initializes a new instance of the DelegateInterceptor class.

Intercept ( IInvocation invocation ) : void

Intercepts the specified invocation.

Приватные методы

Метод Описание
Initialize ( Action after, Action before, bool>.Func condition, Action @finally, Func onError, Action proceed ) : void

Описание методов

DelegateInterceptor() публичный Метод

Initializes a new instance of the DelegateInterceptor class.
public DelegateInterceptor ( Action after = null, Action before = null, bool>.Func condition = null, Action @finally = null, Func onError = null, Action proceed = null ) : System
after Action /// The action to execute after proceeding. This action will not run /// if the invocation throws an exception. ///
before Action The action to execute before proceeding.
condition bool>.Func /// The interception condition. If this condition returns false, /// the invocation proceeds with no further interception. ///
@finally Action
onError Func The function to execute when an error occurs.
proceed Action The action to execute. Only set this if proceeding as normal is not desired.
Результат System

Intercept() публичный Метод

Intercepts the specified invocation.
public Intercept ( IInvocation invocation ) : void
invocation IInvocation The invocation.
Результат void