Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- XMLSchema.cs
- WebPartCloseVerb.cs
- EmptyCollection.cs
- SMSvcHost.cs
- AutomationPropertyInfo.cs
- EntityDataSourceContextCreatedEventArgs.cs
- PerfCounterSection.cs
- WsatRegistrationHeader.cs
- LeaseManager.cs
- KnownTypeDataContractResolver.cs
- LineBreak.cs
- ArraySubsetEnumerator.cs
- DynamicHyperLink.cs
- CompilerCollection.cs
- MimeMapping.cs
- CalendarDay.cs
- DynamicPropertyReader.cs
- Interlocked.cs
- TextContainerChangedEventArgs.cs
- BlurEffect.cs
- RC2.cs
- TiffBitmapEncoder.cs
- MenuItemBinding.cs
- UnsafeNetInfoNativeMethods.cs
- HashCryptoHandle.cs
- BamlStream.cs
- EntityModelBuildProvider.cs
- CodeDOMUtility.cs
- BitmapEffectInputData.cs
- ContentFileHelper.cs
- DrawingVisualDrawingContext.cs
- DetailsViewDeleteEventArgs.cs
- EventLogTraceListener.cs
- SafeViewOfFileHandle.cs
- Image.cs
- HiddenField.cs
- ObjectStateFormatter.cs
- SqlProviderManifest.cs
- DataControlReferenceCollection.cs
- TableProviderWrapper.cs
- DetailsViewInsertedEventArgs.cs
- FileVersionInfo.cs
- ViewSimplifier.cs
- QueryExpr.cs
- WebPartDisplayMode.cs
- ZipIOBlockManager.cs
- Shape.cs
- BuildDependencySet.cs
- DbProviderFactoriesConfigurationHandler.cs
- HostedBindingBehavior.cs
- DataSourceConverter.cs
- PixelFormats.cs
- WsatServiceAddress.cs
- OperatingSystem.cs
- __ComObject.cs
- ImageSourceValueSerializer.cs
- EntityDataSourceValidationException.cs
- InvokeFunc.cs
- XmlSerializerVersionAttribute.cs
- iisPickupDirectory.cs
- EncryptedPackage.cs
- CodeStatement.cs
- handlecollector.cs
- MetabaseSettings.cs
- AppLevelCompilationSectionCache.cs
- BindingOperations.cs
- StateValidator.cs
- GrammarBuilderPhrase.cs
- ControlPropertyNameConverter.cs
- Crypto.cs
- StorageComplexTypeMapping.cs
- ProtocolState.cs
- PersistChildrenAttribute.cs
- Utils.cs
- ParameterCollection.cs
- StrokeNodeData.cs
- ValidationRule.cs
- SwitchAttribute.cs
- MenuItem.cs
- StorageSetMapping.cs
- WmlCalendarAdapter.cs
- XmlSiteMapProvider.cs
- DocumentPageView.cs
- ComponentManagerBroker.cs
- MatrixUtil.cs
- ServerProtocol.cs
- ConfigXmlText.cs
- TransactionFormatter.cs
- HttpInputStream.cs
- WindowsListViewGroupSubsetLink.cs
- QilXmlReader.cs
- BrowserCapabilitiesCodeGenerator.cs
- ProvidePropertyAttribute.cs
- DefaultTextStore.cs
- RelationshipEndCollection.cs
- wpf-etw.cs
- SymbolMethod.cs
- UiaCoreApi.cs
- FixedSOMTableRow.cs
- ISSmlParser.cs