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
- ResourceType.cs
- WebBrowserPermission.cs
- SmtpTransport.cs
- RemoteWebConfigurationHost.cs
- Rules.cs
- OdbcErrorCollection.cs
- EdmScalarPropertyAttribute.cs
- DataGridViewColumn.cs
- PrintPreviewGraphics.cs
- DesignerAttribute.cs
- ToolStripLabel.cs
- PartialList.cs
- DataColumnCollection.cs
- ComboBoxDesigner.cs
- DefaultWorkflowLoaderService.cs
- TemplatePropertyEntry.cs
- URLString.cs
- Style.cs
- Console.cs
- UnaryNode.cs
- NumberFormatter.cs
- Point3DConverter.cs
- Clipboard.cs
- WeakEventManager.cs
- PropertyPathConverter.cs
- DataGridColumn.cs
- SqlDataRecord.cs
- PropertyInformationCollection.cs
- ContextMenuService.cs
- DebuggerService.cs
- CollectionAdapters.cs
- ChannelFactory.cs
- PersistenceContext.cs
- EncodingNLS.cs
- VisualTreeFlattener.cs
- WebUtil.cs
- SqlDataSourceFilteringEventArgs.cs
- StreamGeometryContext.cs
- ModelTreeEnumerator.cs
- ListViewItemMouseHoverEvent.cs
- SmtpAuthenticationManager.cs
- SpellerInterop.cs
- MarkupExtensionSerializer.cs
- X509KeyIdentifierClauseType.cs
- DiagnosticTrace.cs
- LayoutDump.cs
- PageCatalogPart.cs
- DateTimeFormatInfo.cs
- PageBuildProvider.cs
- FormViewModeEventArgs.cs
- NumericExpr.cs
- SafeEventHandle.cs
- DesignColumnCollection.cs
- HtmlTextArea.cs
- Closure.cs
- TreeViewEvent.cs
- XmlHelper.cs
- TextTreeDeleteContentUndoUnit.cs
- SessionStateUtil.cs
- DictionaryMarkupSerializer.cs
- TextTreeRootNode.cs
- safesecurityhelperavalon.cs
- ProfessionalColorTable.cs
- XmlNodeList.cs
- FileDataSource.cs
- ServiceDescriptionSerializer.cs
- _NestedMultipleAsyncResult.cs
- HttpRequestContext.cs
- ToolTipService.cs
- DesignSurface.cs
- EntityTypeBase.cs
- ToolboxCategory.cs
- MD5.cs
- RichTextBox.cs
- Content.cs
- RandomNumberGenerator.cs
- SerialErrors.cs
- CellQuery.cs
- TrustLevel.cs
- MouseActionValueSerializer.cs
- StateMachineWorkflow.cs
- uribuilder.cs
- SpeechSeg.cs
- DataListItemEventArgs.cs
- Knowncolors.cs
- AnnotationResourceCollection.cs
- MDIControlStrip.cs
- JoinCqlBlock.cs
- SerializerWriterEventHandlers.cs
- SHA1.cs
- PartDesigner.cs
- ColorKeyFrameCollection.cs
- ProfileSection.cs
- ISAPIWorkerRequest.cs
- ObjectParameterCollection.cs
- HitTestWithPointDrawingContextWalker.cs
- ParagraphResult.cs
- UserValidatedEventArgs.cs
- PeerValidationBehavior.cs
- SecurityKeyIdentifier.cs