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
- x509utils.cs
- IdentitySection.cs
- FontConverter.cs
- DataTemplateKey.cs
- SqlDataSource.cs
- ObjectManager.cs
- ComplexTypeEmitter.cs
- SqlDataSourceRefreshSchemaForm.cs
- FolderBrowserDialog.cs
- RawTextInputReport.cs
- EdmRelationshipRoleAttribute.cs
- IdentityValidationException.cs
- QueryNode.cs
- Zone.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- PerformanceCounterCategory.cs
- DataView.cs
- GridViewColumnHeader.cs
- ViewStateChangedEventArgs.cs
- GridEntryCollection.cs
- documentation.cs
- TextSearch.cs
- ImplicitInputBrush.cs
- DataGridViewButtonColumn.cs
- TextAutomationPeer.cs
- RemotingException.cs
- Operand.cs
- DoubleLink.cs
- PropertyInfoSet.cs
- ProxyWebPartManager.cs
- ResourcePart.cs
- CollectionsUtil.cs
- DataPagerFieldCollection.cs
- DecoderNLS.cs
- TdsParser.cs
- ShimAsPublicXamlType.cs
- DirectoryInfo.cs
- ObjectStateFormatter.cs
- RecognizerStateChangedEventArgs.cs
- Misc.cs
- SerialPinChanges.cs
- PropertyPathWorker.cs
- OneWayElement.cs
- TextRenderingModeValidation.cs
- DataGridParentRows.cs
- SqlGenerator.cs
- QueryOutputWriterV1.cs
- DbException.cs
- CompositeControl.cs
- SystemInformation.cs
- DefaultSection.cs
- InputReport.cs
- DataServiceRequestOfT.cs
- MatrixTransform3D.cs
- XPathDocumentBuilder.cs
- DropShadowBitmapEffect.cs
- ServicePointManagerElement.cs
- IncrementalReadDecoders.cs
- EntityException.cs
- QueryAccessibilityHelpEvent.cs
- BulletedListEventArgs.cs
- D3DImage.cs
- SafeReadContext.cs
- PropagatorResult.cs
- ContextBase.cs
- RecognitionResult.cs
- ExpressionVisitor.cs
- ProfileGroupSettings.cs
- LiteralLink.cs
- XPathDocument.cs
- MessageSmuggler.cs
- MatrixTransform.cs
- Calendar.cs
- LocalBuilder.cs
- DataSysAttribute.cs
- XmlSchemaAttribute.cs
- RawStylusSystemGestureInputReport.cs
- Style.cs
- StrongNameKeyPair.cs
- UnaryNode.cs
- mediaeventargs.cs
- Condition.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- RichTextBox.cs
- MappingMetadataHelper.cs
- ActionFrame.cs
- HtmlElementCollection.cs
- TextRunTypographyProperties.cs
- ApplicationId.cs
- MimeWriter.cs
- SettingsPropertyCollection.cs
- PipeStream.cs
- ConditionalAttribute.cs
- XslAstAnalyzer.cs
- WebPartConnectionsEventArgs.cs
- ScrollBarAutomationPeer.cs
- DropShadowBitmapEffect.cs
- MessageBox.cs
- RecoverInstanceLocksCommand.cs
- PropertyPath.cs