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
- UrlAuthFailureHandler.cs
- InputReportEventArgs.cs
- Html32TextWriter.cs
- TemplateKeyConverter.cs
- ClusterSafeNativeMethods.cs
- GridViewColumnCollectionChangedEventArgs.cs
- GradientSpreadMethodValidation.cs
- XmlSchemaComplexContentRestriction.cs
- ChannelSinkStacks.cs
- HtmlTableCell.cs
- OutputCacheSettings.cs
- SystemBrushes.cs
- AsyncDataRequest.cs
- EmptyEnumerator.cs
- ViewKeyConstraint.cs
- SafeSecurityHelper.cs
- ToolCreatedEventArgs.cs
- SchemaDeclBase.cs
- IItemProperties.cs
- ISAPIRuntime.cs
- WinEventTracker.cs
- GPPOINT.cs
- RenamedEventArgs.cs
- propertytag.cs
- DbDataReader.cs
- AnimatedTypeHelpers.cs
- DataGridViewHeaderCell.cs
- StretchValidation.cs
- Lasso.cs
- SourceSwitch.cs
- CustomErrorsSection.cs
- WebPartEditVerb.cs
- OrderedDictionaryStateHelper.cs
- FusionWrap.cs
- AppDomainCompilerProxy.cs
- smtppermission.cs
- QilNode.cs
- EnumUnknown.cs
- WebBaseEventKeyComparer.cs
- ContractMapping.cs
- NavigationProperty.cs
- HttpWebRequestElement.cs
- WebConfigurationManager.cs
- RegexCaptureCollection.cs
- DesignerForm.cs
- StatementContext.cs
- PackUriHelper.cs
- _NTAuthentication.cs
- PropertyChangedEventManager.cs
- SmiEventSink_Default.cs
- EditorPartChrome.cs
- InnerItemCollectionView.cs
- OptimisticConcurrencyException.cs
- OdbcHandle.cs
- MSAAWinEventWrap.cs
- AssociationType.cs
- XPathMultyIterator.cs
- HttpGetProtocolImporter.cs
- Control.cs
- BlockingCollection.cs
- RemoveStoryboard.cs
- FileDialog.cs
- ReliabilityContractAttribute.cs
- DescendantQuery.cs
- UserValidatedEventArgs.cs
- PropertyPushdownHelper.cs
- ProfileManager.cs
- CommonProperties.cs
- EntityDataSourceSelectingEventArgs.cs
- ToolboxItem.cs
- CompilerInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- IMembershipProvider.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- DesignOnlyAttribute.cs
- Stream.cs
- DecimalStorage.cs
- XmlSchemaElement.cs
- NetworkCredential.cs
- ContentControl.cs
- MexBindingElement.cs
- MarshalByRefObject.cs
- TextSelectionHighlightLayer.cs
- ResourceManager.cs
- ErrorRuntimeConfig.cs
- MeasureData.cs
- OdbcConnection.cs
- IResourceProvider.cs
- VerificationException.cs
- WebControlAdapter.cs
- PeerNameResolver.cs
- LineBreak.cs
- Pen.cs
- EmptyStringExpandableObjectConverter.cs
- FileDialog_Vista_Interop.cs
- VisualProxy.cs
- Page.cs
- TreeNodeCollection.cs
- SurrogateChar.cs
- KeyNotFoundException.cs