Code:
/ FX-1434 / FX-1434 / 1.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
- BuildProviderCollection.cs
- GlobalEventManager.cs
- CurrentTimeZone.cs
- QuaternionValueSerializer.cs
- SoundPlayerAction.cs
- ProviderCommandInfoUtils.cs
- DataTableClearEvent.cs
- RegisteredArrayDeclaration.cs
- StorageModelBuildProvider.cs
- SmiMetaDataProperty.cs
- HuffmanTree.cs
- DesignerTextViewAdapter.cs
- SqlDataSourceCommandEventArgs.cs
- NTAccount.cs
- Registry.cs
- OLEDB_Util.cs
- TreeNodeCollection.cs
- TreeBuilder.cs
- XPathExpr.cs
- StickyNote.cs
- NavigationWindowAutomationPeer.cs
- IPEndPointCollection.cs
- BamlResourceContent.cs
- PrinterSettings.cs
- OneOfScalarConst.cs
- CalculatedColumn.cs
- CodeObject.cs
- RectangleGeometry.cs
- BindingMAnagerBase.cs
- CodeSnippetStatement.cs
- GregorianCalendar.cs
- EdmRelationshipRoleAttribute.cs
- OpCellTreeNode.cs
- CustomAssemblyResolver.cs
- HandlerFactoryWrapper.cs
- XmlSchemaSet.cs
- TreeNodeBindingCollection.cs
- AnonymousIdentificationSection.cs
- SmiEventSink_DeferedProcessing.cs
- FaultHandlingFilter.cs
- BooleanConverter.cs
- EntityKeyElement.cs
- DateTimeFormat.cs
- Size.cs
- If.cs
- BitmapEffectGeneralTransform.cs
- AspCompat.cs
- CalendarAutoFormatDialog.cs
- returneventsaver.cs
- AutomationPatternInfo.cs
- DiscoveryMessageSequence.cs
- GenericUI.cs
- UDPClient.cs
- MaskedTextBoxDesigner.cs
- ScrollChangedEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- AuthenticationConfig.cs
- RubberbandSelector.cs
- LabelEditEvent.cs
- GraphicsPath.cs
- _ListenerRequestStream.cs
- UnsafeNativeMethods.cs
- RequestValidator.cs
- SecurityHeader.cs
- SafeRightsManagementHandle.cs
- CompilerTypeWithParams.cs
- CssStyleCollection.cs
- MachinePropertyVariants.cs
- Region.cs
- OleDbConnection.cs
- DoWhileDesigner.xaml.cs
- Bits.cs
- WindowsScrollBarBits.cs
- TextServicesPropertyRanges.cs
- MaskDescriptor.cs
- FacetDescriptionElement.cs
- AutoResetEvent.cs
- DbDataReader.cs
- HandlerFactoryWrapper.cs
- Completion.cs
- TextInfo.cs
- Rotation3DAnimationBase.cs
- PageAsyncTask.cs
- PathTooLongException.cs
- MergeFilterQuery.cs
- LabelLiteral.cs
- isolationinterop.cs
- XmlName.cs
- OdbcRowUpdatingEvent.cs
- figurelength.cs
- WebControlAdapter.cs
- TextHintingModeValidation.cs
- MsmqInputSessionChannel.cs
- StreamingContext.cs
- HttpPostClientProtocol.cs
- TextEndOfSegment.cs
- QueueProcessor.cs
- ServiceCredentialsSecurityTokenManager.cs
- SignatureGenerator.cs
- WeakReference.cs