public XmlMementoSource(string NodeName, string TypeAttribute, string KeyAttribute, XmlMementoStyle style) { _nodeName = NodeName; _typeAttribute = TypeAttribute; _keyAttribute = KeyAttribute; _mementoCreator = new XmlMementoCreator(style, TypeAttribute, KeyAttribute); }
public EmbeddedFolderXmlMementoSource(XmlMementoStyle style, string assemblyName, string folderPath, string extension) { _assemblyName = assemblyName; _folderPath = folderPath; _extension = extension; findEmbeddedFiles(); _creator = new XmlMementoCreator(style, "Type", "Key"); }
public EmbeddedFolderXmlMementoSource(XmlMementoStyle style, string assemblyName, string folderPath, string extension) { _assemblyName = assemblyName; _folderPath = folderPath; _extension = extension; findEmbeddedFiles(); _creator = new XmlMementoCreator(style, "Type", "Key"); }
public XmlMementoCreator(XmlMementoStyle style, string typeAttribute, string keyAttribute) { _typeAttribute = typeAttribute; _keyAttribute = keyAttribute; if (style == XmlMementoStyle.NodeNormalized) { _createMemento = createNodeNormalizedMemento; } else { _createMemento = createAttributeNormalizedMemento; } }
public XmlMementoCreator(XmlMementoStyle style, string typeAttribute, string keyAttribute) { _typeAttribute = typeAttribute; _keyAttribute = keyAttribute; if (style == XmlMementoStyle.NodeNormalized) { _createMemento = createNodeNormalizedMemento; } else { _createMemento = createAttributeNormalizedMemento; } }
public ConfigurationParser(XmlNode structureMapNode) { _structureMapNode = structureMapNode; XmlMementoStyle mementoStyle = XmlMementoStyle.NodeNormalized; _structureMapNode.ForAttributeValue(MEMENTO_STYLE, style => { if (style == ATTRIBUTE_STYLE) { mementoStyle = XmlMementoStyle.AttributeNormalized; } }); _mementoCreator = new XmlMementoCreator( mementoStyle, TYPE_ATTRIBUTE, KEY_ATTRIBUTE); }
/// <summary> /// Stores an Xml InstanceMemento per file in a directory /// </summary> /// <param name="directory">A ";" delimited list of directories to look for mementos. DirectoryXmlMementoSource /// will use the FIRST directory it finds</param> /// <param name="extension">The file extension of the InstanceMemento files without a dot. Typically "xml"</param> /// <param name="mementoStyle">NodeNormalized or AttributeNormalized</param> public DirectoryXmlMementoSource(string directory, string extension, XmlMementoStyle mementoStyle) { _extension = extension; _mementoCreator = new XmlMementoCreator(mementoStyle, XmlConstants.TYPE_ATTRIBUTE, XmlConstants.KEY_ATTRIBUTE); string[] searchPaths = directory.Split(';'); foreach (string searchPath in searchPaths) { string resolvedPath = resolvePath(searchPath); if (Directory.Exists(resolvedPath)) { _directory = resolvedPath; break; } } if (_directory == null) { throw new ApplicationException("Could not find any of the SearchPaths in the directory path"); } }
/// <summary> /// Stores an Xml InstanceMemento per file in a directory /// </summary> /// <param name="directory">A ";" delimited list of directories to look for mementos. DirectoryXmlMementoSource /// will use the FIRST directory it finds</param> /// <param name="extension">The file extension of the InstanceMemento files without a dot. Typically "xml"</param> /// <param name="mementoStyle">NodeNormalized or AttributeNormalized</param> public DirectoryXmlMementoSource(string directory, string extension, XmlMementoStyle mementoStyle) { _extension = extension; _mementoCreator = new XmlMementoCreator(mementoStyle, XmlConstants.TYPE_ATTRIBUTE, XmlConstants.KEY_ATTRIBUTE); string[] searchPaths = directory.Split(';'); foreach (string searchPath in searchPaths) { string resolvedPath = resolvePath(searchPath); if (Directory.Exists(resolvedPath)) { _directory = resolvedPath; break; } } if (_directory == null) { throw new ApplicationException("Could not find any of the SearchPaths in the directory path"); } }
public SingleEmbeddedXmlMementoSource(string nodeName, XmlMementoStyle style, Assembly assembly, string path) : base(nodeName, "Type", "Key", style) { _assembly = assembly; _path = path; }
public SingleEmbeddedXmlMementoSource(string nodeName, XmlMementoStyle style, string assemblyName, string path) : base(nodeName, "Type", "Key", style) { _path = path; _assembly = Assembly.Load(assemblyName); }
public XmlFileMementoSource(string FilePath, string XPath, string NodeName, XmlMementoStyle style) : base(NodeName, "Type", "Key", style) { _filePath = FilePath; _xpath = XPath; }
public SingleEmbeddedXmlMementoSource(string nodeName, XmlMementoStyle style, Assembly assembly, string path) : base(nodeName, "Type", "Key", style) { _assembly = assembly; _path = path; }
public SingleEmbeddedXmlMementoSource(string nodeName, XmlMementoStyle style, string assemblyName, string path) : base(nodeName, "Type", "Key", style) { _path = path; _assembly = Assembly.Load(assemblyName); }
public XmlMementoSource(string NodeName, string TypeAttribute, string KeyAttribute, XmlMementoStyle style) { _nodeName = NodeName; _typeAttribute = TypeAttribute; _keyAttribute = KeyAttribute; _mementoCreator = new XmlMementoCreator(style, TypeAttribute, KeyAttribute); }
public XmlFileMementoSource(string FilePath, string XPath, string NodeName, XmlMementoStyle style) : base(NodeName, "Type", "Key", style) { _filePath = FilePath; _xpath = XPath; }