Code:
/ FX-1434 / FX-1434 / 1.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
- Matrix3DStack.cs
- TypeReference.cs
- MenuItem.cs
- ListItemViewControl.cs
- Root.cs
- Rule.cs
- SqlFlattener.cs
- __Filters.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- WhitespaceRuleReader.cs
- LookupNode.cs
- SoapSchemaImporter.cs
- SqlCachedBuffer.cs
- WeakEventTable.cs
- QilReference.cs
- UrlPath.cs
- ActionFrame.cs
- ByteConverter.cs
- Int32Converter.cs
- TextRange.cs
- Debug.cs
- DiscoveryVersion.cs
- ValidationRule.cs
- PropertyGridView.cs
- ByteConverter.cs
- XmlWhitespace.cs
- CodeIndexerExpression.cs
- SubtreeProcessor.cs
- TextRangeAdaptor.cs
- InputLanguageCollection.cs
- Compiler.cs
- ImageAttributes.cs
- ProviderCommandInfoUtils.cs
- ResourceExpression.cs
- StandardBindingImporter.cs
- AnimationException.cs
- ContainerVisual.cs
- MasterPageParser.cs
- FreezableOperations.cs
- ExceptionUtil.cs
- BackgroundFormatInfo.cs
- TypedTableBase.cs
- RemotingException.cs
- JsonFormatGeneratorStatics.cs
- ConfigXmlWhitespace.cs
- LinearQuaternionKeyFrame.cs
- CatalogZoneBase.cs
- SmiRecordBuffer.cs
- SelectionItemProviderWrapper.cs
- LogEntryDeserializer.cs
- OledbConnectionStringbuilder.cs
- KeyValueConfigurationCollection.cs
- XmlnsCache.cs
- Avt.cs
- ProtocolElement.cs
- ExpressionPrefixAttribute.cs
- InteropBitmapSource.cs
- SR.Designer.cs
- DbProviderManifest.cs
- OptimalTextSource.cs
- TransformerConfigurationWizardBase.cs
- XPathDocumentIterator.cs
- Wizard.cs
- PrintingPermissionAttribute.cs
- BindingObserver.cs
- KeyNotFoundException.cs
- StructuralObject.cs
- EtwTrace.cs
- LeftCellWrapper.cs
- OutputCacheProfile.cs
- ActivityExecutionContextCollection.cs
- Int16.cs
- DirectoryObjectSecurity.cs
- TagPrefixInfo.cs
- TargetControlTypeAttribute.cs
- MD5.cs
- HighContrastHelper.cs
- VersionValidator.cs
- MessageHeaderDescriptionCollection.cs
- RootBrowserWindowAutomationPeer.cs
- StringSorter.cs
- EventLogEntryCollection.cs
- SByte.cs
- ValidatorCompatibilityHelper.cs
- ReliableRequestSessionChannel.cs
- Image.cs
- MexHttpsBindingCollectionElement.cs
- TextBlock.cs
- Size3D.cs
- MethodRental.cs
- PartitionedStreamMerger.cs
- CacheMemory.cs
- GridViewDeleteEventArgs.cs
- GridLengthConverter.cs
- AssociationTypeEmitter.cs
- EmptyReadOnlyDictionaryInternal.cs
- IndexedEnumerable.cs
- WindowsGraphicsWrapper.cs
- SerializationInfo.cs
- CriticalHandle.cs