Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ActivationServices.cs
- TemplatedControlDesigner.cs
- StrokeCollection2.cs
- SqlProcedureAttribute.cs
- TabItem.cs
- DirectionalLight.cs
- CalendarSelectionChangedEventArgs.cs
- Compilation.cs
- Int32Storage.cs
- ComEventsMethod.cs
- ExceptionDetail.cs
- EffectiveValueEntry.cs
- IIS7UserPrincipal.cs
- ContainerSelectorBehavior.cs
- SessionStateContainer.cs
- StandardCommands.cs
- XamlWriter.cs
- EpmSyndicationContentSerializer.cs
- RegionData.cs
- QuotedPrintableStream.cs
- cache.cs
- CompensatableTransactionScopeActivity.cs
- ImpersonationContext.cs
- SoapMessage.cs
- SQLRoleProvider.cs
- InheritanceAttribute.cs
- PassportAuthenticationEventArgs.cs
- TraceUtility.cs
- ReadOnlyDataSourceView.cs
- XPathPatternParser.cs
- BamlLocalizationDictionary.cs
- OdbcConnectionHandle.cs
- WinEventTracker.cs
- ControlPager.cs
- TaskScheduler.cs
- _NtlmClient.cs
- DataDocumentXPathNavigator.cs
- HttpHeaderCollection.cs
- Site.cs
- StaticFileHandler.cs
- WeakEventTable.cs
- ToggleButtonAutomationPeer.cs
- ZipIOCentralDirectoryFileHeader.cs
- SubpageParagraph.cs
- AnimationLayer.cs
- EntitySetBaseCollection.cs
- SqlWriter.cs
- SpeakCompletedEventArgs.cs
- XmlAttributeAttribute.cs
- ToolboxControl.cs
- FormViewActionList.cs
- DocumentViewerHelper.cs
- ObjectCloneHelper.cs
- RegexCharClass.cs
- HttpCapabilitiesBase.cs
- DataRow.cs
- SQLByteStorage.cs
- UnaryNode.cs
- Char.cs
- DesignerExtenders.cs
- TemplateLookupAction.cs
- FastEncoderWindow.cs
- ResourceCategoryAttribute.cs
- GlyphRunDrawing.cs
- HostedTransportConfigurationManager.cs
- InvalidPipelineStoreException.cs
- BitmapEditor.cs
- DocumentGridContextMenu.cs
- Int32AnimationBase.cs
- BigInt.cs
- Model3DGroup.cs
- Vector.cs
- SmtpNetworkElement.cs
- SynchronousChannelMergeEnumerator.cs
- PageCodeDomTreeGenerator.cs
- ThreadAttributes.cs
- SafeNativeMethods.cs
- ExpressionsCollectionEditor.cs
- CryptoHandle.cs
- User.cs
- HexParser.cs
- URIFormatException.cs
- CrossAppDomainChannel.cs
- PeerNearMe.cs
- Speller.cs
- InputBindingCollection.cs
- DashStyle.cs
- ComponentGlyph.cs
- nulltextcontainer.cs
- LineGeometry.cs
- StackBuilderSink.cs
- isolationinterop.cs
- InkCanvas.cs
- LineGeometry.cs
- ToolStripDropDown.cs
- RequestBringIntoViewEventArgs.cs
- RelAssertionDirectKeyIdentifierClause.cs
- MachineKeySection.cs
- MetadataSource.cs
- EntityDataSourceDesignerHelper.cs