Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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. // //----------------------------------------------------------------------------- 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
- ElementsClipboardData.cs
- FontFamily.cs
- OperationDescription.cs
- TabControl.cs
- EmissiveMaterial.cs
- Schema.cs
- NetSectionGroup.cs
- SqlCacheDependencyDatabase.cs
- HttpProfileGroupBase.cs
- DefaultMemberAttribute.cs
- Instrumentation.cs
- QilReplaceVisitor.cs
- CookieHandler.cs
- xsdvalidator.cs
- CodeSpit.cs
- SqlClientFactory.cs
- XsltArgumentList.cs
- EmbeddedMailObjectCollectionEditor.cs
- CookieProtection.cs
- ObjectDataSourceFilteringEventArgs.cs
- AutoCompleteStringCollection.cs
- DigestTraceRecordHelper.cs
- BamlLocalizableResource.cs
- RayHitTestParameters.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- EventLogConfiguration.cs
- ServiceSecurityAuditElement.cs
- UnsafeNetInfoNativeMethods.cs
- ZipArchive.cs
- EntityProxyTypeInfo.cs
- NumericExpr.cs
- FormViewDeleteEventArgs.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- ImageConverter.cs
- ChangeNode.cs
- StateRuntime.cs
- MenuItemCollection.cs
- ListControlConvertEventArgs.cs
- UserControlParser.cs
- XmlValidatingReader.cs
- SecurityElement.cs
- MdImport.cs
- ModuleConfigurationInfo.cs
- RoutedPropertyChangedEventArgs.cs
- Int32AnimationBase.cs
- ProviderUtil.cs
- IntegrationExceptionEventArgs.cs
- DefaultTextStore.cs
- Ipv6Element.cs
- ContainerParagraph.cs
- AtomContentProperty.cs
- WebResourceUtil.cs
- SafeEventHandle.cs
- CompressionTracing.cs
- XmlQueryTypeFactory.cs
- DbCommandDefinition.cs
- TransformerConfigurationWizardBase.cs
- DrawingCollection.cs
- WebControl.cs
- SolidBrush.cs
- ThemeDirectoryCompiler.cs
- Section.cs
- PackWebRequestFactory.cs
- Point.cs
- NetMsmqSecurityMode.cs
- ToolStripMenuItem.cs
- COM2PropertyBuilderUITypeEditor.cs
- ParameterDataSourceExpression.cs
- AutomationIdentifierGuids.cs
- IISUnsafeMethods.cs
- UnsafeNativeMethods.cs
- CustomAttribute.cs
- RegexBoyerMoore.cs
- BamlRecordHelper.cs
- GZipUtils.cs
- TogglePattern.cs
- RegexMatch.cs
- SqlColumnizer.cs
- HttpWriter.cs
- Crypto.cs
- InheritanceContextHelper.cs
- xmlfixedPageInfo.cs
- EnumType.cs
- IxmlLineInfo.cs
- SqlServices.cs
- OperationAbortedException.cs
- SiteIdentityPermission.cs
- KerberosTicketHashIdentifierClause.cs
- WebException.cs
- MoveSizeWinEventHandler.cs
- ComponentCollection.cs
- SafeRightsManagementEnvironmentHandle.cs
- TextCharacters.cs
- DesignerExtenders.cs
- ManagedCodeMarkers.cs
- CompositeDispatchFormatter.cs
- AsyncOperationManager.cs
- NavigationFailedEventArgs.cs
- MouseDevice.cs
- WeakReferenceList.cs