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
- WindowsAuthenticationModule.cs
- ListViewHitTestInfo.cs
- DiagnosticTraceSchemas.cs
- KernelTypeValidation.cs
- WorkflowOperationFault.cs
- ProtectedConfiguration.cs
- HttpWebResponse.cs
- Permission.cs
- ToolStripDropDownClosedEventArgs.cs
- DocumentsTrace.cs
- Mutex.cs
- WrapPanel.cs
- DataServiceQueryException.cs
- NonClientArea.cs
- PriorityBindingExpression.cs
- TableHeaderCell.cs
- PropertyCondition.cs
- DesignSurfaceCollection.cs
- PropertyTab.cs
- OverflowException.cs
- CompositeControlDesigner.cs
- ActivationServices.cs
- SystemIPv4InterfaceProperties.cs
- SwitchLevelAttribute.cs
- CodeThrowExceptionStatement.cs
- Panel.cs
- IdentityModelDictionary.cs
- GC.cs
- DataGridViewCheckBoxCell.cs
- Connection.cs
- ClientOptions.cs
- PopupRoot.cs
- ToolStripOverflow.cs
- Renderer.cs
- HttpChannelBindingToken.cs
- MetafileHeaderWmf.cs
- UIPropertyMetadata.cs
- CacheChildrenQuery.cs
- Atom10ItemFormatter.cs
- TextReturnReader.cs
- GeometryDrawing.cs
- UnsafeNativeMethods.cs
- DataGridView.cs
- SafeHandle.cs
- ViewManager.cs
- ObjectDataSourceStatusEventArgs.cs
- PeerTransportElement.cs
- MaskedTextBox.cs
- Model3D.cs
- XamlWriterExtensions.cs
- BinaryCommonClasses.cs
- ItemCollection.cs
- TextSchema.cs
- WebServiceData.cs
- AssemblyEvidenceFactory.cs
- DisposableCollectionWrapper.cs
- DynamicScriptObject.cs
- NamespaceExpr.cs
- Function.cs
- NavigationHelper.cs
- ReflectTypeDescriptionProvider.cs
- SmtpReplyReader.cs
- DoubleAnimation.cs
- DelegatedStream.cs
- FunctionDetailsReader.cs
- TemplateControlCodeDomTreeGenerator.cs
- TextElementCollection.cs
- SharedConnectionInfo.cs
- TreeViewHitTestInfo.cs
- ToggleButtonAutomationPeer.cs
- RtfToXamlLexer.cs
- MessageSmuggler.cs
- CompModSwitches.cs
- TextLine.cs
- WSTransactionSection.cs
- SamlConstants.cs
- PipeSecurity.cs
- SemaphoreSecurity.cs
- CompilationUtil.cs
- DelegatedStream.cs
- QueryCacheKey.cs
- TogglePattern.cs
- InstanceBehavior.cs
- DataServiceQueryProvider.cs
- ComplexBindingPropertiesAttribute.cs
- MergeLocalizationDirectives.cs
- SettingsPropertyNotFoundException.cs
- StorageBasedPackageProperties.cs
- DefaultProxySection.cs
- SymbolMethod.cs
- SR.cs
- XMLUtil.cs
- DataGridCommandEventArgs.cs
- SqlRowUpdatedEvent.cs
- UIElement3D.cs
- SortedList.cs
- SchemaElement.cs
- Request.cs
- WhitespaceReader.cs
- ObjectSet.cs