private static IEnumerable <PSObject> CreatePreset(XmlNode presetNode) { var presetEntries = PresetFactory.Create(presetNode); return(presetEntries.Select(preset => { var psPreset = PSObject.AsPSObject(preset); psPreset.Properties.Add(new PSNoteProperty("PresetName", presetNode.Name)); return psPreset; })); }
/// <summary> /// Gets the default presets specified in configuration/sitecore/serialization/name /// </summary> public static IList <IncludeEntry> GetPreset(string name) { var config = Factory.GetConfigNode("serialization/" + name); if (config != null) { return(PresetFactory.Create(config)); } return(null); }
/// <summary> /// Initializes a new instance of the <see cref="ConfigurationService"/> class. /// </summary> public ConfigurationService() { var config = Factory.GetConfigNode("packman"); if (config == null) { Log.Info("No include/exclude configuration found. Everything will be included.", this); return; } this.preset = PresetFactory.Create(config); }
public SerializationPresetFilter(string presetName) { Assert.IsNotNullOrEmpty(presetName, "presetName"); var config = Factory.GetConfigNode("serialization/" + presetName); if (config == null) { throw new InvalidOperationException("Preset " + presetName + " is undefined in configuration."); } _preset = PresetFactory.Create(config); }
public SerializationPresetPredicate(XmlNode configNode) { Assert.ArgumentNotNull(configNode, "configNode"); _preset = PresetFactory.Create(configNode); }