Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CalendarAutoFormat.cs
- InternalConfigHost.cs
- ConvertersCollection.cs
- ToolStripItemEventArgs.cs
- AttachmentCollection.cs
- TypeHelpers.cs
- WebPartZoneDesigner.cs
- DBCommand.cs
- ContentPlaceHolderDesigner.cs
- ListItemCollection.cs
- System.Data_BID.cs
- Metafile.cs
- TransactionTable.cs
- DataViewSetting.cs
- AssociatedControlConverter.cs
- MobileControlsSection.cs
- ConstructorNeedsTagAttribute.cs
- filewebrequest.cs
- XmlIterators.cs
- ModuleBuilder.cs
- ColumnWidthChangedEvent.cs
- UserControlAutomationPeer.cs
- VectorKeyFrameCollection.cs
- NameValuePair.cs
- CursorEditor.cs
- XmlParserContext.cs
- TrackingWorkflowEventArgs.cs
- Calendar.cs
- InternalUserCancelledException.cs
- BookmarkScopeInfo.cs
- ProcessHostServerConfig.cs
- Enum.cs
- XmlSchemaComplexContent.cs
- MessageHeaderAttribute.cs
- MergePropertyDescriptor.cs
- StringComparer.cs
- RelatedView.cs
- CharEntityEncoderFallback.cs
- SqlClientWrapperSmiStreamChars.cs
- BinHexDecoder.cs
- XmlSchemaSimpleTypeList.cs
- precedingsibling.cs
- EntityContainerEntitySet.cs
- QilList.cs
- SchemaCollectionCompiler.cs
- WebBaseEventKeyComparer.cs
- AsnEncodedData.cs
- mediaeventshelper.cs
- DBNull.cs
- StrokeNodeOperations2.cs
- ICspAsymmetricAlgorithm.cs
- ValidationPropertyAttribute.cs
- MultiView.cs
- CommandBindingCollection.cs
- ScrollPattern.cs
- UnitControl.cs
- ContextMenuStripActionList.cs
- QueuePathEditor.cs
- FrameworkReadOnlyPropertyMetadata.cs
- KeyMatchBuilder.cs
- JsonGlobals.cs
- LassoSelectionBehavior.cs
- TextRangeSerialization.cs
- CasesDictionary.cs
- UDPClient.cs
- ThreadAbortException.cs
- SvcMapFileLoader.cs
- ELinqQueryState.cs
- PrintPreviewControl.cs
- SmtpNegotiateAuthenticationModule.cs
- OperationPerformanceCounters.cs
- HandlerElement.cs
- PreviewPageInfo.cs
- TableLayoutStyleCollection.cs
- DataKey.cs
- SiteMapDataSource.cs
- WebEventTraceProvider.cs
- ConnectionPointGlyph.cs
- GridViewColumnHeader.cs
- DeobfuscatingStream.cs
- HttpCookiesSection.cs
- CacheMemory.cs
- CombinedTcpChannel.cs
- DataObject.cs
- OdbcHandle.cs
- BuiltInPermissionSets.cs
- MetafileHeaderWmf.cs
- _ConnectStream.cs
- EntitySetBaseCollection.cs
- Misc.cs
- BuildManager.cs
- HtmlShimManager.cs
- Merger.cs
- WindowsFormsSectionHandler.cs
- EventWaitHandleSecurity.cs
- TransactionInformation.cs
- GregorianCalendarHelper.cs
- QueuePathDialog.cs
- SchemaCollectionPreprocessor.cs
- WebPartConnectionsEventArgs.cs