예제 #1
0
 public void BuildUp(IAttributeBuilder builder)
 {
     ((DirectorAttribute[])builder.GetType().GetCustomAttributes(typeof(DirectorAttribute), false))
     .OrderByDescending(x => x.Priority)
     .ToList <DirectorAttribute>()
     .ForEach(x => InvokeBuilderPartMethod(builder, x));
 }
예제 #2
0
 public void BuilUp(IAttributeBuilder builder)
 {
     object[] attributes = builder.GetType().GetCustomAttributes(typeof(DirectorAttribute), false);
     if (attributes.Length <= 0)
     {
         return;
     }
     DirectorAttribute[] directors = new DirectorAttribute[attributes.Length];
     for (int i = 0; i < attributes.Length; i++)
     {
         directors[i] = attributes[i] as DirectorAttribute;
         Array.Sort <DirectorAttribute>(directors);
         foreach (var item in directors)
         {
             InvokeBuildPartMethod(builder, item);
         }
     }
 }