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
- DataRecordInternal.cs
- CharUnicodeInfo.cs
- BitmapFrameDecode.cs
- Odbc32.cs
- MouseCaptureWithinProperty.cs
- WindowExtensionMethods.cs
- EventLogPermissionAttribute.cs
- SqlMethodTransformer.cs
- SortKey.cs
- TypeUnloadedException.cs
- SessionStateItemCollection.cs
- SpecialFolderEnumConverter.cs
- PrintControllerWithStatusDialog.cs
- ModelItem.cs
- CatalogPart.cs
- HtmlWindowCollection.cs
- ServiceReference.cs
- DynamicRenderer.cs
- CodeSubDirectoriesCollection.cs
- XmlWriter.cs
- UInt16Converter.cs
- DataGridViewImageCell.cs
- LogSwitch.cs
- EventData.cs
- DbConnectionHelper.cs
- AdRotatorDesigner.cs
- AutomationProperty.cs
- SQLInt32.cs
- objectquery_tresulttype.cs
- PcmConverter.cs
- DataSourceControl.cs
- SimpleTextLine.cs
- QuadraticEase.cs
- AppDomainProtocolHandler.cs
- MailMessageEventArgs.cs
- PasswordTextNavigator.cs
- DefinitionBase.cs
- CompileLiteralTextParser.cs
- ResolveCriteria.cs
- X500Name.cs
- arabicshape.cs
- xmlglyphRunInfo.cs
- TypeInitializationException.cs
- SHA512.cs
- EntityDataSourceMemberPath.cs
- SelectedGridItemChangedEvent.cs
- PeerNameRecord.cs
- EpmHelper.cs
- CaseInsensitiveHashCodeProvider.cs
- DataGridBoolColumn.cs
- ItemCheckEvent.cs
- InternalConfigSettingsFactory.cs
- TextEffectCollection.cs
- DataControlField.cs
- LowerCaseStringConverter.cs
- CategoryAttribute.cs
- InternalControlCollection.cs
- ObjectComplexPropertyMapping.cs
- WebPartPersonalization.cs
- DesignTimeVisibleAttribute.cs
- FilterElement.cs
- TimeoutException.cs
- CompositionDesigner.cs
- MessageDecoder.cs
- pingexception.cs
- ConfigurationException.cs
- ItemChangedEventArgs.cs
- SmiContextFactory.cs
- TextDecorationCollection.cs
- precedingquery.cs
- BasePropertyDescriptor.cs
- DomNameTable.cs
- ResourcePermissionBase.cs
- UInt16.cs
- ScaleTransform3D.cs
- DuplicateMessageDetector.cs
- StrongNameKeyPair.cs
- ListViewItemEventArgs.cs
- SizeKeyFrameCollection.cs
- SocketException.cs
- XmlWrappingReader.cs
- VideoDrawing.cs
- CategoryEditor.cs
- MulticastOption.cs
- PhonemeEventArgs.cs
- AlignmentXValidation.cs
- LOSFormatter.cs
- Int32KeyFrameCollection.cs
- DataGridViewColumn.cs
- SourceFileInfo.cs
- DetailsViewDeletedEventArgs.cs
- CLRBindingWorker.cs
- PropertyOverridesTypeEditor.cs
- SettingsSavedEventArgs.cs
- DictionaryItemsCollection.cs
- SQLDecimalStorage.cs
- SessionEndedEventArgs.cs
- BinaryUtilClasses.cs
- SignatureToken.cs
- RegionInfo.cs