Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / WebBaseEventKeyComparer.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextCharacters.cs
- ButtonChrome.cs
- Token.cs
- XmlValidatingReaderImpl.cs
- MiniAssembly.cs
- StorageEntityContainerMapping.cs
- NullableConverter.cs
- Context.cs
- ValueUnavailableException.cs
- FastPropertyAccessor.cs
- DataContractJsonSerializerOperationFormatter.cs
- XPathExpr.cs
- CharacterString.cs
- PrintPreviewDialog.cs
- WizardStepCollectionEditor.cs
- GeneralTransform.cs
- Listbox.cs
- CultureInfoConverter.cs
- DataSourceControlBuilder.cs
- SqlDelegatedTransaction.cs
- PropertyIDSet.cs
- base64Transforms.cs
- PositiveTimeSpanValidatorAttribute.cs
- _NegoState.cs
- RadioButton.cs
- HttpUnhandledOperationInvoker.cs
- DataControlField.cs
- OpacityConverter.cs
- ContentValidator.cs
- TableFieldsEditor.cs
- ColumnHeader.cs
- HyperLinkStyle.cs
- VisualProxy.cs
- Environment.cs
- ConfigXmlCDataSection.cs
- DragAssistanceManager.cs
- ChtmlImageAdapter.cs
- CellTreeSimplifier.cs
- TimeSpanValidator.cs
- UrlUtility.cs
- ConfigurationCollectionAttribute.cs
- WorkflowExecutor.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DataTableCollection.cs
- ReflectTypeDescriptionProvider.cs
- WinFormsSpinner.cs
- UmAlQuraCalendar.cs
- IListConverters.cs
- LayoutSettings.cs
- TagNameToTypeMapper.cs
- TypeSystemProvider.cs
- ServiceOperation.cs
- GenericIdentity.cs
- compensatingcollection.cs
- Evidence.cs
- XmlFormatExtensionPointAttribute.cs
- TableAutomationPeer.cs
- IOException.cs
- BamlTreeUpdater.cs
- CompensatableSequenceActivity.cs
- MsmqChannelListenerBase.cs
- WebAdminConfigurationHelper.cs
- RestHandlerFactory.cs
- SmiMetaDataProperty.cs
- XmlEncoding.cs
- TextRangeAdaptor.cs
- PresentationUIStyleResources.cs
- DataGridTable.cs
- XmlUtf8RawTextWriter.cs
- ContextMenuAutomationPeer.cs
- CollectionView.cs
- StylusDevice.cs
- SystemPens.cs
- NumberFunctions.cs
- RemoteCryptoRsaServiceProvider.cs
- Latin1Encoding.cs
- FontFamilyIdentifier.cs
- FixedDocumentPaginator.cs
- DataBoundControlParameterTarget.cs
- TreeNodeStyle.cs
- MatrixStack.cs
- DataGridCaption.cs
- Odbc32.cs
- xdrvalidator.cs
- AuthorizationContext.cs
- SiteMapPath.cs
- ObjectDisposedException.cs
- ToolStripGripRenderEventArgs.cs
- UndoManager.cs
- GridViewCancelEditEventArgs.cs
- FontNamesConverter.cs
- ApplicationFileCodeDomTreeGenerator.cs
- PageContentCollection.cs
- VisualBrush.cs
- RijndaelCryptoServiceProvider.cs
- Assert.cs
- MatrixCamera.cs
- QueryResponse.cs
- ImageAutomationPeer.cs
- ServiceChannelManager.cs