Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / schema / ChameleonKey.cs / 1 / ChameleonKey.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.Collections; using System.ComponentModel; using System.Xml.Serialization; // Case insensitive file name key for use in a hashtable. internal class ChameleonKey { internal string targetNS; internal Uri chameleonLocation; int hashCode; public ChameleonKey(string ns, Uri location) { targetNS = ns; chameleonLocation = location; } public override int GetHashCode() { if (hashCode == 0) { hashCode = targetNS.GetHashCode() + chameleonLocation.GetHashCode(); } return hashCode; } public override bool Equals(object obj) { if (Ref.ReferenceEquals(this,obj)) { return true; } ChameleonKey cKey = obj as ChameleonKey; if (cKey != null) { return this.targetNS.Equals(cKey.targetNS) && this.chameleonLocation.Equals(cKey.chameleonLocation); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.Collections; using System.ComponentModel; using System.Xml.Serialization; // Case insensitive file name key for use in a hashtable. internal class ChameleonKey { internal string targetNS; internal Uri chameleonLocation; int hashCode; public ChameleonKey(string ns, Uri location) { targetNS = ns; chameleonLocation = location; } public override int GetHashCode() { if (hashCode == 0) { hashCode = targetNS.GetHashCode() + chameleonLocation.GetHashCode(); } return hashCode; } public override bool Equals(object obj) { if (Ref.ReferenceEquals(this,obj)) { return true; } ChameleonKey cKey = obj as ChameleonKey; if (cKey != null) { return this.targetNS.Equals(cKey.targetNS) && this.chameleonLocation.Equals(cKey.chameleonLocation); } return false; } } } // 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
- HybridDictionary.cs
- PropagatorResult.cs
- SafeHandle.cs
- FixedDSBuilder.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- SoapSchemaImporter.cs
- ItemCollection.cs
- SimpleType.cs
- ToolStripOverflowButton.cs
- Type.cs
- Base64Stream.cs
- TextProperties.cs
- BufferedStream.cs
- WebBrowserBase.cs
- DbConnectionPoolIdentity.cs
- InternalBufferManager.cs
- TCPListener.cs
- CodeIdentifiers.cs
- ExtentCqlBlock.cs
- TabPanel.cs
- XmlDictionaryReaderQuotas.cs
- HashRepartitionEnumerator.cs
- Config.cs
- _LocalDataStore.cs
- ConnectionManagementElementCollection.cs
- Point3DAnimationBase.cs
- PhonemeConverter.cs
- InstanceDescriptor.cs
- HtmlInputReset.cs
- TextServicesProperty.cs
- EventDescriptor.cs
- GridEntryCollection.cs
- Manipulation.cs
- SqlColumnizer.cs
- Page.cs
- CacheChildrenQuery.cs
- StateChangeEvent.cs
- SortedDictionary.cs
- DesignerEditorPartChrome.cs
- ControllableStoryboardAction.cs
- ExpressionBuilderCollection.cs
- ObjectTag.cs
- AccessDataSourceView.cs
- ConvertTextFrag.cs
- ReachDocumentReferenceSerializer.cs
- DataGridViewBindingCompleteEventArgs.cs
- DynamicResourceExtension.cs
- ReturnType.cs
- XmlSchemaSubstitutionGroup.cs
- CalendarDayButton.cs
- DataGridViewColumnHeaderCell.cs
- QilList.cs
- OptimizedTemplateContent.cs
- MissingMemberException.cs
- SynchronizingStream.cs
- DBNull.cs
- Overlapped.cs
- ReverseQueryOperator.cs
- PropertyMapper.cs
- FontWeightConverter.cs
- EventWaitHandle.cs
- DataRowCollection.cs
- QuaternionRotation3D.cs
- DocumentsTrace.cs
- BuildManagerHost.cs
- TextOnlyOutput.cs
- TransactionsSectionGroup.cs
- WorkflowWebService.cs
- PlainXmlDeserializer.cs
- RijndaelManagedTransform.cs
- safePerfProviderHandle.cs
- UserInitiatedRoutedEventPermission.cs
- StrokeNodeOperations.cs
- KnownBoxes.cs
- Transform3D.cs
- AccessibleObject.cs
- BuildProviderAppliesToAttribute.cs
- IApplicationTrustManager.cs
- assemblycache.cs
- ElementProxy.cs
- XmlArrayItemAttributes.cs
- BitmapCodecInfo.cs
- ProtocolViolationException.cs
- StartUpEventArgs.cs
- MD5.cs
- ShutDownListener.cs
- ComplexType.cs
- SystemIPGlobalStatistics.cs
- CachedPathData.cs
- FontDriver.cs
- Canvas.cs
- SlotInfo.cs
- ToolStripRendererSwitcher.cs
- ServiceOperation.cs
- MemberDescriptor.cs
- DataBindingCollection.cs
- PanelDesigner.cs
- CheckedListBox.cs
- EncoderNLS.cs
- MetadataCacheItem.cs