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
- ContravarianceAdapter.cs
- AQNBuilder.cs
- TreeViewEvent.cs
- ResourceProviderFactory.cs
- BuildProviderUtils.cs
- Block.cs
- AccessDataSource.cs
- LineSegment.cs
- OperationContractGenerationContext.cs
- Lease.cs
- DesignerSelectionListAdapter.cs
- DataGridItemEventArgs.cs
- BindStream.cs
- HostingPreferredMapPath.cs
- ExpressionBuilderContext.cs
- Bidi.cs
- TrustSection.cs
- ComPlusDiagnosticTraceSchemas.cs
- OpenFileDialog.cs
- LinqDataSourceUpdateEventArgs.cs
- TransformerInfo.cs
- FontNameConverter.cs
- SplitterDesigner.cs
- BindingMAnagerBase.cs
- ViewKeyConstraint.cs
- InputScope.cs
- XComponentModel.cs
- DataReaderContainer.cs
- ProfileModule.cs
- XmlSchemaParticle.cs
- CapabilitiesSection.cs
- IListConverters.cs
- IdentityNotMappedException.cs
- TemplatedWizardStep.cs
- UmAlQuraCalendar.cs
- XPathNodeInfoAtom.cs
- TemplatePagerField.cs
- CssClassPropertyAttribute.cs
- ObjectAssociationEndMapping.cs
- TransactionInterop.cs
- CacheOutputQuery.cs
- Int64KeyFrameCollection.cs
- Expander.cs
- ExceptionHandlers.cs
- SchemaContext.cs
- DeflateEmulationStream.cs
- WinInetCache.cs
- AQNBuilder.cs
- CodeMethodReturnStatement.cs
- TextDocumentView.cs
- ContextMenu.cs
- HeaderElement.cs
- InheritanceContextHelper.cs
- TableLayoutPanelCodeDomSerializer.cs
- OleDbException.cs
- DBSqlParserColumnCollection.cs
- Triangle.cs
- SystemIPv6InterfaceProperties.cs
- ApplicationGesture.cs
- AsnEncodedData.cs
- TheQuery.cs
- XmlToDatasetMap.cs
- GridViewRowPresenter.cs
- SqlDataSourceDesigner.cs
- BuildProviderCollection.cs
- DataGridState.cs
- XmlSchemaImport.cs
- GeneralTransform3DGroup.cs
- KeyGestureValueSerializer.cs
- Point4DConverter.cs
- ArgumentOutOfRangeException.cs
- DoubleKeyFrameCollection.cs
- AuthenticatingEventArgs.cs
- ControlCodeDomSerializer.cs
- FontStretch.cs
- RequestQueue.cs
- FieldAccessException.cs
- WindowsStartMenu.cs
- MailAddress.cs
- SynchronizedInputPattern.cs
- ChannelDispatcherCollection.cs
- DesignerVerb.cs
- ReadOnlyDataSourceView.cs
- SeverityFilter.cs
- IDataContractSurrogate.cs
- NoClickablePointException.cs
- ConfigurationLocation.cs
- ToolStripSplitButton.cs
- BamlRecords.cs
- ColumnClickEvent.cs
- WorkflowServiceBehavior.cs
- XmlQuerySequence.cs
- ControlBuilderAttribute.cs
- LayoutTable.cs
- JoinSymbol.cs
- DynamicValidatorEventArgs.cs
- GrammarBuilderPhrase.cs
- VisualStyleElement.cs
- TextParentUndoUnit.cs
- StoreItemCollection.Loader.cs