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
- ProgressBar.cs
- ApplicationFileCodeDomTreeGenerator.cs
- DbConnectionHelper.cs
- RoutedPropertyChangedEventArgs.cs
- InheritanceContextChangedEventManager.cs
- HttpGetProtocolReflector.cs
- TextEffectResolver.cs
- ResourceExpressionBuilder.cs
- TreeChangeInfo.cs
- TaskHelper.cs
- ConnectionStringsSection.cs
- QueryCacheEntry.cs
- SemaphoreSecurity.cs
- AppearanceEditorPart.cs
- HtmlTextBoxAdapter.cs
- XmlCodeExporter.cs
- CannotUnloadAppDomainException.cs
- XPathNavigatorKeyComparer.cs
- CodeArgumentReferenceExpression.cs
- TokenBasedSet.cs
- ShaperBuffers.cs
- AdornerPresentationContext.cs
- Int32CollectionConverter.cs
- PageEventArgs.cs
- XamlTypeMapper.cs
- ChannelEndpointElementCollection.cs
- SecurityCredentialsManager.cs
- ETagAttribute.cs
- BaseAsyncResult.cs
- XmlDeclaration.cs
- TextOptionsInternal.cs
- RegistryPermission.cs
- HttpCapabilitiesBase.cs
- TdsParser.cs
- DefaultCompensation.cs
- KnownTypesHelper.cs
- WSTrustDec2005.cs
- PointLightBase.cs
- FormViewDeleteEventArgs.cs
- AddIn.cs
- SafeNativeMethodsCLR.cs
- EventManager.cs
- MailHeaderInfo.cs
- OptimalTextSource.cs
- SystemWebSectionGroup.cs
- SiteMapProvider.cs
- ScriptComponentDescriptor.cs
- ModelItemDictionaryImpl.cs
- ObjectListItemCollection.cs
- InputLanguageEventArgs.cs
- IdentityModelDictionary.cs
- DbDataAdapter.cs
- SpStreamWrapper.cs
- SessionStateItemCollection.cs
- OpCopier.cs
- StoreItemCollection.Loader.cs
- StylusDownEventArgs.cs
- Debug.cs
- FixedSOMTableRow.cs
- AuthorizationRule.cs
- EntityRecordInfo.cs
- DocumentOrderQuery.cs
- XsdDataContractImporter.cs
- BuildManagerHost.cs
- BitmapDownload.cs
- MessageFault.cs
- ScriptingRoleServiceSection.cs
- RequestQueue.cs
- BinHexDecoder.cs
- XmlCharacterData.cs
- LicenseContext.cs
- ControlBindingsCollection.cs
- UrlAuthorizationModule.cs
- CellConstant.cs
- FormsIdentity.cs
- FixedSOMTable.cs
- SystemKeyConverter.cs
- BaseParser.cs
- FactoryMaker.cs
- BuildResultCache.cs
- CompiledQueryCacheEntry.cs
- HTMLTextWriter.cs
- ColorDialog.cs
- AuthenticationSection.cs
- HttpDebugHandler.cs
- WindowsImpersonationContext.cs
- HtmlInputSubmit.cs
- HeaderedItemsControl.cs
- AsyncSerializedWorker.cs
- SafeCoTaskMem.cs
- OperationContractAttribute.cs
- PropertyChangingEventArgs.cs
- GridProviderWrapper.cs
- _SSPISessionCache.cs
- XmlSchemaChoice.cs
- ConfigurationSettings.cs
- DataGridViewMethods.cs
- PnrpPermission.cs
- PreviewKeyDownEventArgs.cs
- TableLayoutStyleCollection.cs