コード例 #1
0
ファイル: AssemblyHelper.cs プロジェクト: vogelb/ambeth
 public static void HandleTypesFromCurrentDomainWithAnnotation <T>(TypeHandleDelegate typeHandleDelegate) where T : Attribute
 {
     foreach (Type type in typesFromCurrentDomain)
     {
         if (!AnnotationUtil.IsAnnotationPresent <T>(type, true))
         {
             continue;
         }
         typeHandleDelegate(type);
     }
 }
コード例 #2
0
ファイル: AssemblyHelper.cs プロジェクト: vogelb/ambeth
        public static void HandleTypesFromCurrentDomain <T>(TypeHandleDelegate typeHandleDelegate, bool includeInterfaces) where T : class
        {
            Type lookForType = typeof(T);

            foreach (Type type in typesFromCurrentDomain)
            {
                if (!lookForType.IsAssignableFrom(type))
                {
                    continue;
                }
                if (!includeInterfaces && type.IsInterface)
                {
                    continue;
                }
                typeHandleDelegate(type);
            }
        }
コード例 #3
0
ファイル: AssemblyHelper.cs プロジェクト: vogelb/ambeth
 public static void HandleTypesFromCurrentDomain <T>(TypeHandleDelegate typeHandleDelegate) where T : class
 {
     HandleTypesFromCurrentDomain <T>(typeHandleDelegate, false);
 }