Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataWeb / Design / system / Data / EntityModel / EdmToObjectNamespaceMap.cs / 1305376 / EdmToObjectNamespaceMap.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Data.Services.Design.Common; namespace System.Data.Services.Design { ////// The class to hold the map entries for the mapping between Edm Namespace and the Object Namespace /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] public class EdmToObjectNamespaceMap { private Dictionary_map = new Dictionary (); /// /// this is just to keep this class from being creatable outside of this assembly /// internal EdmToObjectNamespaceMap() { } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public void Add(string edmNamespace, string objectNamespace) { EDesignUtil.CheckStringArgument(edmNamespace, "edmNamespace"); EDesignUtil.CheckArgumentNull(objectNamespace, "objectNamespace"); _map.Add(edmNamespace, objectNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool Contains(string edmNamespace) { return _map.ContainsKey(edmNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] public ICollectionEdmNamespaces { get { return _map.Keys; } } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool Remove(string edmNamespace) { return _map.Remove(edmNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool TryGetObjectNamespace(string edmNamespace, out string objectNamespace) { return _map.TryGetValue(edmNamespace, out objectNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public string this[string edmNamespace] { get { return _map[edmNamespace]; } set { _map[edmNamespace] = value; } } public void Clear() { _map.Clear(); } public int Count { get { return _map.Count; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Collections.Generic; using System.Data.Services.Design.Common; namespace System.Data.Services.Design { ////// The class to hold the map entries for the mapping between Edm Namespace and the Object Namespace /// [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] public class EdmToObjectNamespaceMap { private Dictionary_map = new Dictionary (); /// /// this is just to keep this class from being creatable outside of this assembly /// internal EdmToObjectNamespaceMap() { } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public void Add(string edmNamespace, string objectNamespace) { EDesignUtil.CheckStringArgument(edmNamespace, "edmNamespace"); EDesignUtil.CheckArgumentNull(objectNamespace, "objectNamespace"); _map.Add(edmNamespace, objectNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool Contains(string edmNamespace) { return _map.ContainsKey(edmNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")] public ICollectionEdmNamespaces { get { return _map.Keys; } } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool Remove(string edmNamespace) { return _map.Remove(edmNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public bool TryGetObjectNamespace(string edmNamespace, out string objectNamespace) { return _map.TryGetValue(edmNamespace, out objectNamespace); } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "edm")] public string this[string edmNamespace] { get { return _map[edmNamespace]; } set { _map[edmNamespace] = value; } } public void Clear() { _map.Clear(); } public int Count { get { return _map.Count; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CheckoutException.cs
- Logging.cs
- HtmlControl.cs
- FileUtil.cs
- ImmutableObjectAttribute.cs
- Image.cs
- QuaternionKeyFrameCollection.cs
- DrawingContextDrawingContextWalker.cs
- PerformanceCounterPermissionEntry.cs
- DataSourceSelectArguments.cs
- EntityException.cs
- ExceptionHelpers.cs
- OdbcUtils.cs
- odbcmetadatacolumnnames.cs
- ValueProviderWrapper.cs
- VectorConverter.cs
- WorkflowFormatterBehavior.cs
- RuleDefinitions.cs
- ObjectDesignerDataSourceView.cs
- WorkflowServiceAttributes.cs
- GroupBox.cs
- ValueQuery.cs
- XmlAttributeCollection.cs
- IdentityHolder.cs
- ReflectionServiceProvider.cs
- IteratorDescriptor.cs
- DataChangedEventManager.cs
- UIElement3DAutomationPeer.cs
- ConditionalAttribute.cs
- ReadOnlyObservableCollection.cs
- webbrowsersite.cs
- SmtpMail.cs
- FixedSOMGroup.cs
- HttpServerUtilityWrapper.cs
- Point3DCollection.cs
- FloaterBaseParagraph.cs
- HttpWriter.cs
- CoTaskMemHandle.cs
- ToolStripContentPanelRenderEventArgs.cs
- DataGridViewDesigner.cs
- XmlArrayAttribute.cs
- ColorIndependentAnimationStorage.cs
- ColumnMapVisitor.cs
- ConsumerConnectionPointCollection.cs
- DrawingBrush.cs
- GridViewColumnCollectionChangedEventArgs.cs
- BaseUriWithWildcard.cs
- RuntimeVariableList.cs
- XmlReflectionImporter.cs
- MetadataImporter.cs
- MultipartIdentifier.cs
- IndicShape.cs
- XmlILOptimizerVisitor.cs
- UInt64Storage.cs
- XmlSerializationWriter.cs
- ZipArchive.cs
- ManifestSignatureInformation.cs
- JoinGraph.cs
- Typeface.cs
- AsymmetricSignatureDeformatter.cs
- PrePostDescendentsWalker.cs
- RewritingProcessor.cs
- FloaterParagraph.cs
- NativeMethods.cs
- DesignBindingValueUIHandler.cs
- DataGridViewLinkCell.cs
- XmlLinkedNode.cs
- WebServiceTypeData.cs
- RegexTree.cs
- EnumerableRowCollectionExtensions.cs
- DllHostedComPlusServiceHost.cs
- DataConnectionHelper.cs
- SuppressedPackageProperties.cs
- CatalogPartCollection.cs
- DecoderReplacementFallback.cs
- CacheChildrenQuery.cs
- Metadata.cs
- FontClient.cs
- ConstraintConverter.cs
- SingleObjectCollection.cs
- DataObject.cs
- CfgParser.cs
- UnicastIPAddressInformationCollection.cs
- XamlHttpHandlerFactory.cs
- SerializationEventsCache.cs
- InvokeProviderWrapper.cs
- BrowserDefinition.cs
- JsonXmlDataContract.cs
- UIElementCollection.cs
- SQLMoney.cs
- OpenTypeMethods.cs
- CustomAttribute.cs
- HttpAsyncResult.cs
- ReadWriteObjectLock.cs
- CatalogPartCollection.cs
- BitmapMetadata.cs
- TransactionalPackage.cs
- XmlILOptimizerVisitor.cs
- TextTreeObjectNode.cs
- KnownTypesHelper.cs