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
- XsltInput.cs
- AlternateViewCollection.cs
- NamespaceQuery.cs
- ExceptionHelpers.cs
- IisTraceWebEventProvider.cs
- Shape.cs
- ExpandableObjectConverter.cs
- EditorPart.cs
- XmlSchemaElement.cs
- SafeMemoryMappedFileHandle.cs
- ErrorHandler.cs
- _NTAuthentication.cs
- GenericRootAutomationPeer.cs
- ServiceReference.cs
- complextypematerializer.cs
- HierarchicalDataSourceConverter.cs
- KeyTime.cs
- XMLUtil.cs
- HealthMonitoringSectionHelper.cs
- ActiveXContainer.cs
- ToolStripItem.cs
- HttpProfileGroupBase.cs
- DynamicDocumentPaginator.cs
- TraceFilter.cs
- ActivitySurrogateSelector.cs
- ServicePoint.cs
- WebPageTraceListener.cs
- ChannelTraceRecord.cs
- AuthorizationRuleCollection.cs
- EllipseGeometry.cs
- DataGridAddNewRow.cs
- DispatcherEventArgs.cs
- Roles.cs
- Evidence.cs
- DataGridItemAttachedStorage.cs
- CodeRegionDirective.cs
- Domain.cs
- _HeaderInfo.cs
- Error.cs
- SynchronizationScope.cs
- ObjectDataSourceSelectingEventArgs.cs
- HierarchicalDataBoundControl.cs
- HwndHostAutomationPeer.cs
- AtomParser.cs
- SerializationEventsCache.cs
- BinaryFormatterWriter.cs
- SortKey.cs
- MissingManifestResourceException.cs
- PersianCalendar.cs
- SqlAliasesReferenced.cs
- LogSwitch.cs
- UIElement3D.cs
- diagnosticsswitches.cs
- VisualTransition.cs
- FrameworkElementAutomationPeer.cs
- Identity.cs
- ScriptResourceAttribute.cs
- DefaultBindingPropertyAttribute.cs
- ForeignConstraint.cs
- WebPartConnectionsConfigureVerb.cs
- NullEntityWrapper.cs
- Thickness.cs
- MailHeaderInfo.cs
- RadioButtonList.cs
- GuidelineCollection.cs
- AdPostCacheSubstitution.cs
- DataGridViewDataErrorEventArgs.cs
- ReachSerializableProperties.cs
- ResourceKey.cs
- IdleTimeoutMonitor.cs
- GlobalItem.cs
- TcpStreams.cs
- IApplicationTrustManager.cs
- MetadataArtifactLoaderCompositeResource.cs
- CharacterBufferReference.cs
- ISAPIApplicationHost.cs
- ColorInterpolationModeValidation.cs
- PopupRootAutomationPeer.cs
- ToggleProviderWrapper.cs
- TextSelectionHelper.cs
- HtmlElementCollection.cs
- SparseMemoryStream.cs
- TemplatePropertyEntry.cs
- SecurityToken.cs
- EventLogPermissionEntryCollection.cs
- SafeReversePInvokeHandle.cs
- ProfileWorkflowElement.cs
- smtpconnection.cs
- DrawListViewSubItemEventArgs.cs
- CodeConditionStatement.cs
- WebPartConnectionCollection.cs
- ToolboxComponentsCreatingEventArgs.cs
- followingsibling.cs
- ColorContext.cs
- XsdDuration.cs
- tibetanshape.cs
- JumpTask.cs
- RuntimeHelpers.cs
- WindowsTokenRoleProvider.cs
- QueryConverter.cs