/// <summary> /// Adds default XML document information for this configuration composite. /// </summary> /// <param name="info">This <see cref="ConfigurationCompositeDefaultInfo"/>.</param> /// <param name="documentPath">The path to the XML document holding serialized configuration.</param> /// <param name="xpath">The optional textual XPath expression to retrieve the actual element within the XML document to (de)serialize the configuration.</param> /// <returns>The <paramref name="info"/>.</returns> /// <exception cref="ArgumentException">If <paramref name="documentPath"/> is <c>null</c> or empty string.</exception> public static ConfigurationCompositeDefaultInfo LocatedInXMLDocument(this ConfigurationCompositeDefaultInfo info, String documentPath, String xpath = null) { return(info.SetDefaultLocationInfo(new XMLConfigurationResource(documentPath, xpath))); }
/// <summary> /// Adds XML serialization support for configuration composite represented by this <see cref="ConfigurationCompositeDefaultInfo"/>. /// </summary> /// <param name="info">This <see cref="ConfigurationCompositeDefaultInfo"/>.</param> /// <returns>This <see cref="ConfigurationCompositeDefaultInfo"/>.</returns> public static ConfigurationCompositeDefaultInfo SerializedByXML(this ConfigurationCompositeDefaultInfo info) { return(info.SerializedBy(typeof(XMLConfigurationSerializer))); }