Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ScriptServiceAttribute.cs
- MILUtilities.cs
- FollowerQueueCreator.cs
- UIElementIsland.cs
- RowToParametersTransformer.cs
- WindowsGraphics2.cs
- storagemappingitemcollection.viewdictionary.cs
- Int16Animation.cs
- ObjectSet.cs
- RbTree.cs
- CacheVirtualItemsEvent.cs
- RowParagraph.cs
- HttpConfigurationSystem.cs
- SecurityContextKeyIdentifierClause.cs
- _ProxyChain.cs
- EntityParameter.cs
- IdentifierService.cs
- QueryOutputWriterV1.cs
- ApplicationHost.cs
- __Filters.cs
- ExceptionTrace.cs
- WsatProxy.cs
- Image.cs
- IteratorFilter.cs
- CodeStatement.cs
- SecurityElement.cs
- TimelineClockCollection.cs
- TriState.cs
- Menu.cs
- BitConverter.cs
- CommonProperties.cs
- PropertiesTab.cs
- LinqDataSource.cs
- CuspData.cs
- columnmapfactory.cs
- SignatureHelper.cs
- NamedPipeAppDomainProtocolHandler.cs
- CryptoApi.cs
- OutOfMemoryException.cs
- Row.cs
- HttpModulesSection.cs
- CompleteWizardStep.cs
- EntitySqlQueryBuilder.cs
- SafeSecurityHandles.cs
- GeometryDrawing.cs
- StrongNameUtility.cs
- TreeViewAutomationPeer.cs
- IxmlLineInfo.cs
- PropertyPathConverter.cs
- GlyphInfoList.cs
- RequestResizeEvent.cs
- ScriptingSectionGroup.cs
- DataControlFieldHeaderCell.cs
- EntityDataSourceChangedEventArgs.cs
- TargetException.cs
- Page.cs
- CompilerCollection.cs
- BindingFormattingDialog.cs
- GroupLabel.cs
- DynamicRouteExpression.cs
- SystemPens.cs
- AuthorizationSection.cs
- DetailsViewDeletedEventArgs.cs
- URLString.cs
- GeneralTransform2DTo3D.cs
- DependencyPropertyAttribute.cs
- HttpTransportSecurity.cs
- WmlCommandAdapter.cs
- MethodImplAttribute.cs
- ModelItem.cs
- DataRecordObjectView.cs
- ResourceContainerWrapper.cs
- xml.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- LoginName.cs
- CodeAttributeArgumentCollection.cs
- WebCategoryAttribute.cs
- ContentValidator.cs
- DataView.cs
- XmlAtomicValue.cs
- CultureSpecificStringDictionary.cs
- StorageComplexPropertyMapping.cs
- FilteredSchemaElementLookUpTable.cs
- ProviderSettings.cs
- BaseTemplatedMobileComponentEditor.cs
- FieldNameLookup.cs
- ListViewGroupConverter.cs
- EntityViewGenerationAttribute.cs
- IndicCharClassifier.cs
- EtwTrace.cs
- CodeAttributeDeclarationCollection.cs
- XmlCodeExporter.cs
- GridItemPatternIdentifiers.cs
- UserControlAutomationPeer.cs
- KeyInfo.cs
- SqlParameterizer.cs
- MemberRelationshipService.cs
- MetadataCache.cs
- NullReferenceException.cs
- MarkupExtensionParser.cs