Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / WebBaseEventKeyComparer.cs / 1 / 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;
}
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UnsafeNativeMethods.cs
- HtmlInputFile.cs
- TraceHandlerErrorFormatter.cs
- GetPageNumberCompletedEventArgs.cs
- coordinator.cs
- TextTreeFixupNode.cs
- ButtonFieldBase.cs
- InputLanguageProfileNotifySink.cs
- DataControlLinkButton.cs
- SqlGenerator.cs
- KeyFrames.cs
- GenerateHelper.cs
- FontCollection.cs
- DetailsViewCommandEventArgs.cs
- DataKey.cs
- MetaTable.cs
- PerformanceCountersElement.cs
- SeparatorAutomationPeer.cs
- CodeTypeOfExpression.cs
- StrokeNode.cs
- MetadataCache.cs
- FlowPosition.cs
- SmtpClient.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- StrokeFIndices.cs
- TransformerInfo.cs
- XpsThumbnail.cs
- GridView.cs
- Baml6ConstructorInfo.cs
- EarlyBoundInfo.cs
- ConfigurationHandlersInstallComponent.cs
- PolyQuadraticBezierSegment.cs
- CodeGotoStatement.cs
- WinInetCache.cs
- ScrollItemPatternIdentifiers.cs
- NavigationWindowAutomationPeer.cs
- SubMenuStyleCollection.cs
- ScrollItemPattern.cs
- DoubleLinkListEnumerator.cs
- CodeTypeDeclaration.cs
- XslAstAnalyzer.cs
- EntityDataSourceValidationException.cs
- ObjectPersistData.cs
- WindowsSysHeader.cs
- QueryContext.cs
- HttpWebRequestElement.cs
- CellParagraph.cs
- JournalEntryStack.cs
- XmlProcessingInstruction.cs
- _ServiceNameStore.cs
- DataServiceBehavior.cs
- XmlDataSourceView.cs
- FlagsAttribute.cs
- DataGridViewToolTip.cs
- ReadWriteControlDesigner.cs
- ForceCopyBuildProvider.cs
- cache.cs
- SamlAuthorityBinding.cs
- HandleTable.cs
- VisualStyleInformation.cs
- MenuItemBindingCollection.cs
- _DisconnectOverlappedAsyncResult.cs
- SearchForVirtualItemEventArgs.cs
- RtfToken.cs
- ApplicationSecurityManager.cs
- DetailsViewUpdateEventArgs.cs
- ArglessEventHandlerProxy.cs
- BuildManagerHost.cs
- TypeDependencyAttribute.cs
- LocalizableResourceBuilder.cs
- ColorTranslator.cs
- TextServicesHost.cs
- Control.cs
- HttpContext.cs
- ConfigurationValue.cs
- InternalCache.cs
- SamlAdvice.cs
- QuaternionRotation3D.cs
- DefaultAsyncDataDispatcher.cs
- ClickablePoint.cs
- VisualProxy.cs
- TimeSpanSecondsConverter.cs
- OperationSelectorBehavior.cs
- QueryOperator.cs
- ErrorActivity.cs
- DbQueryCommandTree.cs
- XmlEncodedRawTextWriter.cs
- ObjectConverter.cs
- TextFormatter.cs
- SoapAttributes.cs
- RecognizerBase.cs
- AdPostCacheSubstitution.cs
- EmptyQuery.cs
- EntityUtil.cs
- ConfigurationSchemaErrors.cs
- Base64Decoder.cs
- FileDialog.cs
- TaskForm.cs
- ListQueryResults.cs
- HttpRequest.cs