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
- AssociationType.cs
- MultiPageTextView.cs
- Stack.cs
- InvalidOleVariantTypeException.cs
- Constants.cs
- InputDevice.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- ReadWriteObjectLock.cs
- SerializationInfoEnumerator.cs
- DataGridViewCellValueEventArgs.cs
- ProxyWebPart.cs
- FixedTextSelectionProcessor.cs
- TraceHwndHost.cs
- GridViewColumnHeaderAutomationPeer.cs
- SchemaCollectionCompiler.cs
- ResourceContainer.cs
- HostProtectionException.cs
- PingReply.cs
- CssStyleCollection.cs
- TypeUtils.cs
- WebPartsPersonalization.cs
- MarshalDirectiveException.cs
- BackStopAuthenticationModule.cs
- DocumentAutomationPeer.cs
- RequestStatusBarUpdateEventArgs.cs
- BridgeDataReader.cs
- DesignerActionUIStateChangeEventArgs.cs
- BounceEase.cs
- DesignOnlyAttribute.cs
- Listbox.cs
- Buffer.cs
- PingReply.cs
- ManipulationInertiaStartingEventArgs.cs
- DataViewSettingCollection.cs
- KnownBoxes.cs
- TypeListConverter.cs
- SafeLocalAllocation.cs
- MasterPage.cs
- InstanceDescriptor.cs
- ConfigurationStrings.cs
- LoginUtil.cs
- SecurityManager.cs
- BoolExpr.cs
- Int16AnimationUsingKeyFrames.cs
- XmlCollation.cs
- MsdtcClusterUtils.cs
- InputMethodStateTypeInfo.cs
- PageAdapter.cs
- EventHandlersStore.cs
- BeginStoryboard.cs
- DataGridTextBoxColumn.cs
- Update.cs
- ProfilePropertyNameValidator.cs
- SizeF.cs
- UInt16.cs
- GCHandleCookieTable.cs
- JavaScriptObjectDeserializer.cs
- Propagator.Evaluator.cs
- UserControl.cs
- SoapProtocolImporter.cs
- EventHandlers.cs
- IDQuery.cs
- ZoomPercentageConverter.cs
- ToolStripContainerDesigner.cs
- CompilerHelpers.cs
- DataSourceView.cs
- BypassElement.cs
- DnsEndpointIdentity.cs
- JoinCqlBlock.cs
- TargetPerspective.cs
- RangeContentEnumerator.cs
- CanonicalizationDriver.cs
- CssStyleCollection.cs
- MimeReturn.cs
- SqlDataSourceCache.cs
- ChangePassword.cs
- CaseStatementSlot.cs
- securitycriticaldataClass.cs
- DbModificationClause.cs
- TrackingRecord.cs
- RelationshipWrapper.cs
- MtomMessageEncodingElement.cs
- HttpPostClientProtocol.cs
- ConnectionProviderAttribute.cs
- _BaseOverlappedAsyncResult.cs
- VectorAnimation.cs
- OSFeature.cs
- AbstractSvcMapFileLoader.cs
- WriteTimeStream.cs
- BinHexEncoder.cs
- ScriptDescriptor.cs
- Brush.cs
- ConstraintManager.cs
- PlanCompilerUtil.cs
- Root.cs
- SafeNativeMethods.cs
- Int32AnimationUsingKeyFrames.cs
- ValueChangedEventManager.cs
- SoapFormatter.cs