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
- FilePrompt.cs
- StructuralCache.cs
- RangeValueProviderWrapper.cs
- PanelDesigner.cs
- TokenFactoryBase.cs
- XmlRawWriter.cs
- XmlReaderSettings.cs
- LongTypeConverter.cs
- ProvideValueServiceProvider.cs
- WebPartAuthorizationEventArgs.cs
- ClaimComparer.cs
- ChildTable.cs
- ProfileService.cs
- RawAppCommandInputReport.cs
- PathSegmentCollection.cs
- ParentQuery.cs
- XPathParser.cs
- BufferedWebEventProvider.cs
- TimeStampChecker.cs
- LicenseException.cs
- FormattedText.cs
- ConnectionPoint.cs
- ScriptComponentDescriptor.cs
- WebDescriptionAttribute.cs
- SelectionWordBreaker.cs
- UntypedNullExpression.cs
- ConsoleTraceListener.cs
- RowUpdatingEventArgs.cs
- JavascriptCallbackBehaviorAttribute.cs
- GridViewRowPresenterBase.cs
- DefaultClaimSet.cs
- ToolStripContainer.cs
- BrowserDefinitionCollection.cs
- NativeMethods.cs
- Padding.cs
- HttpListenerRequest.cs
- DataColumn.cs
- SimplePropertyEntry.cs
- XamlSerializerUtil.cs
- MetabaseServerConfig.cs
- ObjectMemberMapping.cs
- DataGridViewColumnCollection.cs
- BackStopAuthenticationModule.cs
- LinqDataSourceContextEventArgs.cs
- LayoutEditorPart.cs
- OrderByQueryOptionExpression.cs
- SeparatorAutomationPeer.cs
- ZoneIdentityPermission.cs
- NamedObject.cs
- DataGridDesigner.cs
- Int32RectConverter.cs
- RowTypePropertyElement.cs
- EntityObject.cs
- _SslState.cs
- SoapIncludeAttribute.cs
- IItemProperties.cs
- DataGridViewCellEventArgs.cs
- DataFormat.cs
- SystemIcmpV4Statistics.cs
- Preprocessor.cs
- CollectionBuilder.cs
- EventKeyword.cs
- CngProperty.cs
- FunctionImportMapping.cs
- ReadOnlyCollection.cs
- IEnumerable.cs
- TileBrush.cs
- XPathParser.cs
- FrugalMap.cs
- FileUpload.cs
- SqlBuffer.cs
- KeyValueConfigurationCollection.cs
- Region.cs
- OrthographicCamera.cs
- XmlSerializerNamespaces.cs
- GeometryDrawing.cs
- SystemIPGlobalProperties.cs
- Help.cs
- DesignerActionVerbList.cs
- ExtendLockCommand.cs
- oledbmetadatacollectionnames.cs
- DifferencingCollection.cs
- DataGridViewTextBoxCell.cs
- HiddenFieldDesigner.cs
- WebPartEventArgs.cs
- CodeNamespaceImport.cs
- RoutedCommand.cs
- ToolStripItem.cs
- ComboBox.cs
- Literal.cs
- Icon.cs
- Int32.cs
- ClientBuildManagerCallback.cs
- DocumentViewerBase.cs
- MonthChangedEventArgs.cs
- MarkupExtensionParser.cs
- LexicalChunk.cs
- MenuCommands.cs
- BaseServiceProvider.cs
- UIHelper.cs