Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / WebBaseEventKeyComparer.cs / 1305376 / WebBaseEventKeyComparer.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.Globalization; using System.IO; using System.Text; using System.ComponentModel; using System.Web.Hosting; using System.Web.Util; using System.Web.Configuration; using System.Web.Management; using System.Web.Compilation; internal class WebBaseEventKeyComparer : IEqualityComparer { public new bool Equals(object x, object y) { CustomWebEventKey xKey = (CustomWebEventKey)x; CustomWebEventKey yKey = (CustomWebEventKey)y; if (xKey._eventCode == yKey._eventCode && xKey._type.Equals(yKey._type)) { return true; } return false; } public int GetHashCode(object obj) { return ((CustomWebEventKey)obj)._eventCode ^ ((CustomWebEventKey)obj)._type.GetHashCode(); } public int Compare(object x, object y) { CustomWebEventKey xKey = (CustomWebEventKey)x; CustomWebEventKey yKey = (CustomWebEventKey)y; int xEventCode = xKey._eventCode; int yEventCode = yKey._eventCode; if (xEventCode == yEventCode) { Type xType = xKey._type; Type yType = yKey._type; if (xType.Equals(yType)) { return 0; } else { return Comparer.Default.Compare(xType.ToString(), yType.ToString()); } } else { if (xEventCode > yEventCode) { return 1; } else { return -1; } } } } } // 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
- PaperSize.cs
- ContentElement.cs
- SerializerProvider.cs
- SevenBitStream.cs
- Line.cs
- ScriptBehaviorDescriptor.cs
- QueryStringConverter.cs
- Vector3DValueSerializer.cs
- CodePageUtils.cs
- BoundPropertyEntry.cs
- MergePropertyDescriptor.cs
- TemplatedAdorner.cs
- CompositionAdorner.cs
- SQLSingleStorage.cs
- XmlArrayItemAttribute.cs
- DocumentXPathNavigator.cs
- XmlNodeReader.cs
- MapPathBasedVirtualPathProvider.cs
- ClusterSafeNativeMethods.cs
- MediaTimeline.cs
- _NetworkingPerfCounters.cs
- Int16Storage.cs
- MailHeaderInfo.cs
- basevalidator.cs
- ObjectDataSourceEventArgs.cs
- TreeView.cs
- SolidBrush.cs
- XmlSchemaAttributeGroupRef.cs
- TableRow.cs
- ListViewItemSelectionChangedEvent.cs
- WmlValidatorAdapter.cs
- PostBackTrigger.cs
- InputQueueChannelAcceptor.cs
- _KerberosClient.cs
- DbSourceCommand.cs
- FixedSOMLineRanges.cs
- OleServicesContext.cs
- DbProviderFactories.cs
- XmlDataImplementation.cs
- DesignerTextWriter.cs
- ConfigXmlCDataSection.cs
- GridItemPatternIdentifiers.cs
- PropertyGrid.cs
- DynamicResourceExtension.cs
- RequiredFieldValidator.cs
- EntityException.cs
- TypeForwardedToAttribute.cs
- StreamGeometryContext.cs
- CollectionBase.cs
- MessageBox.cs
- TraceSource.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- XmlUrlResolver.cs
- GridPatternIdentifiers.cs
- GcSettings.cs
- DataSourceCache.cs
- OptimizerPatterns.cs
- PrinterSettings.cs
- DataColumnPropertyDescriptor.cs
- ModuleBuilder.cs
- AttributeProviderAttribute.cs
- TextRangeBase.cs
- TextTabProperties.cs
- XPathNavigatorReader.cs
- BaseHashHelper.cs
- RequestTimeoutManager.cs
- KeyGesture.cs
- Select.cs
- LassoHelper.cs
- Oid.cs
- CodeSnippetTypeMember.cs
- CodeExpressionCollection.cs
- webeventbuffer.cs
- EastAsianLunisolarCalendar.cs
- BaseAutoFormat.cs
- DataBindingExpressionBuilder.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- HttpCacheVaryByContentEncodings.cs
- XPathItem.cs
- FixUpCollection.cs
- TextBoxRenderer.cs
- DbBuffer.cs
- _NtlmClient.cs
- GenericParameterDataContract.cs
- ShutDownListener.cs
- XmlQueryOutput.cs
- SmiEventSink_Default.cs
- SequenceQuery.cs
- AsymmetricSecurityProtocol.cs
- ImageListUtils.cs
- SqlProviderServices.cs
- TabOrder.cs
- PartialCachingAttribute.cs
- PropertyItem.cs
- EqualityArray.cs
- BamlRecordWriter.cs
- X509CertificateTrustedIssuerElementCollection.cs
- FixedStringLookup.cs
- MissingManifestResourceException.cs
- DocumentCollection.cs