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
- RuleCache.cs
- DataServiceConfiguration.cs
- InfoCardArgumentException.cs
- CacheHelper.cs
- Range.cs
- DigitShape.cs
- CompositeDataBoundControl.cs
- RoutedEventValueSerializer.cs
- IssuanceLicense.cs
- TableAutomationPeer.cs
- ManipulationStartingEventArgs.cs
- AsymmetricSignatureDeformatter.cs
- ColumnPropertiesGroup.cs
- WindowsRegion.cs
- ObjectListSelectEventArgs.cs
- CheckedPointers.cs
- ColorPalette.cs
- UnsafeNativeMethods.cs
- InternalsVisibleToAttribute.cs
- URLString.cs
- SystemWebExtensionsSectionGroup.cs
- EntityDataSourceDataSelection.cs
- OdbcReferenceCollection.cs
- MouseGesture.cs
- FileNotFoundException.cs
- PropertyCollection.cs
- RSAPKCS1SignatureDeformatter.cs
- InstanceDataCollectionCollection.cs
- PolyBezierSegment.cs
- JournalEntry.cs
- XmlSchemas.cs
- SatelliteContractVersionAttribute.cs
- MouseGestureConverter.cs
- RadioButtonRenderer.cs
- NavigateEvent.cs
- cookiecontainer.cs
- RowToParametersTransformer.cs
- TextRenderer.cs
- ConnectivityStatus.cs
- UdpAnnouncementEndpoint.cs
- InputGestureCollection.cs
- DecimalMinMaxAggregationOperator.cs
- ScrollEvent.cs
- DataGridViewColumnCollection.cs
- Executor.cs
- HopperCache.cs
- SqlCommandSet.cs
- ToolStripPanel.cs
- XmlNavigatorStack.cs
- NavigateEvent.cs
- MapPathBasedVirtualPathProvider.cs
- FrameworkTemplate.cs
- PersonalizationProvider.cs
- DataSourceGroupCollection.cs
- EditorAttributeInfo.cs
- LabelLiteral.cs
- SpinLock.cs
- TCEAdapterGenerator.cs
- PeerApplicationLaunchInfo.cs
- JsonWriterDelegator.cs
- IndicShape.cs
- MessageSecurityProtocol.cs
- StateBag.cs
- BitmapEncoder.cs
- XmlChildNodes.cs
- CodeTypeReferenceSerializer.cs
- TrackingConditionCollection.cs
- ErrorFormatterPage.cs
- DataControlPagerLinkButton.cs
- WebPartManager.cs
- FullTextState.cs
- ObjectMaterializedEventArgs.cs
- XmlToDatasetMap.cs
- TiffBitmapEncoder.cs
- _NetworkingPerfCounters.cs
- SByteConverter.cs
- SettingsAttributes.cs
- CheckBoxAutomationPeer.cs
- AsyncOperationManager.cs
- TableProviderWrapper.cs
- ParseChildrenAsPropertiesAttribute.cs
- EntityContainer.cs
- SQLDecimalStorage.cs
- PersonalizationProvider.cs
- XmlWrappingWriter.cs
- ValueTypeFixupInfo.cs
- DesignerDataColumn.cs
- TraceUtility.cs
- MemberAccessException.cs
- EntityWithKeyStrategy.cs
- MembershipPasswordException.cs
- ItemChangedEventArgs.cs
- HashMembershipCondition.cs
- PeerToPeerException.cs
- EncodingDataItem.cs
- StreamMarshaler.cs
- XsdBuildProvider.cs
- oledbmetadatacolumnnames.cs
- SettingsPropertyWrongTypeException.cs
- PingReply.cs