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
- FontWeights.cs
- DBAsyncResult.cs
- EncoderFallback.cs
- SHA512.cs
- SplashScreen.cs
- RowToFieldTransformer.cs
- GB18030Encoding.cs
- RSAPKCS1SignatureDeformatter.cs
- AutomationPatternInfo.cs
- SearchForVirtualItemEventArgs.cs
- RouteUrlExpressionBuilder.cs
- PropertyEmitter.cs
- ProgressBarBrushConverter.cs
- Pointer.cs
- NotImplementedException.cs
- FacetDescriptionElement.cs
- ExecutedRoutedEventArgs.cs
- ReturnValue.cs
- XmlSchemaObjectTable.cs
- WebPartMovingEventArgs.cs
- Material.cs
- ApplicationHost.cs
- DeploymentExceptionMapper.cs
- ModuleBuilderData.cs
- AxisAngleRotation3D.cs
- EventArgs.cs
- ImportOptions.cs
- WmlCalendarAdapter.cs
- ObjectNavigationPropertyMapping.cs
- CSharpCodeProvider.cs
- HashJoinQueryOperatorEnumerator.cs
- safemediahandle.cs
- TcpTransportManager.cs
- WindowsListBox.cs
- Filter.cs
- LingerOption.cs
- SignedPkcs7.cs
- arabicshape.cs
- RepeaterCommandEventArgs.cs
- SystemWebSectionGroup.cs
- RegistrationServices.cs
- Misc.cs
- ExpandSegmentCollection.cs
- SrgsDocumentParser.cs
- DataSysAttribute.cs
- FormatConvertedBitmap.cs
- PlacementWorkspace.cs
- RectConverter.cs
- CancelEventArgs.cs
- RawKeyboardInputReport.cs
- OpCopier.cs
- _TLSstream.cs
- FindCriteriaCD1.cs
- DataFormat.cs
- MSAANativeProvider.cs
- SchemaElement.cs
- TypeToStringValueConverter.cs
- LassoSelectionBehavior.cs
- Listbox.cs
- ExceptionHandler.cs
- QueuePathEditor.cs
- Vector.cs
- RequestResizeEvent.cs
- XmlNullResolver.cs
- MessageEventSubscriptionService.cs
- QilValidationVisitor.cs
- OdbcEnvironmentHandle.cs
- CryptographicAttribute.cs
- XmlToDatasetMap.cs
- NativeMethods.cs
- ContextMarshalException.cs
- CanonicalizationDriver.cs
- WorkflowServiceNamespace.cs
- DataException.cs
- ParentQuery.cs
- XPathDocument.cs
- Perspective.cs
- TraceHandlerErrorFormatter.cs
- SequentialActivityDesigner.cs
- DSASignatureDeformatter.cs
- ColumnBinding.cs
- CustomTypeDescriptor.cs
- Timer.cs
- FixedTextPointer.cs
- WebBrowserNavigatingEventHandler.cs
- DetailsViewDeleteEventArgs.cs
- AppLevelCompilationSectionCache.cs
- AnnotationObservableCollection.cs
- EnlistmentState.cs
- PathSegment.cs
- AssociatedControlConverter.cs
- DispatchWrapper.cs
- SessionStateItemCollection.cs
- DocumentOrderComparer.cs
- AuthenticationModulesSection.cs
- ReaderWriterLockWrapper.cs
- HttpRequest.cs
- BooleanAnimationUsingKeyFrames.cs
- MailMessageEventArgs.cs
- ProjectionPathBuilder.cs