Mercurial > pub > bltoolkit
comparison Source/Aspects/Interceptor.cs @ 0:f990fcb411a9
Копия текущей версии из github
| author | cin |
|---|---|
| date | Thu, 27 Mar 2014 21:46:09 +0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:f990fcb411a9 |
|---|---|
| 1 namespace BLToolkit.Aspects | |
| 2 { | |
| 3 [System.Diagnostics.DebuggerStepThrough] | |
| 4 public abstract class Interceptor : IInterceptor | |
| 5 { | |
| 6 public virtual void Init(CallMethodInfo info, string configString) | |
| 7 { | |
| 8 } | |
| 9 | |
| 10 public virtual void Intercept(InterceptCallInfo info) | |
| 11 { | |
| 12 switch (info.InterceptType) | |
| 13 { | |
| 14 case InterceptType.BeforeCall: BeforeCall(info); break; | |
| 15 case InterceptType.AfterCall: AfterCall (info); break; | |
| 16 case InterceptType.OnCatch: OnCatch (info); break; | |
| 17 case InterceptType.OnFinally: OnFinally (info); break; | |
| 18 } | |
| 19 } | |
| 20 | |
| 21 protected virtual void BeforeCall(InterceptCallInfo info) {} | |
| 22 protected virtual void AfterCall (InterceptCallInfo info) {} | |
| 23 protected virtual void OnCatch (InterceptCallInfo info) {} | |
| 24 protected virtual void OnFinally (InterceptCallInfo info) {} | |
| 25 } | |
| 26 } |
