Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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
- WebContext.cs
- contentDescriptor.cs
- StateBag.cs
- PathFigureCollection.cs
- SystemNetHelpers.cs
- PackageRelationshipSelector.cs
- GenericPrincipal.cs
- CommandDevice.cs
- Pair.cs
- AppModelKnownContentFactory.cs
- DataGridViewRowStateChangedEventArgs.cs
- VisualStyleInformation.cs
- UserPreferenceChangedEventArgs.cs
- XmlChildNodes.cs
- UserControlBuildProvider.cs
- ProfileInfo.cs
- EntityCollection.cs
- DesignerActionList.cs
- Byte.cs
- ScrollBarRenderer.cs
- Line.cs
- ResourceDescriptionAttribute.cs
- StackBuilderSink.cs
- ServiceNameElement.cs
- EntityCollection.cs
- ToolboxComponentsCreatedEventArgs.cs
- Path.cs
- CopyAction.cs
- TrustLevel.cs
- AlternateViewCollection.cs
- RuntimeHandles.cs
- SessionStateSection.cs
- ToolStripControlHost.cs
- DescendantBaseQuery.cs
- QueryableFilterRepeater.cs
- SoapMessage.cs
- StateRuntime.cs
- PocoPropertyAccessorStrategy.cs
- ReflectEventDescriptor.cs
- UrlMappingsSection.cs
- ToolboxItem.cs
- TableColumn.cs
- DbMetaDataCollectionNames.cs
- Brush.cs
- AutomationProperties.cs
- URLMembershipCondition.cs
- followingquery.cs
- JapaneseCalendar.cs
- ProcessHostConfigUtils.cs
- DictionaryTraceRecord.cs
- ToolStripSplitButton.cs
- ContentElement.cs
- IgnoreDeviceFilterElement.cs
- MenuAutomationPeer.cs
- ArgumentOutOfRangeException.cs
- TreeViewHitTestInfo.cs
- RequestUriProcessor.cs
- UIElement3D.cs
- SoundPlayer.cs
- PointIndependentAnimationStorage.cs
- DataObjectEventArgs.cs
- BinaryObjectReader.cs
- bindurihelper.cs
- StreamAsIStream.cs
- SerializationInfo.cs
- ProcessModuleCollection.cs
- AudioBase.cs
- ProbeMatchesMessage11.cs
- XmlFormatExtensionPrefixAttribute.cs
- TextSegment.cs
- UrlMappingsModule.cs
- XmlElementList.cs
- OutputCacheProfile.cs
- QueryPageSettingsEventArgs.cs
- AmbientLight.cs
- AllMembershipCondition.cs
- WebControlAdapter.cs
- ContentPlaceHolder.cs
- TextElementCollectionHelper.cs
- MimeFormReflector.cs
- PropertyCollection.cs
- Floater.cs
- Style.cs
- SelectionList.cs
- ProfileSection.cs
- DefaultAuthorizationContext.cs
- WebScriptClientGenerator.cs
- Thumb.cs
- XpsSerializationManagerAsync.cs
- DispatcherExceptionFilterEventArgs.cs
- SqlMethodAttribute.cs
- SystemUdpStatistics.cs
- Main.cs
- FileDialog_Vista.cs
- WindowsFont.cs
- Compress.cs
- HttpListenerRequestUriBuilder.cs
- TiffBitmapEncoder.cs
- HttpServerVarsCollection.cs
- StickyNote.cs