コード例 #1
0
ファイル: RecipeMetadataStep.cs プロジェクト: Higea/Orchard
 public override void Configure(RecipeBuilderStepConfigurationContext context) {
     RecipeName = context.ConfigurationElement.Attr("Name");
     RecipeDescription = context.ConfigurationElement.Attr("Description");
     RecipeAuthor = context.ConfigurationElement.Attr("Author");
     RecipeWebsite = context.ConfigurationElement.Attr("Website");
     RecipeTags = context.ConfigurationElement.Attr("Tags");
     RecipeCategory = context.ConfigurationElement.Attr("Category");
     RecipeVersion = context.ConfigurationElement.Attr("Version");
     IsSetupRecipe = context.ConfigurationElement.Attr<bool>("IsSetupRecipe");
 }
コード例 #2
0
ファイル: ContentStep.cs プロジェクト: Higea/Orchard
        public override void Configure(RecipeBuilderStepConfigurationContext context) {
            var schemaContentTypeNames = context.ConfigurationElement.Attr("SchemaContentTypes");
            var dataContentTypeNames = context.ConfigurationElement.Attr("DataContentTypes");
            var versionHistoryOptions = context.ConfigurationElement.Attr<VersionHistoryOptions>("VersionHistoryOptions");

            if (!String.IsNullOrWhiteSpace(schemaContentTypeNames))
                SchemaContentTypes = schemaContentTypeNames.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList();

            if (!String.IsNullOrWhiteSpace(dataContentTypeNames))
                DataContentTypes = dataContentTypeNames.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();

            VersionHistoryOptions = versionHistoryOptions;
        }
コード例 #3
0
ファイル: BuildRecipeAction.cs プロジェクト: yanghl22/Orchard
        public override void Configure(ExportActionConfigurationContext context)
        {
            RecipeBuilderSteps.Clear();

            var recipeBuilderStepsElement = context.ConfigurationElement.Element("Steps");
            if (recipeBuilderStepsElement == null)
                return;

            foreach (var stepElement in recipeBuilderStepsElement.Elements()) {
                var step = _recipeBuilderSteps.SingleOrDefault(x => x.Name == stepElement.Name.LocalName);

                if (step != null) {
                    var stepContext = new RecipeBuilderStepConfigurationContext(stepElement);
                    step.Configure(stepContext);
                    RecipeBuilderSteps.Add(step);
                }
            }
        }
コード例 #4
0
ファイル: RecipeBuilderStep.cs プロジェクト: rodpl/Orchard2
 public virtual void Configure(RecipeBuilderStepConfigurationContext context)
 {
 }
コード例 #5
0
ファイル: FeatureStep.cs プロジェクト: Higea/Orchard
 public override void Configure(RecipeBuilderStepConfigurationContext context) {
     ExportEnabledFeatures = context.ConfigurationElement.Attr<bool>("ExportEnabledFeatures");
     ExportDisabledFeatures = context.ConfigurationElement.Attr<bool>("ExportDisabledFeatures");
 }
コード例 #6
0
ファイル: CustomStepsStep.cs プロジェクト: Higea/Orchard
 public override void Configure(RecipeBuilderStepConfigurationContext context) {
     var steps = (context.ConfigurationElement.Attr("Steps") ?? "").Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
     CustomSteps = steps.ToList();
 }