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
- DataGridColumnReorderingEventArgs.cs
- MsmqBindingElementBase.cs
- ResXResourceReader.cs
- Polyline.cs
- TextEditorContextMenu.cs
- CompensationDesigner.cs
- XmlDocumentViewSchema.cs
- DataTrigger.cs
- OleDbParameter.cs
- CompilationUnit.cs
- SymDocumentType.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- DbProviderConfigurationHandler.cs
- ScriptBehaviorDescriptor.cs
- DiscoveryExceptionDictionary.cs
- SoapAttributeAttribute.cs
- DataBindingCollectionConverter.cs
- MergePropertyDescriptor.cs
- NetTcpBindingCollectionElement.cs
- DesignerListAdapter.cs
- ScriptDescriptor.cs
- DetailsViewInsertEventArgs.cs
- _NestedSingleAsyncResult.cs
- RootBrowserWindowAutomationPeer.cs
- ConfigViewGenerator.cs
- TreeBuilderBamlTranslator.cs
- AssemblyAttributes.cs
- SimpleWorkerRequest.cs
- FileUtil.cs
- ParameterInfo.cs
- UnsupportedPolicyOptionsException.cs
- AuthenticationConfig.cs
- XmlC14NWriter.cs
- HttpInputStream.cs
- MethodExpr.cs
- ConfigUtil.cs
- ToolStripDesignerUtils.cs
- ResolveDuplexCD1AsyncResult.cs
- WebPartZoneBase.cs
- Stopwatch.cs
- XXXOnTypeBuilderInstantiation.cs
- DynamicEndpoint.cs
- PropertyBuilder.cs
- GradientBrush.cs
- SafeHandle.cs
- ComplexType.cs
- SequenceNumber.cs
- BaseComponentEditor.cs
- XmlSignatureManifest.cs
- DeviceSpecificDesigner.cs
- KeyboardEventArgs.cs
- DesignerDataParameter.cs
- UnicodeEncoding.cs
- WebPartDeleteVerb.cs
- Encoder.cs
- NavigatorOutput.cs
- FlowLayoutPanel.cs
- MessageQueueCriteria.cs
- InvariantComparer.cs
- DataSourceControl.cs
- HierarchicalDataSourceControl.cs
- WebPartEditorApplyVerb.cs
- ListViewGroupCollectionEditor.cs
- ToolStripContainer.cs
- ScrollViewer.cs
- HMACRIPEMD160.cs
- HelpProvider.cs
- ConfigurationValue.cs
- ObjectViewQueryResultData.cs
- Debug.cs
- TypefaceMetricsCache.cs
- ManagedWndProcTracker.cs
- TextMetrics.cs
- RequestResponse.cs
- HuffModule.cs
- SafeSecurityHelper.cs
- WindowsTitleBar.cs
- GC.cs
- X509Utils.cs
- UserPersonalizationStateInfo.cs
- PropertyEmitter.cs
- ToolStripItemClickedEventArgs.cs
- StrokeCollection2.cs
- MemoryStream.cs
- documentation.cs
- CapabilitiesSection.cs
- DropShadowBitmapEffect.cs
- PropertyGeneratedEventArgs.cs
- ClientOptions.cs
- MimeTypeMapper.cs
- XmlIterators.cs
- TextRangeAdaptor.cs
- CFGGrammar.cs
- GcHandle.cs
- VScrollBar.cs
- CompareInfo.cs
- WebPermission.cs
- WorkflowApplication.cs
- DefaultWorkflowTransactionService.cs
- DefaultPrintController.cs