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
- EncryptedPackageFilter.cs
- NullableConverter.cs
- _SslState.cs
- XmlFileEditor.cs
- Adorner.cs
- AcceleratedTokenProviderState.cs
- SelectorAutomationPeer.cs
- XmlStreamNodeWriter.cs
- WorkflowOperationErrorHandler.cs
- IntMinMaxAggregationOperator.cs
- ConnectionConsumerAttribute.cs
- EntitySetDataBindingList.cs
- Deflater.cs
- DataGridCell.cs
- _IPv6Address.cs
- CodeMethodReturnStatement.cs
- ManagedFilter.cs
- HtmlInputButton.cs
- EntityModelBuildProvider.cs
- SamlNameIdentifierClaimResource.cs
- CodeStatement.cs
- GridViewRow.cs
- IDictionary.cs
- DataGridViewRow.cs
- DataGridViewCellStyleConverter.cs
- ProvidersHelper.cs
- FileIOPermission.cs
- Int16KeyFrameCollection.cs
- BitmapMetadata.cs
- WindowsListView.cs
- SimpleApplicationHost.cs
- DateTimeAutomationPeer.cs
- BackgroundWorker.cs
- SerializationInfoEnumerator.cs
- SendAgentStatusRequest.cs
- XmlUTF8TextReader.cs
- FormClosingEvent.cs
- ParallelTimeline.cs
- SwitchElementsCollection.cs
- QuotedStringFormatReader.cs
- Pair.cs
- RectangleHotSpot.cs
- PromptStyle.cs
- XamlPoint3DCollectionSerializer.cs
- HostedBindingBehavior.cs
- PackageDigitalSignature.cs
- Reference.cs
- EntityDataReader.cs
- FieldNameLookup.cs
- ErrorHandler.cs
- StorageAssociationSetMapping.cs
- OLEDB_Util.cs
- COM2Enum.cs
- InstanceBehavior.cs
- ElementNotEnabledException.cs
- BoundPropertyEntry.cs
- Main.cs
- HttpFileCollection.cs
- StateWorkerRequest.cs
- SafeEventLogWriteHandle.cs
- UnaryNode.cs
- ReliableInputConnection.cs
- HtmlTextArea.cs
- AvTrace.cs
- WindowsFormsHostPropertyMap.cs
- TableItemPattern.cs
- RoutedCommand.cs
- CallTemplateAction.cs
- NativeMethods.cs
- DBSchemaRow.cs
- EntityClassGenerator.cs
- AdministrationHelpers.cs
- ListSortDescriptionCollection.cs
- AuthenticatedStream.cs
- PropVariant.cs
- SafeCryptContextHandle.cs
- SchemaTableOptionalColumn.cs
- VoiceSynthesis.cs
- CoTaskMemUnicodeSafeHandle.cs
- SchemaNamespaceManager.cs
- HelpExampleGenerator.cs
- XamlFilter.cs
- CheckoutException.cs
- SurrogateSelector.cs
- WorkflowMarkupSerializationException.cs
- AstTree.cs
- InvalidPrinterException.cs
- BamlWriter.cs
- ObjectManager.cs
- FixedPageStructure.cs
- XmlSerializerVersionAttribute.cs
- UserControlCodeDomTreeGenerator.cs
- RuntimeTrackingProfile.cs
- GeneralTransform.cs
- Quack.cs
- DocumentReferenceCollection.cs
- PropertyChangedEventManager.cs
- MobileListItem.cs
- GridViewUpdatedEventArgs.cs
- PolyBezierSegment.cs