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
- PointLightBase.cs
- PointConverter.cs
- StringComparer.cs
- ClientConvert.cs
- PropertyPath.cs
- SqlDataSourceFilteringEventArgs.cs
- Bookmark.cs
- ZipIOExtraFieldPaddingElement.cs
- EditorPartChrome.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- ExtenderControl.cs
- SessionEndedEventArgs.cs
- CapabilitiesAssignment.cs
- PropertyFilterAttribute.cs
- PrePostDescendentsWalker.cs
- UndoManager.cs
- SQLDecimal.cs
- Soap12ServerProtocol.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- HtmlInputRadioButton.cs
- CodeTypeParameter.cs
- ParserContext.cs
- PeerApplicationLaunchInfo.cs
- OdbcEnvironmentHandle.cs
- RecognizeCompletedEventArgs.cs
- ISFTagAndGuidCache.cs
- ErasingStroke.cs
- NodeFunctions.cs
- NotifyParentPropertyAttribute.cs
- SQLDateTime.cs
- EntityContainerAssociationSet.cs
- TypeNameConverter.cs
- GradientStop.cs
- ClientEventManager.cs
- TextMarkerSource.cs
- Compensate.cs
- ListBindingConverter.cs
- DisplayInformation.cs
- EntityConnection.cs
- ColorConverter.cs
- ConfigXmlText.cs
- PackageDigitalSignature.cs
- WpfGeneratedKnownTypes.cs
- HtmlTableRowCollection.cs
- SmiContext.cs
- ZoneMembershipCondition.cs
- IndexedString.cs
- SignatureResourcePool.cs
- LayoutEvent.cs
- PresentationTraceSources.cs
- KeyValuePairs.cs
- HttpCookie.cs
- XmlResolver.cs
- StateMachineWorkflowDesigner.cs
- BitmapEffectDrawingContextWalker.cs
- ZoneMembershipCondition.cs
- ReadOnlyDataSource.cs
- ListViewSelectEventArgs.cs
- CompiledRegexRunner.cs
- DoubleAnimationUsingKeyFrames.cs
- TriggerBase.cs
- RootAction.cs
- XamlToRtfWriter.cs
- XmlSchemaSubstitutionGroup.cs
- SqlMethods.cs
- GridViewSelectEventArgs.cs
- ContourSegment.cs
- DataGridHyperlinkColumn.cs
- Parameter.cs
- UserControl.cs
- ThreadStaticAttribute.cs
- httpserverutility.cs
- SecurityAppliedMessage.cs
- autovalidator.cs
- XmlBindingWorker.cs
- SoapAttributes.cs
- SimpleBitVector32.cs
- RMEnrollmentPage3.cs
- HashAlgorithm.cs
- DocumentSchemaValidator.cs
- PixelShader.cs
- ExpressionEditorAttribute.cs
- ExplicitDiscriminatorMap.cs
- TextServicesHost.cs
- Parameter.cs
- UnsafeNativeMethods.cs
- InstancePersistenceException.cs
- TypeUnloadedException.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- RuleSetCollection.cs
- ServiceHttpHandlerFactory.cs
- CodeCommentStatement.cs
- ComboBoxAutomationPeer.cs
- ProjectionPathBuilder.cs
- EntityDataSourceQueryBuilder.cs
- PersonalizationStateInfoCollection.cs
- DataObject.cs
- SHA1CryptoServiceProvider.cs
- WinFormsSecurity.cs