#region Copyright (c) Microsoft Corporation /// /// Copyright (c) Microsoft Corporation. All Rights Reserved. /// Information Contained Herein is Proprietary and Confidential. /// #endregion using System; using System.Collections.Generic; using System.Diagnostics; using System.Xml.Serialization; #if WEB_EXTENSIONS_CODE namespace System.Web.Compilation.WCFModel #else namespace Microsoft.VSDesigner.WCFModel #endif { #if WEB_EXTENSIONS_CODE internal class DataSvcMapFile : MapFile #else [CLSCompliant(true)] public class DataSvcMapFile : MapFile #endif { private DataSvcMapFileImpl _impl; public DataSvcMapFileImpl Impl { get { return _impl; } } public DataSvcMapFile() { _impl = new DataSvcMapFileImpl(); } public DataSvcMapFile(DataSvcMapFileImpl impl) { Debug.Assert(impl != null, "impl is null!"); _impl = impl; } public override string ID { get { return _impl.ID; } set { _impl.ID = value; } } public override List MetadataSourceList { get { return _impl.MetadataSourceList; } } public override List MetadataList { get { return _impl.MetadataList; } } public override List Extensions { get { return _impl.Extensions; } } public List Parameters { get { return _impl.Parameters; } } } [XmlRoot(Namespace = DataSvcMapFileImpl.NamespaceUri, ElementName = "ReferenceGroup")] #if WEB_EXTENSIONS_CODE internal class DataSvcMapFileImpl #else [CLSCompliant(true)] public class DataSvcMapFileImpl #endif { public const string NamespaceUri = "urn:schemas-microsoft-com:xml-dataservicemap"; private string _id; private List _metadataSourceList; private List _metadataList; private List _extensionFileList; private List _parameters; [XmlAttribute] public string ID { get { if (_id == null) { _id = Guid.NewGuid().ToString(); } return _id; } set { if (value == null) { throw new ArgumentNullException("value"); } _id = value; } } [XmlArray(ElementName = "MetadataSources", Order = 0)] [XmlArrayItem("MetadataSource", typeof(MetadataSource))] public List MetadataSourceList { get { if (_metadataSourceList == null) { _metadataSourceList = new List(); } return _metadataSourceList; } } [XmlArray(ElementName = "Metadata", Order = 1)] [XmlArrayItem("MetadataFile", typeof(MetadataFile))] public List MetadataList { get { if (_metadataList == null) { _metadataList = new List(); } return _metadataList; } } [XmlArray(ElementName = "Extensions", Order = 2)] [XmlArrayItem("ExtensionFile", typeof(ExtensionFile))] public List Extensions { get { if (_extensionFileList == null) { _extensionFileList = new List(); } return _extensionFileList; } } [XmlArray(ElementName = "Parameters", Order = 3)] [XmlArrayItem("Parameter", typeof(Parameter))] public List Parameters { get { if (_parameters == null) { _parameters = new List(); } return _parameters; } } } }