예제 #1
0
 public static ICustomTypeDescriptor GetCustomTypeDescriptor(Type t, object instance)
 {
     if (instance is ICustomTypeDescriptor ictd)
     {
         return(ictd);
     }
     else
     {
         ICustomTypeDescriptor result = new MyTypeDescriptionProvider(t).GetTypeDescriptor(t, instance);
         return(result);
     }
 }
예제 #2
0
        public static ICustomTypeDescriptor GetCustomTypeDescriptor(Type t)
        {
            ICustomTypeDescriptor result = new MyTypeDescriptionProvider(t).GetTypeDescriptor(t);

            return(result);
        }