Exemple #1
0
        private bool IsModuleOrRequestedTheme(ShapeAlteration alteration, string themeName)
        {
            if (alteration == null ||
                alteration.Feature == null ||
                alteration.Feature.Descriptor == null ||
                alteration.Feature.Descriptor.Extension == null)
            {
                return(false);
            }

            var extensionType = alteration.Feature.Descriptor.Extension.ExtensionType;

            if (DefaultExtensionTypes.IsModule(extensionType))
            {
                return(true);
            }

            if (!DefaultExtensionTypes.IsTheme(extensionType))
            {
                return(false);
            }
            //从主题的改变必须是从给定的主题或一个基本主题
            var featureName = alteration.Feature.Descriptor.Id;

            return(String.IsNullOrEmpty(featureName) || featureName == themeName || IsBaseTheme(featureName, themeName));
        }
 private static int GetPriority(ShapeAlteration shapeAlteration)
 {
     return shapeAlteration.Feature.Descriptor.Priority;
 }
        private bool IsModuleOrRequestedTheme(ShapeAlteration alteration, string themeName)
        {
            if (alteration == null ||
                alteration.Feature == null ||
                alteration.Feature.Descriptor == null ||
                alteration.Feature.Descriptor.Extension == null)
            {
                return false;
            }

            var extensionType = alteration.Feature.Descriptor.Extension.ExtensionType;
            if (DefaultExtensionTypes.IsModule(extensionType))
            {
                return true;
            }

            if (!DefaultExtensionTypes.IsTheme(extensionType))
                return false;
            //从主题的改变必须是从给定的主题或一个基本主题
            var featureName = alteration.Feature.Descriptor.Id;
            return String.IsNullOrEmpty(featureName) || featureName == themeName || IsBaseTheme(featureName, themeName);
        }
 private static bool AlterationHasDependency(ShapeAlteration item, ShapeAlteration subject)
 {
     return HasDependency(item.Feature.Descriptor, subject.Feature.Descriptor);
 }
Exemple #5
0
 private static bool AlterationHasDependency(ShapeAlteration item, ShapeAlteration subject)
 {
     return(HasDependency(item.Feature.Descriptor, subject.Feature.Descriptor));
 }
Exemple #6
0
 private static int GetPriority(ShapeAlteration shapeAlteration)
 {
     return(shapeAlteration.Feature.Descriptor.Priority);
 }