Exemplo n.º 1
0
 public static void Init()
 {
     ActionTargets.lookup.Clear();
     using (List <Type> .Enumerator enumerator = Actions.List.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             Type current = enumerator.get_Current();
             IEnumerable <Attribute> attributes = CustomAttributeHelpers.GetAttributes(current, typeof(ActionTarget));
             using (IEnumerator <Attribute> enumerator2 = attributes.GetEnumerator())
             {
                 while (enumerator2.MoveNext())
                 {
                     Attribute current2 = enumerator2.get_Current();
                     ActionTargets.AddActionTarget(current, (ActionTarget)current2);
                 }
             }
         }
     }
     using (List <Type> .Enumerator enumerator3 = Actions.List.GetEnumerator())
     {
         while (enumerator3.MoveNext())
         {
             Type current3 = enumerator3.get_Current();
             if (!ActionTargets.HasNoActionTargetsAttribute(current3) && !ActionTargets.HasActionTargets(current3))
             {
                 ActionTargets.GenerateActionTargets(current3);
             }
         }
     }
 }