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
- GenericTypeParameterBuilder.cs
- ToolStripSplitButton.cs
- Base64Decoder.cs
- RunWorkerCompletedEventArgs.cs
- OleDbCommandBuilder.cs
- WebPartAuthorizationEventArgs.cs
- BmpBitmapDecoder.cs
- CustomErrorsSection.cs
- CheckBoxDesigner.cs
- EventHandlers.cs
- ModelPropertyCollectionImpl.cs
- RedirectionProxy.cs
- OracleEncoding.cs
- ParsedRoute.cs
- ParentUndoUnit.cs
- DirectoryObjectSecurity.cs
- UrlPropertyAttribute.cs
- AttachmentCollection.cs
- SmtpMail.cs
- SqlConnectionStringBuilder.cs
- OuterGlowBitmapEffect.cs
- OdbcCommand.cs
- HijriCalendar.cs
- SystemParameters.cs
- CoTaskMemUnicodeSafeHandle.cs
- NetStream.cs
- TreeViewEvent.cs
- Update.cs
- SchemaAttDef.cs
- AutomationElementCollection.cs
- BeginGetFileNameFromUserRequest.cs
- ConditionalAttribute.cs
- IISUnsafeMethods.cs
- PassportAuthenticationEventArgs.cs
- cryptoapiTransform.cs
- DataSourceCache.cs
- DirectoryInfo.cs
- StructuralType.cs
- PagesChangedEventArgs.cs
- PrivateFontCollection.cs
- NotifyParentPropertyAttribute.cs
- Win32.cs
- DataObjectFieldAttribute.cs
- TextTreeRootTextBlock.cs
- WebServiceData.cs
- XmlCharCheckingReader.cs
- CreatingCookieEventArgs.cs
- PointAnimationUsingKeyFrames.cs
- SimpleTextLine.cs
- ConfigXmlAttribute.cs
- ClientCredentials.cs
- ReliableOutputConnection.cs
- AppDomain.cs
- CqlIdentifiers.cs
- CheckBoxBaseAdapter.cs
- BoundField.cs
- TextTreeTextElementNode.cs
- TextServicesCompartment.cs
- WebResourceUtil.cs
- SqlServices.cs
- NameTable.cs
- SizeConverter.cs
- ParentUndoUnit.cs
- XmlAutoDetectWriter.cs
- LogFlushAsyncResult.cs
- RuleSettingsCollection.cs
- ScriptControlManager.cs
- Form.cs
- DataServiceContext.cs
- SoapAttributeOverrides.cs
- ComponentEvent.cs
- DispatcherEventArgs.cs
- ReflectEventDescriptor.cs
- TimeStampChecker.cs
- TraceEventCache.cs
- Freezable.cs
- InputQueueChannel.cs
- ErrorInfoXmlDocument.cs
- Identifier.cs
- PnrpPermission.cs
- EntityModelSchemaGenerator.cs
- UpDownBase.cs
- HandleCollector.cs
- IncrementalHitTester.cs
- PolyBezierSegment.cs
- SiteMapProvider.cs
- ObjectMemberMapping.cs
- GregorianCalendarHelper.cs
- XamlParser.cs
- RotateTransform3D.cs
- CompositionAdorner.cs
- SQLByteStorage.cs
- DefaultEventAttribute.cs
- RegexGroup.cs
- Ray3DHitTestResult.cs
- SoapSchemaExporter.cs
- XD.cs
- CodeDomExtensionMethods.cs
- ObjectParameterCollection.cs
- BamlWriter.cs