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
파일 보기 프로젝트 열기: patterns-group/code-patterns

공개 메소드들

메소드 설명
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