Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWeb / Design / system / Data / EntityModel / EdmToObjectNamespaceMap.cs / 1 / EdmToObjectNamespaceMap.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; using System.Text; 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; using System.Collections.Generic; using System.Linq; using System.Text; 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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataKeyArray.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- LZCodec.cs
- EventArgs.cs
- SqlFormatter.cs
- InternalConfirm.cs
- CommandBindingCollection.cs
- ConversionContext.cs
- DefaultPropertyAttribute.cs
- DictionaryItemsCollection.cs
- XPathPatternParser.cs
- XamlRtfConverter.cs
- COAUTHIDENTITY.cs
- FontCacheUtil.cs
- CompModSwitches.cs
- TriState.cs
- StrokeNodeEnumerator.cs
- ProtocolsConfigurationHandler.cs
- HtmlEmptyTagControlBuilder.cs
- MgmtConfigurationRecord.cs
- PriorityItem.cs
- HtmlProps.cs
- MessageLogger.cs
- CounterCreationData.cs
- Parameter.cs
- InfiniteTimeSpanConverter.cs
- TextEditorContextMenu.cs
- GridItem.cs
- __Filters.cs
- TreeIterator.cs
- DropDownList.cs
- GridViewDeleteEventArgs.cs
- AspNetSynchronizationContext.cs
- EditBehavior.cs
- ForceCopyBuildProvider.cs
- CommonXSendMessage.cs
- ListViewContainer.cs
- TypeDelegator.cs
- AsyncResult.cs
- DesignBindingEditor.cs
- CancelAsyncOperationRequest.cs
- RemotingConfigParser.cs
- HijriCalendar.cs
- ExtractedStateEntry.cs
- ClickablePoint.cs
- MetadataPropertyCollection.cs
- BitmapEffectvisualstate.cs
- PropertyChangingEventArgs.cs
- Atom10ItemFormatter.cs
- RectangleGeometry.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- SapiRecognizer.cs
- EventWaitHandleSecurity.cs
- CultureSpecificCharacterBufferRange.cs
- ChangeConflicts.cs
- EventRoute.cs
- WebPartConnectionsEventArgs.cs
- InertiaExpansionBehavior.cs
- WindowsTreeView.cs
- XPathScanner.cs
- _DigestClient.cs
- X509UI.cs
- _FtpDataStream.cs
- DeferredElementTreeState.cs
- MetadataCache.cs
- HtmlForm.cs
- ComboBox.cs
- OracleTimeSpan.cs
- InputMethod.cs
- ComMethodElement.cs
- TabItemWrapperAutomationPeer.cs
- PersonalizationProviderHelper.cs
- SelectingProviderEventArgs.cs
- NavigationWindowAutomationPeer.cs
- CompilerResults.cs
- SQLSingleStorage.cs
- DetailsViewUpdatedEventArgs.cs
- PeerNameRegistration.cs
- TextBoxLine.cs
- Int16Animation.cs
- DisplayInformation.cs
- ListBoxDesigner.cs
- DataGridViewComboBoxEditingControl.cs
- MissingSatelliteAssemblyException.cs
- WindowsRichEditRange.cs
- odbcmetadatacolumnnames.cs
- AlphaSortedEnumConverter.cs
- CreateInstanceBinder.cs
- COM2ICategorizePropertiesHandler.cs
- ZipFileInfoCollection.cs
- ReliabilityContractAttribute.cs
- ModelItemImpl.cs
- MainMenu.cs
- RecordManager.cs
- CodeDirectionExpression.cs
- PropertyGrid.cs
- VSWCFServiceContractGenerator.cs
- DebugView.cs
- WebPartVerbsEventArgs.cs
- Logging.cs