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
- TemplateControl.cs
- UserNameSecurityTokenParameters.cs
- GenericAuthenticationEventArgs.cs
- xsdvalidator.cs
- VerificationAttribute.cs
- SQLStringStorage.cs
- CallbackValidatorAttribute.cs
- BaseInfoTable.cs
- ClassicBorderDecorator.cs
- Rect3D.cs
- LineSegment.cs
- NativeObjectSecurity.cs
- ReferencedCollectionType.cs
- MetadataException.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- MemoryPressure.cs
- SslStream.cs
- FileRecordSequence.cs
- Parameter.cs
- SqlReorderer.cs
- SrgsRulesCollection.cs
- WorkflowInstanceProvider.cs
- HtmlShim.cs
- LocalClientSecuritySettingsElement.cs
- ApplicationServiceHelper.cs
- MetadataProperty.cs
- WebPartDisplayModeCancelEventArgs.cs
- WindowsTreeView.cs
- PositiveTimeSpanValidatorAttribute.cs
- PageTheme.cs
- FontStyleConverter.cs
- _NetworkingPerfCounters.cs
- ObjectTokenCategory.cs
- TextBox.cs
- TextRange.cs
- X509CertificateClaimSet.cs
- SecureStringHasher.cs
- ProtocolsSection.cs
- MenuScrollingVisibilityConverter.cs
- WebBrowserUriTypeConverter.cs
- ProxyRpc.cs
- TransformDescriptor.cs
- XmlDataSourceView.cs
- CollectionViewSource.cs
- WebRequestModulesSection.cs
- StylusDownEventArgs.cs
- MatrixAnimationBase.cs
- NullRuntimeConfig.cs
- SymmetricKey.cs
- QuaternionRotation3D.cs
- _LazyAsyncResult.cs
- GuidelineCollection.cs
- XamlTypeMapper.cs
- StreamMarshaler.cs
- ResourceCategoryAttribute.cs
- ParentControlDesigner.cs
- AssemblyName.cs
- HScrollProperties.cs
- ChangePassword.cs
- FileBasedResourceGroveler.cs
- XmlQueryRuntime.cs
- httpstaticobjectscollection.cs
- DescendantOverDescendantQuery.cs
- DbConnectionClosed.cs
- ButtonBase.cs
- storepermissionattribute.cs
- SoapIgnoreAttribute.cs
- ToolStripStatusLabel.cs
- StylusPointPropertyUnit.cs
- BlurBitmapEffect.cs
- BrowserDefinitionCollection.cs
- InputMethodStateTypeInfo.cs
- JournalEntry.cs
- FunctionImportMapping.cs
- Page.cs
- ReflectionServiceProvider.cs
- MemberExpressionHelper.cs
- SequentialWorkflowHeaderFooter.cs
- ConvertEvent.cs
- SelectionProcessor.cs
- PageContent.cs
- Int32CAMarshaler.cs
- NotSupportedException.cs
- DataGridViewRowPrePaintEventArgs.cs
- BooleanExpr.cs
- VariableBinder.cs
- ListControlDataBindingHandler.cs
- DataGridItem.cs
- SignedPkcs7.cs
- XmlBoundElement.cs
- DependencyObject.cs
- XmlWrappingWriter.cs
- DataControlFieldCell.cs
- COM2PictureConverter.cs
- DataServicePagingProviderWrapper.cs
- DbConnectionPool.cs
- FlowDocumentView.cs
- WorkflowNamespace.cs
- SpellerStatusTable.cs
- TransformValueSerializer.cs