Code:
/ FX-1434 / FX-1434 / 1.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
- GridErrorDlg.cs
- Expander.cs
- StringToken.cs
- DrawToolTipEventArgs.cs
- OdbcEnvironmentHandle.cs
- EditableLabelControl.cs
- WebPartMovingEventArgs.cs
- JournalNavigationScope.cs
- ImmutablePropertyDescriptorGridEntry.cs
- SerializationFieldInfo.cs
- SmtpNetworkElement.cs
- ServiceReference.cs
- RawStylusSystemGestureInputReport.cs
- VerticalAlignConverter.cs
- PlatformNotSupportedException.cs
- DBSqlParserTable.cs
- HtmlFormWrapper.cs
- GeometryCombineModeValidation.cs
- PropertyGeneratedEventArgs.cs
- UnmanagedMemoryStream.cs
- x509store.cs
- CookieProtection.cs
- _ShellExpression.cs
- XPathNodePointer.cs
- XmlSchemaSimpleContentExtension.cs
- SequenceQuery.cs
- PointConverter.cs
- SerialStream.cs
- RightsManagementPermission.cs
- CodeVariableDeclarationStatement.cs
- XmlSchemaSimpleType.cs
- TransformDescriptor.cs
- TraceEventCache.cs
- FontCacheLogic.cs
- CursorConverter.cs
- WebBrowserHelper.cs
- AttachedAnnotation.cs
- QueuePathEditor.cs
- FunctionMappingTranslator.cs
- HebrewCalendar.cs
- PageSetupDialog.cs
- FontWeightConverter.cs
- GridProviderWrapper.cs
- TemplateControlCodeDomTreeGenerator.cs
- Converter.cs
- DataPagerFieldItem.cs
- DebugInfoGenerator.cs
- AdornerDecorator.cs
- OrderPreservingPipeliningSpoolingTask.cs
- ProviderIncompatibleException.cs
- SimpleApplicationHost.cs
- LogRecordSequence.cs
- TimelineGroup.cs
- DbConnectionPoolCounters.cs
- Perspective.cs
- TerminatorSinks.cs
- HMAC.cs
- ColorAnimationUsingKeyFrames.cs
- SizeAnimation.cs
- BuildResult.cs
- SecurityCriticalDataForSet.cs
- BlurEffect.cs
- NotifyCollectionChangedEventArgs.cs
- PersianCalendar.cs
- SqlCommandBuilder.cs
- CipherData.cs
- EventArgs.cs
- BasicExpandProvider.cs
- _Connection.cs
- Select.cs
- EventHandlingScope.cs
- DataView.cs
- XmlFormatReaderGenerator.cs
- HttpResponseInternalWrapper.cs
- Automation.cs
- CodeConstructor.cs
- DataGridHelper.cs
- EnumerableRowCollectionExtensions.cs
- CrossSiteScriptingValidation.cs
- CannotUnloadAppDomainException.cs
- ReadOnlyHierarchicalDataSource.cs
- RouteTable.cs
- Token.cs
- NameValueSectionHandler.cs
- WebEventTraceProvider.cs
- WaitHandle.cs
- PingOptions.cs
- AVElementHelper.cs
- ImpersonationContext.cs
- FormViewPageEventArgs.cs
- TextEditorSelection.cs
- EventSetter.cs
- OleDbDataAdapter.cs
- CodeDOMProvider.cs
- EntitySetBaseCollection.cs
- ComponentResourceManager.cs
- CheckoutException.cs
- ApplicationGesture.cs
- XslAst.cs
- CaseInsensitiveOrdinalStringComparer.cs