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
- Model3DCollection.cs
- EllipseGeometry.cs
- RotateTransform3D.cs
- BindingContext.cs
- NonVisualControlAttribute.cs
- Vector3DCollection.cs
- CollaborationHelperFunctions.cs
- HwndMouseInputProvider.cs
- HTTPNotFoundHandler.cs
- SecurityTokenRequirement.cs
- ClientUIRequest.cs
- SelectionProviderWrapper.cs
- XmlSerializerFaultFormatter.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- InvariantComparer.cs
- Fonts.cs
- WebBrowsableAttribute.cs
- CodeDOMUtility.cs
- ReadContentAsBinaryHelper.cs
- MetadataHelper.cs
- InputQueue.cs
- DiscoveryClientDuplexChannel.cs
- EdmFunctionAttribute.cs
- DataGridToolTip.cs
- SkinBuilder.cs
- FullTextBreakpoint.cs
- EntityCommandCompilationException.cs
- PointKeyFrameCollection.cs
- CustomValidator.cs
- TimeManager.cs
- IChannel.cs
- PanelStyle.cs
- SystemInformation.cs
- SQLGuidStorage.cs
- WebBrowser.cs
- FormatVersion.cs
- UnsafeNativeMethods.cs
- DtdParser.cs
- WindowsListViewGroupHelper.cs
- SecurityKeyIdentifierClause.cs
- ExpressionBindingCollection.cs
- CapabilitiesAssignment.cs
- DataException.cs
- _NetRes.cs
- ToolStripSettings.cs
- PrintController.cs
- SqlDataSourceQueryEditor.cs
- MouseBinding.cs
- EventListener.cs
- SchemaTypeEmitter.cs
- OdbcConnectionFactory.cs
- FileLogRecordEnumerator.cs
- DbProviderServices.cs
- FastPropertyAccessor.cs
- XPathDocumentNavigator.cs
- PrivateFontCollection.cs
- XmlWriterSettings.cs
- BrushMappingModeValidation.cs
- XPathNodeInfoAtom.cs
- HTMLTagNameToTypeMapper.cs
- DataKey.cs
- XmlMtomWriter.cs
- TextPointer.cs
- Vector3DAnimationBase.cs
- XmlTextReader.cs
- ConfigurationLocation.cs
- ComplexPropertyEntry.cs
- MasterPage.cs
- PackageProperties.cs
- XmlSchemaIdentityConstraint.cs
- SchemaTypeEmitter.cs
- SerialErrors.cs
- MenuStrip.cs
- SystemException.cs
- RawStylusActions.cs
- SQLBytes.cs
- FacetDescriptionElement.cs
- EntityConnection.cs
- StreamResourceInfo.cs
- RadioButtonList.cs
- HwndSubclass.cs
- XmlSchemaComplexContent.cs
- ToolStripDropDownDesigner.cs
- MenuItemBinding.cs
- SystemIPInterfaceProperties.cs
- TextRange.cs
- ReadOnlyPermissionSet.cs
- ListViewDataItem.cs
- StyleXamlParser.cs
- PointAnimation.cs
- SQLGuidStorage.cs
- UTF8Encoding.cs
- OleDbDataReader.cs
- PageParserFilter.cs
- GlobalItem.cs
- PaperSize.cs
- Operators.cs
- ArrayExtension.cs
- CustomValidator.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs