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
- FixUp.cs
- WebConfigurationManager.cs
- LinqDataSourceContextEventArgs.cs
- EmulateRecognizeCompletedEventArgs.cs
- EventLogTraceListener.cs
- AssociationType.cs
- HybridObjectCache.cs
- Root.cs
- ConnectionStringsExpressionBuilder.cs
- ResourceDefaultValueAttribute.cs
- EndOfStreamException.cs
- ExpressionBuilderContext.cs
- NavigationService.cs
- CounterSetInstanceCounterDataSet.cs
- ProcessModuleCollection.cs
- WindowsFormsEditorServiceHelper.cs
- MetadataArtifactLoaderCompositeResource.cs
- FieldDescriptor.cs
- TimeIntervalCollection.cs
- StylusTip.cs
- GenericEnumConverter.cs
- storepermission.cs
- ItemType.cs
- DelegatingTypeDescriptionProvider.cs
- ObjectListCommandEventArgs.cs
- ResumeStoryboard.cs
- CommandBinding.cs
- ProfileGroupSettings.cs
- SetIterators.cs
- MailBnfHelper.cs
- CheckBoxField.cs
- StrongNameUtility.cs
- PersistenceTypeAttribute.cs
- ServiceThrottlingBehavior.cs
- AttributeUsageAttribute.cs
- NotSupportedException.cs
- ConnectionPoolManager.cs
- BaseCodePageEncoding.cs
- PackageStore.cs
- TreeViewEvent.cs
- SqlProviderManifest.cs
- CookieProtection.cs
- AssignDesigner.xaml.cs
- ProfileInfo.cs
- UrlMappingsSection.cs
- LongValidator.cs
- NavigationCommands.cs
- DataSourceXmlTextReader.cs
- GlyphRun.cs
- SerializerWriterEventHandlers.cs
- HttpResponse.cs
- PreservationFileReader.cs
- TransactedReceiveData.cs
- TabItemAutomationPeer.cs
- ConstNode.cs
- SynchronizedInputProviderWrapper.cs
- AlternateViewCollection.cs
- SymbolEqualComparer.cs
- LoadRetryAsyncResult.cs
- WebPartVerb.cs
- TextSelectionHighlightLayer.cs
- filewebresponse.cs
- DataGridViewColumnStateChangedEventArgs.cs
- SubstitutionResponseElement.cs
- CatalogZone.cs
- Typography.cs
- StateManagedCollection.cs
- ChannelManager.cs
- HexParser.cs
- XhtmlBasicPhoneCallAdapter.cs
- CodeSnippetCompileUnit.cs
- SafeFreeMibTable.cs
- WindowsSolidBrush.cs
- Quad.cs
- ItemCollection.cs
- TypeDefinition.cs
- Parameter.cs
- CryptoKeySecurity.cs
- Substitution.cs
- QueryStringParameter.cs
- DataColumnChangeEvent.cs
- SettingsPropertyNotFoundException.cs
- SelectionUIHandler.cs
- TypeSource.cs
- DrawingAttributes.cs
- LogLogRecordHeader.cs
- ScrollItemProviderWrapper.cs
- UIElement3D.cs
- XmlSchemaAll.cs
- SystemUnicastIPAddressInformation.cs
- ToolboxItemFilterAttribute.cs
- WebPartEditorCancelVerb.cs
- DataGridDetailsPresenterAutomationPeer.cs
- PathGeometry.cs
- DirectoryNotFoundException.cs
- HandleRef.cs
- TextRangeSerialization.cs
- CodeObject.cs
- AxisAngleRotation3D.cs
- DesignBindingEditor.cs