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
- ProfileSettings.cs
- SqlColumnizer.cs
- MsmqChannelFactoryBase.cs
- RtfToken.cs
- regiisutil.cs
- ToolBarDesigner.cs
- DataGridViewTextBoxEditingControl.cs
- Pens.cs
- ResourceReferenceExpressionConverter.cs
- BoundConstants.cs
- WrapPanel.cs
- EdmComplexTypeAttribute.cs
- SslStream.cs
- XamlRtfConverter.cs
- HttpUnhandledOperationInvoker.cs
- RadioButtonList.cs
- Selection.cs
- CharStorage.cs
- RotateTransform3D.cs
- PixelFormat.cs
- CommandBindingCollection.cs
- XmlAttributeOverrides.cs
- ProxyManager.cs
- DictionaryChange.cs
- UnknownBitmapDecoder.cs
- KeyGesture.cs
- ParameterCollection.cs
- Button.cs
- WebPartVerb.cs
- MenuDesigner.cs
- InfoCardService.cs
- DesignTimeVisibleAttribute.cs
- _TLSstream.cs
- WebConfigurationHost.cs
- EntityStoreSchemaGenerator.cs
- XmlToDatasetMap.cs
- AppDomain.cs
- SqlConnectionString.cs
- SoapTransportImporter.cs
- SinglePhaseEnlistment.cs
- ExceptionUtil.cs
- DecoderExceptionFallback.cs
- UnauthorizedAccessException.cs
- ShapingWorkspace.cs
- HwndProxyElementProvider.cs
- MiniModule.cs
- AssociationEndMember.cs
- TextContainerChangedEventArgs.cs
- Stack.cs
- WindowsMenu.cs
- DiscoveryClientElement.cs
- CqlParser.cs
- ByteStorage.cs
- NativeRecognizer.cs
- StringFreezingAttribute.cs
- ListDataBindEventArgs.cs
- EncodingTable.cs
- FastEncoderWindow.cs
- DataKey.cs
- SynchronizedInputAdaptor.cs
- InputLanguageCollection.cs
- VersionedStream.cs
- _NetRes.cs
- HttpWebRequest.cs
- CategoryAttribute.cs
- ContractSearchPattern.cs
- Throw.cs
- RemotingAttributes.cs
- XPathSelectionIterator.cs
- SocketPermission.cs
- UInt32Converter.cs
- UnmanagedMarshal.cs
- CounterSampleCalculator.cs
- LockedHandleGlyph.cs
- DataKeyCollection.cs
- FontEditor.cs
- NameSpaceEvent.cs
- ValidationErrorEventArgs.cs
- MonikerProxyAttribute.cs
- ZoneButton.cs
- MailMessage.cs
- controlskin.cs
- SystemIPGlobalStatistics.cs
- StringValueSerializer.cs
- DurableServiceAttribute.cs
- XmlValidatingReaderImpl.cs
- TextTreeFixupNode.cs
- DataColumn.cs
- DbXmlEnabledProviderManifest.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DateRangeEvent.cs
- _HelperAsyncResults.cs
- FacetEnabledSchemaElement.cs
- InstanceDescriptor.cs
- WebPartsPersonalizationAuthorization.cs
- NonBatchDirectoryCompiler.cs
- BuildManager.cs
- DesignerForm.cs
- RoleGroup.cs
- NotifyInputEventArgs.cs