Exemple #1
0
 private void Init()
 {
     Versions                  = new ContentClassVersions(this, Caching.Enabled);
     PreassignedKeywords       = new PreassignedKeywords(this, Caching.Enabled);
     PageDefinitions           = new PageDefinitions(this, Caching.Enabled);
     TemplateVariants          = new TemplateVariants(this, Caching.Enabled);
     Elements                  = new ContentClassElements(this, Caching.Enabled);
     ProjectVariantAssignments = new ProjectVariantAssignments(this, Caching.Enabled);
     EditableAreaSettings      = new CCEditableAreaSettings(this);
 }
Exemple #2
0
        private void CopyProjectVariantAssignmentToCC(ContentClass targetCC)
        {
            var x =
                //ProjectVariantAssignments.ToLookup(x=>targetCC.TemplateVariants.GetByName(x.TemplateVariant.Name),
                //x=>targetCC.Project.ProjectVariants.GetByName(x.ProjectVariant.Name));

                ProjectVariantAssignments.ToLookup(
                    assignment => targetCC.TemplateVariants[assignment.TemplateVariant.Name],
                    assignment => new ProjectVariantAssignmentSettings()
            {
                ProjectVariant = targetCC.Project.ProjectVariants[assignment.ProjectVariant.Name], IsPublishing = assignment.IsPublishing, IsNotUsingTidy = assignment.IsNotUsingTidy, TemplateVariant = targetCC.TemplateVariants[assignment.TemplateVariant.Name]
            });

            targetCC.ProjectVariantAssignments.Assign(x);
        }