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
- EditorPart.cs
- XmlSerializationReader.cs
- OAVariantLib.cs
- ExtendedProperty.cs
- Transform.cs
- AnimationLayer.cs
- OrderByQueryOptionExpression.cs
- serverconfig.cs
- X509AsymmetricSecurityKey.cs
- MenuAutoFormat.cs
- FontEmbeddingManager.cs
- Transform.cs
- TemplateBuilder.cs
- CompositeCollection.cs
- HtmlSelect.cs
- HierarchicalDataBoundControlAdapter.cs
- SamlAuthorizationDecisionClaimResource.cs
- BuildManagerHost.cs
- ApplicationServicesHostFactory.cs
- DataMemberConverter.cs
- MembershipUser.cs
- MailAddressParser.cs
- ObjectDataSourceSelectingEventArgs.cs
- Group.cs
- ToolStripDesigner.cs
- MsmqInputMessagePool.cs
- Substitution.cs
- Debugger.cs
- ClientConfigurationHost.cs
- DetailsViewDeletedEventArgs.cs
- FileLevelControlBuilderAttribute.cs
- NaturalLanguageHyphenator.cs
- Baml2006ReaderContext.cs
- WebBrowserUriTypeConverter.cs
- Point3DKeyFrameCollection.cs
- WebServiceResponseDesigner.cs
- WCFServiceClientProxyGenerator.cs
- IgnoreFileBuildProvider.cs
- _AutoWebProxyScriptHelper.cs
- PathFigureCollection.cs
- ParserContext.cs
- ReferencedAssemblyResolver.cs
- VisualState.cs
- XmlChildNodes.cs
- RowParagraph.cs
- Hyperlink.cs
- HitTestDrawingContextWalker.cs
- LinqDataSourceInsertEventArgs.cs
- RuntimeHandles.cs
- PageStatePersister.cs
- MultiSelector.cs
- WpfGeneratedKnownProperties.cs
- ConstructorBuilder.cs
- ReceiveMessageRecord.cs
- LicenseProviderAttribute.cs
- ConfigurationManagerHelperFactory.cs
- XmlSchemaComplexContentRestriction.cs
- HttpCacheParams.cs
- ActivityInterfaces.cs
- BitConverter.cs
- SizeF.cs
- XmlCDATASection.cs
- BamlReader.cs
- ConfigurationValidatorBase.cs
- DataGridItemEventArgs.cs
- WebPartEditorCancelVerb.cs
- AssemblyBuilder.cs
- ObjectManager.cs
- SqlUserDefinedAggregateAttribute.cs
- AllMembershipCondition.cs
- TableColumnCollection.cs
- ListMarkerLine.cs
- PropertyIDSet.cs
- SelectionManager.cs
- BaseTreeIterator.cs
- VScrollBar.cs
- EntitySetBaseCollection.cs
- SymLanguageVendor.cs
- SecurityPermission.cs
- AccessDataSourceView.cs
- VisualCollection.cs
- DefaultBinder.cs
- DataSourceViewSchemaConverter.cs
- XmlKeywords.cs
- OleDragDropHandler.cs
- CultureInfoConverter.cs
- WebConfigurationHost.cs
- Avt.cs
- ContentFileHelper.cs
- BaseTemplateBuildProvider.cs
- Metafile.cs
- URLMembershipCondition.cs
- StorageFunctionMapping.cs
- WebBrowserEvent.cs
- HttpWebResponse.cs
- Nullable.cs
- Bits.cs
- BamlBinaryReader.cs
- XmlNamedNodeMap.cs
- GridViewHeaderRowPresenter.cs