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))
            {
                // alterations from themes must be from the given theme or a base theme
                var featureName = alteration.Feature.Descriptor.Id;
                return(String.IsNullOrEmpty(featureName) || featureName == themeName || IsBaseTheme(featureName, themeName));
            }

            return(false);
        }
 private static int GetPriority(ShapeAlteration shapeAlteration)
 {
     return(shapeAlteration.Feature.Descriptor.Priority);
 }
 private static bool AlterationHasDependency(ShapeAlteration item, ShapeAlteration subject)
 {
     return(ExtensionManager.HasDependency(item.Feature.Descriptor, subject.Feature.Descriptor));
 }
        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)) {
                // alterations from themes must be from the given theme or a base theme
                var featureName = alteration.Feature.Descriptor.Id;
                return String.IsNullOrEmpty(featureName) || featureName == themeName || IsBaseTheme(featureName, themeName);
            }

            return false;
        }
 private static int GetPriority(ShapeAlteration shapeAlteration)
 {
     return shapeAlteration.Feature.Descriptor.Priority;
 }
 private static bool AlterationHasDependency(ShapeAlteration item, ShapeAlteration subject)
 {
     return ExtensionManager.HasDependency(item.Feature.Descriptor, subject.Feature.Descriptor);
 }