OqtaneIgnore implementation to theme elements
This commit is contained in:
		| @ -195,7 +195,7 @@ namespace Oqtane.Repository | ||||
|                 if (modulecontroltype.Name == "ModuleBase" | ||||
|                     || modulecontroltype.IsGenericType | ||||
|                     || modulecontroltype.IsAbstract | ||||
|                     || Attribute.IsDefined(modulecontroltype, typeof(OqtaneIgnoreAttribute)) | ||||
|                     || modulecontroltype.IsOqtaneIgnore() | ||||
|                 ) continue; | ||||
|  | ||||
|                 string moduleNamespace = modulecontroltype.Namespace; | ||||
|  | ||||
| @ -50,7 +50,7 @@ namespace Oqtane.Repository | ||||
|                 // Check if type should be ignored | ||||
|                 if (themeControlType.Name == "ThemeBase" | ||||
|                     || themeControlType.IsGenericType | ||||
|                     || Attribute.IsDefined(themeControlType, typeof(OqtaneIgnoreAttribute)) | ||||
|                     || themeControlType.IsOqtaneIgnore() | ||||
|                 ) continue; | ||||
|  | ||||
|                 string themeNamespace = themeControlType.Namespace; | ||||
| @ -62,6 +62,7 @@ namespace Oqtane.Repository | ||||
|                 // Find all types in the assembly which have the same namespace-root as the theme file | ||||
|                 // Check with "." in the end to  | ||||
|                 List<Type> typesInTheme = assembly.GetTypes() | ||||
|                     .Where(item=>!item.IsOqtaneIgnore())  | ||||
|                     .Where(item => item.Namespace != null) | ||||
|                     // Namespace must be the same or start with "xxx." to ensure that | ||||
|                     // similar namespaces like "MyTheme" and "MyTheme2" don't match in StartsWith(...) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Pavel Vesely
					Pavel Vesely