Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OracleLob.cs
- SqlClientWrapperSmiStream.cs
- XmlRawWriter.cs
- ShaderEffect.cs
- DataConnectionHelper.cs
- DataPointer.cs
- LicenseManager.cs
- WCFBuildProvider.cs
- IsolatedStorageFile.cs
- AsyncSerializedWorker.cs
- ToolStripItemCollection.cs
- StrokeCollection2.cs
- COAUTHIDENTITY.cs
- FocusWithinProperty.cs
- SupportsEventValidationAttribute.cs
- CollectionViewGroupInternal.cs
- MetaColumn.cs
- WinEventWrap.cs
- ColorTypeConverter.cs
- PersonalizationStateInfo.cs
- _LocalDataStore.cs
- PropertyPath.cs
- PolygonHotSpot.cs
- UIntPtr.cs
- BindableAttribute.cs
- UrlRoutingModule.cs
- TextRangeBase.cs
- XmlSerializationReader.cs
- RemoteCryptoTokenProvider.cs
- RoleServiceManager.cs
- BulletedList.cs
- GridViewRow.cs
- HebrewNumber.cs
- ImageKeyConverter.cs
- InternalConfigConfigurationFactory.cs
- StackBuilderSink.cs
- QueueSurrogate.cs
- HashSetDebugView.cs
- HtmlMeta.cs
- ActiveXContainer.cs
- ByteRangeDownloader.cs
- PerformanceCounterLib.cs
- DataGridViewElement.cs
- xml.cs
- ProcessRequestArgs.cs
- FlowDocumentPageViewerAutomationPeer.cs
- TempFiles.cs
- returneventsaver.cs
- SecurityContext.cs
- FrameworkElement.cs
- Slider.cs
- Expressions.cs
- FileDialogPermission.cs
- PaintValueEventArgs.cs
- OfTypeExpression.cs
- SByteStorage.cs
- XmlAnyAttributeAttribute.cs
- PersonalizationProviderHelper.cs
- NotifyIcon.cs
- SqlPersonalizationProvider.cs
- DependencyPropertyChangedEventArgs.cs
- DataGridViewSelectedRowCollection.cs
- BamlLocalizableResourceKey.cs
- LoaderAllocator.cs
- PointLightBase.cs
- HttpApplication.cs
- XmlSchemaResource.cs
- NegotiationTokenProvider.cs
- SqlBooleanizer.cs
- EdmToObjectNamespaceMap.cs
- FixedFlowMap.cs
- EnterpriseServicesHelper.cs
- XmlWellformedWriter.cs
- OdbcRowUpdatingEvent.cs
- ProviderBase.cs
- StackSpiller.Temps.cs
- OleDbTransaction.cs
- AuthenticationModuleElement.cs
- FreezableCollection.cs
- ColorTransform.cs
- DataSourceCache.cs
- StateChangeEvent.cs
- ToolStripComboBox.cs
- CodeSubDirectory.cs
- XmlSchemaGroup.cs
- CodeTypeConstructor.cs
- ParameterToken.cs
- webeventbuffer.cs
- BrushValueSerializer.cs
- InkCanvas.cs
- securitycriticaldata.cs
- XmlSignatureManifest.cs
- TiffBitmapEncoder.cs
- ControlParameter.cs
- NetNamedPipeBindingCollectionElement.cs
- ParserContext.cs
- ActivityDesigner.cs
- XmlSchemaElement.cs
- ExpressionParser.cs
- ListBox.cs