Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public Interception(System.Type targetType, string targetMethodName, InterceptionType type)
 {
     TargetType       = targetType;
     TargetMethodName = targetMethodName;
     Type             = type;
 }
Esempio n. 3
0
        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]);
        }
Esempio n. 4
0
        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;
        }