Exemplo n.º 1
0
 static void AddRequestBuilderBlock(string action, RequestBuilderBlock blk)
 {
     if (!_lstPipelineBuilders.TryGetValue(action, out List <RequestBuilderBlock> lst))
     {
         lst = new List <RequestBuilderBlock>();
         _lstPipelineBuilders.Add(action, lst);
     }
     lst.Add(blk);
 }
Exemplo n.º 2
0
 public static void ProcessRequestBuilderClass(Type t)
 {
     MethodInfo[] amInfo = t.GetMethods();
     foreach (MethodInfo mInfo in amInfo)
     {
         //only pick static methods.
         if (mInfo.IsStatic)
         {
             IEnumerable <PipleineBuilderAttribute> lst = mInfo.GetCustomAttributes <PipleineBuilderAttribute>();
             if (lst == null)
             {
                 continue;
             }
             foreach (PipleineBuilderAttribute att in lst)
             {
                 RequestBuilderBlock blk = new RequestBuilderBlock(t, mInfo, att.order);
                 AddRequestBuilderBlock(att._action, blk);
             }
         }
     }
 }