示例#1
0
 private void SetAssamblyInitialization()
 {
     AssamblyList.ToList().ForEach(
         a =>
     {
         InitializationAttribute attribute =
             (InitializationAttribute)Attribute.GetCustomAttribute(a.Value, typeof(InitializationAttribute));
         if (attribute != null)
         {
             AssamblyInitialization.Add(a.Key, attribute);
         }
     }
         );
 }
示例#2
0
 private void RegistIoc()
 {
     AssamblyList.ToList().ForEach(
         a =>
     {
         Assembly list = AssamblyList[a.Key];
         var types     = list.GetTypes();
         foreach (var t in types)
         {
             // Type baseType = t.BaseType;
             var code = Attribute.GetCustomAttribute(t, typeof(CodePlugAttribute)) as CodePlugAttribute;
             if (code != null)
             {
                 // AtawIocContext.Current.PlugInModelList[];
                 AtawIocContext.Current.RegisterPlugIn(t, code);
             }
         }
     }
         );
 }