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
- IPGlobalProperties.cs
- MetadataArtifactLoaderFile.cs
- SoapFaultCodes.cs
- SpStreamWrapper.cs
- AnimationStorage.cs
- InkCanvasFeedbackAdorner.cs
- Int32.cs
- FlowDocumentPageViewerAutomationPeer.cs
- BinaryObjectReader.cs
- ToolStripHighContrastRenderer.cs
- EndpointDispatcher.cs
- ImpersonationContext.cs
- ObfuscationAttribute.cs
- ConnectionsZoneDesigner.cs
- PolyBezierSegment.cs
- SimpleFieldTemplateUserControl.cs
- DataRowChangeEvent.cs
- EventLogPermissionEntry.cs
- CheckBoxAutomationPeer.cs
- BindStream.cs
- BaseParagraph.cs
- StrokeCollection2.cs
- ExternalCalls.cs
- Transform3DGroup.cs
- XmlUrlResolver.cs
- NavigateEvent.cs
- Control.cs
- LoginView.cs
- SqlWriter.cs
- FacetDescriptionElement.cs
- SettingsPropertyValue.cs
- HashFinalRequest.cs
- CssTextWriter.cs
- TemplatedMailWebEventProvider.cs
- IListConverters.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- ProtocolsSection.cs
- NonBatchDirectoryCompiler.cs
- ControlAdapter.cs
- PointAnimationUsingKeyFrames.cs
- FactoryGenerator.cs
- ElementMarkupObject.cs
- HttpCacheVaryByContentEncodings.cs
- Model3DGroup.cs
- DesignerWebPartChrome.cs
- LineSegment.cs
- Lease.cs
- COM2ComponentEditor.cs
- LoginNameDesigner.cs
- HostingPreferredMapPath.cs
- WindowsPen.cs
- SqlProcedureAttribute.cs
- CleanUpVirtualizedItemEventArgs.cs
- XhtmlBasicTextViewAdapter.cs
- VSWCFServiceContractGenerator.cs
- __Filters.cs
- UriTemplateHelpers.cs
- DataGridLinkButton.cs
- ProfileGroupSettings.cs
- CompilationPass2Task.cs
- TextureBrush.cs
- _AutoWebProxyScriptWrapper.cs
- ToolStripHighContrastRenderer.cs
- PropertyTabChangedEvent.cs
- SystemUnicastIPAddressInformation.cs
- WsdlServiceChannelBuilder.cs
- RegexFCD.cs
- CharacterString.cs
- XmlSchemaCompilationSettings.cs
- DataSourceGroupCollection.cs
- TextElementEditingBehaviorAttribute.cs
- RulePatternOps.cs
- AnimatedTypeHelpers.cs
- ComponentDispatcher.cs
- TraceLog.cs
- DataSourceSelectArguments.cs
- XslNumber.cs
- ApplyTemplatesAction.cs
- RSACryptoServiceProvider.cs
- SecurityResources.cs
- JournalEntryListConverter.cs
- MonthCalendar.cs
- VisualBasicSettingsHandler.cs
- Pkcs7Signer.cs
- LocatorPart.cs
- SRef.cs
- SimpleType.cs
- XmlStreamNodeWriter.cs
- PagesSection.cs
- DoubleConverter.cs
- Button.cs
- TypeElement.cs
- XmlnsPrefixAttribute.cs
- CounterSampleCalculator.cs
- SqlCommand.cs
- MimeTypePropertyAttribute.cs
- TypeDescriptionProvider.cs
- Point4D.cs
- TemplateColumn.cs
- CodeMemberField.cs