Code:
/ DotNET / DotNET / 8.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
- StringDictionary.cs
- UriTemplateQueryValue.cs
- CompoundFileIOPermission.cs
- SchemaTableColumn.cs
- HostProtectionPermission.cs
- HttpPostLocalhostServerProtocol.cs
- Size3D.cs
- TransformGroup.cs
- SecureUICommand.cs
- XmlDataSourceNodeDescriptor.cs
- InvokeMethodActivity.cs
- PrintSystemException.cs
- ApplicationSecurityManager.cs
- LateBoundBitmapDecoder.cs
- ToolBar.cs
- ToggleProviderWrapper.cs
- IListConverters.cs
- PathGradientBrush.cs
- FormViewUpdatedEventArgs.cs
- UnmanagedMemoryStreamWrapper.cs
- AppDomainResourcePerfCounters.cs
- GlobalizationAssembly.cs
- XPathPatternBuilder.cs
- DefaultValueMapping.cs
- HiddenFieldPageStatePersister.cs
- DataContractJsonSerializerOperationBehavior.cs
- RenderDataDrawingContext.cs
- BinaryMessageFormatter.cs
- CollectionConverter.cs
- ConcatQueryOperator.cs
- BufferManager.cs
- ProxyWebPartManager.cs
- BinaryEditor.cs
- UserPreferenceChangingEventArgs.cs
- WindowsGrip.cs
- ComPlusServiceHost.cs
- SoapAttributeAttribute.cs
- PublishLicense.cs
- InternalBase.cs
- KeyConstraint.cs
- ItemAutomationPeer.cs
- DateTimeFormatInfoScanner.cs
- TraceProvider.cs
- PtsHelper.cs
- SequenceDesigner.xaml.cs
- NumericUpDown.cs
- Int16AnimationBase.cs
- _ConnectionGroup.cs
- TextTreeTextNode.cs
- DeviceContext2.cs
- LabelAutomationPeer.cs
- GenericTextProperties.cs
- DataReceivedEventArgs.cs
- XmlElementElement.cs
- FontInfo.cs
- ISessionStateStore.cs
- ForeignKeyConstraint.cs
- JavaScriptObjectDeserializer.cs
- _SpnDictionary.cs
- ICspAsymmetricAlgorithm.cs
- DbConnectionStringCommon.cs
- HighContrastHelper.cs
- TdsParameterSetter.cs
- SqlClientWrapperSmiStreamChars.cs
- XsdBuildProvider.cs
- DBCommand.cs
- RegexMatch.cs
- ManifestSignatureInformation.cs
- metadatamappinghashervisitor.cs
- PropertyCollection.cs
- BamlTreeUpdater.cs
- PageClientProxyGenerator.cs
- XsltSettings.cs
- XmlSchemaChoice.cs
- CounterCreationData.cs
- MessageRpc.cs
- NamespaceMapping.cs
- Span.cs
- WindowsGraphics.cs
- TableLayoutStyle.cs
- User.cs
- SafeSerializationManager.cs
- RuleSettingsCollection.cs
- EtwTrace.cs
- Freezable.cs
- Camera.cs
- FormParameter.cs
- AssemblyAttributes.cs
- CodeRemoveEventStatement.cs
- Listbox.cs
- EditorPartChrome.cs
- SevenBitStream.cs
- RangeValuePattern.cs
- TypeInitializationException.cs
- StyleModeStack.cs
- DrawListViewItemEventArgs.cs
- ServiceBusyException.cs
- SynchronizationValidator.cs
- TimerElapsedEvenArgs.cs
- MemberCollection.cs