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
- AxisAngleRotation3D.cs
- NativeMethods.cs
- BaseProcessor.cs
- SafeHandles.cs
- DynamicILGenerator.cs
- XmlRootAttribute.cs
- ResourceProperty.cs
- BufferedReceiveElement.cs
- SmtpFailedRecipientsException.cs
- CopyAttributesAction.cs
- Enlistment.cs
- EventWaitHandle.cs
- nulltextnavigator.cs
- SmiRequestExecutor.cs
- FixedTextView.cs
- XamlFigureLengthSerializer.cs
- FullTextBreakpoint.cs
- rsa.cs
- CatalogPartCollection.cs
- IArgumentProvider.cs
- Localizer.cs
- ListBase.cs
- PageStatePersister.cs
- SelectingProviderEventArgs.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- SafeArchiveContext.cs
- SqlXmlStorage.cs
- dataSvcMapFileLoader.cs
- SurrogateSelector.cs
- PassportIdentity.cs
- TypeSystem.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- MimeTypePropertyAttribute.cs
- AssemblyBuilder.cs
- Identifier.cs
- Effect.cs
- BufferAllocator.cs
- CheckBoxStandardAdapter.cs
- DBSchemaTable.cs
- TraversalRequest.cs
- MSAAWinEventWrap.cs
- SplitterCancelEvent.cs
- ExtractorMetadata.cs
- TextServicesDisplayAttribute.cs
- OptimalBreakSession.cs
- CodeTryCatchFinallyStatement.cs
- BinaryReader.cs
- XmlArrayAttribute.cs
- XPathArrayIterator.cs
- PrefixQName.cs
- ItemsPresenter.cs
- StatusBarPanel.cs
- WebPartsPersonalizationAuthorization.cs
- FormViewPageEventArgs.cs
- ObjectIDGenerator.cs
- DocumentViewer.cs
- XPathPatternParser.cs
- DefaultDialogButtons.cs
- SmiEventSink.cs
- WeakEventTable.cs
- WebPartCatalogAddVerb.cs
- ColorConvertedBitmapExtension.cs
- TypeResolver.cs
- ProtectedProviderSettings.cs
- XmlElement.cs
- MethodRental.cs
- CharEnumerator.cs
- ButtonAutomationPeer.cs
- RubberbandSelector.cs
- SrgsItemList.cs
- ZoneMembershipCondition.cs
- EpmCustomContentSerializer.cs
- CheckPair.cs
- SqlMultiplexer.cs
- Win32.cs
- WindowsUpDown.cs
- BitmapEffectRenderDataResource.cs
- SqlException.cs
- StaticSiteMapProvider.cs
- ImageMetadata.cs
- Style.cs
- ReflectPropertyDescriptor.cs
- BitmapEffectState.cs
- TableLayout.cs
- _CacheStreams.cs
- HttpModuleCollection.cs
- OpenTypeMethods.cs
- ChtmlPageAdapter.cs
- BinaryFormatterSinks.cs
- CatalogPartDesigner.cs
- XmlSchemaChoice.cs
- Site.cs
- CriticalFinalizerObject.cs
- BinaryMethodMessage.cs
- DataGridViewComboBoxColumn.cs
- XmlSerializationGeneratedCode.cs
- XmlDataSource.cs
- StreamSecurityUpgradeInitiatorBase.cs
- PopupRootAutomationPeer.cs
- TextEditorMouse.cs