示例#1
0
 private static string GetAccessorKeyword(IMethodDefinition method)
 {
     switch (method.GetAccessorType())
     {
         case AccessorType.EventAdder:
             return "add";
         case AccessorType.EventRemover:
             return "remove";
         case AccessorType.PropertySetter:
             return "set";
         case AccessorType.PropertyGetter:
             return "get";
         default:
             throw new ArgumentOutOfRangeException();
     }
 }
        private static string GetAccessorKeyword(IMethodDefinition method)
        {
            switch (method.GetAccessorType())
            {
            case AccessorType.EventAdder:
                return("add");

            case AccessorType.EventRemover:
                return("remove");

            case AccessorType.PropertySetter:
                return("set");

            case AccessorType.PropertyGetter:
                return("get");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#3
0
 public static bool IsPropertyOrEventAccessor(this IMethodDefinition method)
 {
     return(method.GetAccessorType() != AccessorType.None);
 }