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
- DateTimeUtil.cs
- TextEncodedRawTextWriter.cs
- DbParameterCollection.cs
- OleServicesContext.cs
- TextSerializer.cs
- MsmqSecureHashAlgorithm.cs
- StringWriter.cs
- PropertyValueChangedEvent.cs
- BaseComponentEditor.cs
- UnsafeNativeMethods.cs
- EntityClientCacheKey.cs
- HandlerFactoryCache.cs
- TraceUtils.cs
- RelationshipEndCollection.cs
- Brush.cs
- EventOpcode.cs
- ZipIOLocalFileDataDescriptor.cs
- XPathDescendantIterator.cs
- FilteredXmlReader.cs
- RootBrowserWindowProxy.cs
- SqlClientWrapperSmiStream.cs
- EdmValidator.cs
- RenderData.cs
- Rijndael.cs
- HtmlInputPassword.cs
- ResourceContainerWrapper.cs
- LZCodec.cs
- Scheduling.cs
- MessageDecoder.cs
- _BaseOverlappedAsyncResult.cs
- DoubleAnimationBase.cs
- FileDialog.cs
- OptimisticConcurrencyException.cs
- DescendentsWalker.cs
- XDeferredAxisSource.cs
- Debugger.cs
- IIS7WorkerRequest.cs
- FamilyMap.cs
- SQLBoolean.cs
- RichTextBoxAutomationPeer.cs
- WebPartManager.cs
- DurableEnlistmentState.cs
- TextContainerChangeEventArgs.cs
- InstancePersistence.cs
- SmiEventStream.cs
- XamlClipboardData.cs
- UriParserTemplates.cs
- DefaultWorkflowSchedulerService.cs
- UTF7Encoding.cs
- Icon.cs
- ZoneIdentityPermission.cs
- CompositeClientFormatter.cs
- PrintDocument.cs
- DeflateStream.cs
- CultureSpecificStringDictionary.cs
- LambdaValue.cs
- ExpressionVisitor.cs
- Int16Animation.cs
- UserNamePasswordClientCredential.cs
- CreateUserWizardAutoFormat.cs
- Section.cs
- ItemContainerGenerator.cs
- DropDownList.cs
- ClientRuntimeConfig.cs
- RTLAwareMessageBox.cs
- PathStreamGeometryContext.cs
- XmlTextReaderImpl.cs
- XmlSchemaSimpleTypeUnion.cs
- StrongNamePublicKeyBlob.cs
- AssociationType.cs
- WindowsButton.cs
- SiteMapSection.cs
- XmlSchemaSet.cs
- SafeJobHandle.cs
- CodeMethodInvokeExpression.cs
- PagedDataSource.cs
- LinqDataSourceStatusEventArgs.cs
- SchemaCreator.cs
- IndentedWriter.cs
- Vector3D.cs
- PreProcessor.cs
- PrintPreviewControl.cs
- ContextConfiguration.cs
- GeneratedView.cs
- FirstMatchCodeGroup.cs
- TextServicesCompartmentEventSink.cs
- UserPersonalizationStateInfo.cs
- DeclarativeCatalogPart.cs
- WrappedOptions.cs
- BufferBuilder.cs
- TextBoxLine.cs
- HtmlInputHidden.cs
- SessionStateSection.cs
- ProfessionalColors.cs
- AnimationStorage.cs
- TextDecorationCollection.cs
- EventLogPermissionAttribute.cs
- EdmType.cs
- EncoderParameters.cs
- DrawingGroupDrawingContext.cs