private static Type GetDelegateType(InterceptionType interceptionType) { Type type = null; switch (interceptionType) { case InterceptionType.OnEntry: { type = typeof(OnEntry); break; } case InterceptionType.OnExit: { type = typeof(OnExit); break; } case InterceptionType.OnSuccess: { type = typeof(OnSuccess); break; } case InterceptionType.OnException: { type = typeof(OnException); break; } case InterceptionType.OnLogException: { type = typeof(OnLogException); break; } } return(type); }
public Interception(System.Type targetType, string targetMethodName, InterceptionType type) { TargetType = targetType; TargetMethodName = targetMethodName; Type = type; }
public static object GetHandle(string typeName, string targetMethodName, InterceptionType handleType) { string str = string.Format("{0}${1}${2}", typeName, targetMethodName, handleType.ToString()); return(DelegateContainer.eventHandles[str]); }
public static void AddHandle(string typeName, string targetMethodName, InterceptionType handleType, object handle) { string str = string.Format("{0}${1}${2}", typeName, targetMethodName, handleType.ToString()); DelegateContainer.eventHandles[str] = handle; }