internal static bool IsEnabled(Type type)
 {
     if (!_viewStateIdTypes.ContainsKey(type))
     {
         ViewStateModeByIdAttribute attribute = (ViewStateModeByIdAttribute)TypeDescriptor.GetAttributes(type)[typeof(ViewStateModeByIdAttribute)];
         _viewStateIdTypes[type] = attribute != null;
     }
     return((bool)_viewStateIdTypes[type]);
 }
Beispiel #2
0
 internal static bool IsEnabled(Type type)
 {
     if (!_viewStateIdTypes.ContainsKey(type))
     {
         System.ComponentModel.AttributeCollection attrs = TypeDescriptor.GetAttributes(type);
         ViewStateModeByIdAttribute attr = (ViewStateModeByIdAttribute)attrs[typeof(ViewStateModeByIdAttribute)];
         _viewStateIdTypes[type] = (attr != null);
     }
     return((bool)_viewStateIdTypes[type]);
 }