Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PreProcessInputEventArgs.cs
- SelectionEditor.cs
- UserMapPath.cs
- ObjectTypeMapping.cs
- DocumentPageView.cs
- WebPartAuthorizationEventArgs.cs
- PreApplicationStartMethodAttribute.cs
- sortedlist.cs
- SqlMethodAttribute.cs
- RC2.cs
- XmlCustomFormatter.cs
- CollectionMarkupSerializer.cs
- LabelTarget.cs
- ObjectConverter.cs
- AssemblyBuilder.cs
- EntityStoreSchemaGenerator.cs
- ButtonBaseAutomationPeer.cs
- Floater.cs
- Pkcs7Recipient.cs
- ProfileElement.cs
- SafeViewOfFileHandle.cs
- LoginNameDesigner.cs
- PrimitiveXmlSerializers.cs
- XmlSerializerNamespaces.cs
- DebugControllerThread.cs
- NavigationProperty.cs
- FixedSOMTable.cs
- SafeWaitHandle.cs
- ViewStateException.cs
- TreeNodeCollection.cs
- Camera.cs
- IsolatedStorageFileStream.cs
- DrawingGroupDrawingContext.cs
- SafeRegistryHandle.cs
- DataChangedEventManager.cs
- Operand.cs
- TargetFrameworkUtil.cs
- FixedTextSelectionProcessor.cs
- ProfileProvider.cs
- StylusPointDescription.cs
- CommonRemoteMemoryBlock.cs
- AttributeCollection.cs
- KeyEventArgs.cs
- SubclassTypeValidator.cs
- WindowsFormsHostPropertyMap.cs
- RightsManagementEncryptedStream.cs
- _Semaphore.cs
- VisualStyleTypesAndProperties.cs
- XPathArrayIterator.cs
- ReliabilityContractAttribute.cs
- TileModeValidation.cs
- HyperLink.cs
- DeclarationUpdate.cs
- EventProvider.cs
- ViewKeyConstraint.cs
- HttpResponseWrapper.cs
- DefaultMemberAttribute.cs
- DataGridViewTopRowAccessibleObject.cs
- DateTimeStorage.cs
- SimpleFileLog.cs
- UInt32Converter.cs
- TypeConverterHelper.cs
- ContractMethodParameterInfo.cs
- Int32Rect.cs
- UniqueConstraint.cs
- InputBinding.cs
- StrongNameKeyPair.cs
- CodeCatchClauseCollection.cs
- OleDbRowUpdatingEvent.cs
- IncomingWebRequestContext.cs
- ContainerParagraph.cs
- PropertyValueUIItem.cs
- JsonQNameDataContract.cs
- InternalBufferOverflowException.cs
- LazyTextWriterCreator.cs
- ReferencedType.cs
- ManagementEventArgs.cs
- Function.cs
- InvokeWebService.cs
- WebPartPersonalization.cs
- ObservableDictionary.cs
- CodeConstructor.cs
- AppSettingsSection.cs
- handlecollector.cs
- InvokePattern.cs
- PointAnimationUsingPath.cs
- MobileControlBuilder.cs
- EnumType.cs
- TrackPoint.cs
- MobileContainerDesigner.cs
- ResXResourceSet.cs
- hwndwrapper.cs
- SqlTransaction.cs
- datacache.cs
- MutableAssemblyCacheEntry.cs
- thaishape.cs
- PrtTicket_Editor.cs
- ListCardsInFileRequest.cs
- NonVisualControlAttribute.cs
- RoleService.cs