Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / Compilation / WCFModel / DataSvcMapFile.cs / 1305376 / DataSvcMapFile.cs
//------------------------------------------------------------------------------ //// Copyright (C) Microsoft Corporation. All Rights Reserved. // //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; #if WEB_EXTENSIONS_CODE namespace System.Web.Compilation.WCFModel #else namespace Microsoft.VSDesigner.WCFModel #endif { ////// The SvcMapFile is responsible for serializing/deserializing the information in a .svcmap file. /// [System.Xml.Serialization.XmlRootAttribute(Namespace = DataSvcMapFile.NamespaceUri, ElementName = "ReferenceGroup")] #if WEB_EXTENSIONS_CODE internal class DataSvcMapFile #else [CLSCompliant(true)] public class DataSvcMapFile #endif { ////// Namespace for the svcmap file schema /// public const string NamespaceUri = "urn:schemas-microsoft-com:xml-dataservicemap"; // GUID string, to track the reference group when the name is changed private string m_ID; // Metadata Source List private Listm_MetadataSourceList; // Metadata Item list private List m_MetadataList; // Extension File List private List m_ExtensionFileList; // Errors encountered while loading this file private IEnumerable loadErrors; /// /// Constructor /// public DataSvcMapFile() { m_ID = Guid.NewGuid().ToString(); } ////// Extension item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "Extensions", Order = 2)] [System.Xml.Serialization.XmlArrayItem("ExtensionFile", typeof(ExtensionFile))] public List Extensions { get { if (m_ExtensionFileList == null) { m_ExtensionFileList = new List (); } return m_ExtensionFileList; } } /// /// Unique ID of the reference group. It is a GUID string. /// ////// [System.Xml.Serialization.XmlAttribute()] public string ID { get { return m_ID; } set { m_ID = value; } } /// /// Metadata item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "Metadata", Order = 1)] [System.Xml.Serialization.XmlArrayItem("MetadataFile", typeof(MetadataFile))] public List MetadataList { get { if (m_MetadataList == null) { m_MetadataList = new List (); } return m_MetadataList; } } /// /// Metadata source item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "MetadataSources", Order = 0)] [System.Xml.Serialization.XmlArrayItem("MetadataSource", typeof(MetadataSource))] public List MetadataSourceList { get { if (m_MetadataSourceList == null) { m_MetadataSourceList = new List (); } return m_MetadataSourceList; } } /// /// Errors encountered during load /// [System.Xml.Serialization.XmlIgnore()] public IEnumerableLoadErrors { get { List errors = new List (); if (loadErrors != null) { errors.AddRange(loadErrors); } return errors; } } internal void SetLoadErrors(IEnumerable loadErrors) { this.loadErrors = loadErrors; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ // // Copyright (C) Microsoft Corporation. All Rights Reserved. // //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; #if WEB_EXTENSIONS_CODE namespace System.Web.Compilation.WCFModel #else namespace Microsoft.VSDesigner.WCFModel #endif { ////// The SvcMapFile is responsible for serializing/deserializing the information in a .svcmap file. /// [System.Xml.Serialization.XmlRootAttribute(Namespace = DataSvcMapFile.NamespaceUri, ElementName = "ReferenceGroup")] #if WEB_EXTENSIONS_CODE internal class DataSvcMapFile #else [CLSCompliant(true)] public class DataSvcMapFile #endif { ////// Namespace for the svcmap file schema /// public const string NamespaceUri = "urn:schemas-microsoft-com:xml-dataservicemap"; // GUID string, to track the reference group when the name is changed private string m_ID; // Metadata Source List private Listm_MetadataSourceList; // Metadata Item list private List m_MetadataList; // Extension File List private List m_ExtensionFileList; // Errors encountered while loading this file private IEnumerable loadErrors; /// /// Constructor /// public DataSvcMapFile() { m_ID = Guid.NewGuid().ToString(); } ////// Extension item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "Extensions", Order = 2)] [System.Xml.Serialization.XmlArrayItem("ExtensionFile", typeof(ExtensionFile))] public List Extensions { get { if (m_ExtensionFileList == null) { m_ExtensionFileList = new List (); } return m_ExtensionFileList; } } /// /// Unique ID of the reference group. It is a GUID string. /// ////// [System.Xml.Serialization.XmlAttribute()] public string ID { get { return m_ID; } set { m_ID = value; } } /// /// Metadata item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "Metadata", Order = 1)] [System.Xml.Serialization.XmlArrayItem("MetadataFile", typeof(MetadataFile))] public List MetadataList { get { if (m_MetadataList == null) { m_MetadataList = new List (); } return m_MetadataList; } } /// /// Metadata source item list /// ////// [System.Xml.Serialization.XmlArray(ElementName = "MetadataSources", Order = 0)] [System.Xml.Serialization.XmlArrayItem("MetadataSource", typeof(MetadataSource))] public List MetadataSourceList { get { if (m_MetadataSourceList == null) { m_MetadataSourceList = new List (); } return m_MetadataSourceList; } } /// /// Errors encountered during load /// [System.Xml.Serialization.XmlIgnore()] public IEnumerableLoadErrors { get { List errors = new List (); if (loadErrors != null) { errors.AddRange(loadErrors); } return errors; } } internal void SetLoadErrors(IEnumerable loadErrors) { this.loadErrors = loadErrors; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ServiceInstallComponent.cs
- PropertyInfoSet.cs
- ThreadStaticAttribute.cs
- xdrvalidator.cs
- ComponentManagerBroker.cs
- DockPatternIdentifiers.cs
- SessionPageStatePersister.cs
- M3DUtil.cs
- CalendarTable.cs
- DbUpdateCommandTree.cs
- FormsAuthenticationTicket.cs
- MatrixAnimationUsingPath.cs
- WorkflowItemPresenter.cs
- ResourcePart.cs
- BitSet.cs
- _Rfc2616CacheValidators.cs
- ParagraphResult.cs
- DebuggerAttributes.cs
- WindowsAuthenticationEventArgs.cs
- SQLConvert.cs
- WebPartZoneBase.cs
- TextEndOfParagraph.cs
- SQLInt64Storage.cs
- ApplicationInterop.cs
- XPathAncestorIterator.cs
- TabItemWrapperAutomationPeer.cs
- Point4D.cs
- BlurEffect.cs
- AllMembershipCondition.cs
- GridToolTip.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DesignerHierarchicalDataSourceView.cs
- SmiSettersStream.cs
- CompilerState.cs
- MenuItemCollection.cs
- HttpCapabilitiesEvaluator.cs
- HtmlGenericControl.cs
- ArraySubsetEnumerator.cs
- ChameleonKey.cs
- MatrixTransform.cs
- RuleInfoComparer.cs
- SvcMapFileSerializer.cs
- Helper.cs
- UIElement3D.cs
- BaseDataBoundControlDesigner.cs
- PersianCalendar.cs
- RefreshEventArgs.cs
- SelectorItemAutomationPeer.cs
- ObjectViewFactory.cs
- Model3D.cs
- DataMemberConverter.cs
- CustomAttributeSerializer.cs
- FixedTextPointer.cs
- ComplexPropertyEntry.cs
- _BufferOffsetSize.cs
- DataGridLengthConverter.cs
- ContextMenu.cs
- SectionRecord.cs
- ColumnClickEvent.cs
- StorageAssociationTypeMapping.cs
- XamlGridLengthSerializer.cs
- TakeOrSkipQueryOperator.cs
- RenameRuleObjectDialog.Designer.cs
- AddDataControlFieldDialog.cs
- FaultReasonText.cs
- ProcessHostConfigUtils.cs
- OleDbReferenceCollection.cs
- AudioSignalProblemOccurredEventArgs.cs
- ResponseStream.cs
- Light.cs
- StringInfo.cs
- PasswordPropertyTextAttribute.cs
- TemplatePartAttribute.cs
- SHA1.cs
- AudioSignalProblemOccurredEventArgs.cs
- DataPagerField.cs
- XmlFormatExtensionPointAttribute.cs
- NotFiniteNumberException.cs
- PenThreadWorker.cs
- BypassElement.cs
- CharacterHit.cs
- RelatedEnd.cs
- OperationCanceledException.cs
- NativeObjectSecurity.cs
- FileDataSourceCache.cs
- HttpBrowserCapabilitiesWrapper.cs
- PassportAuthenticationModule.cs
- PrintController.cs
- StylusEventArgs.cs
- ClassHandlersStore.cs
- QueryModel.cs
- LocatorPart.cs
- GlyphInfoList.cs
- WindowsTitleBar.cs
- StylusButtonEventArgs.cs
- SkipQueryOptionExpression.cs
- Constant.cs
- ToolboxItemAttribute.cs
- HttpCachePolicyBase.cs
- EditorZone.cs