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
- SymmetricAlgorithm.cs
- CatalogPartChrome.cs
- ModelFunction.cs
- PropertyDescriptor.cs
- OrthographicCamera.cs
- ConfigPathUtility.cs
- ApplyTemplatesAction.cs
- GridViewRowEventArgs.cs
- SplitterEvent.cs
- TouchesCapturedWithinProperty.cs
- LineServicesCallbacks.cs
- QilChoice.cs
- OuterGlowBitmapEffect.cs
- MasterPageBuildProvider.cs
- SafeFileMappingHandle.cs
- InternalCache.cs
- PermissionToken.cs
- MonitorWrapper.cs
- _HelperAsyncResults.cs
- TableColumn.cs
- SuppressMergeCheckAttribute.cs
- Version.cs
- DocumentReferenceCollection.cs
- WebPartDescriptionCollection.cs
- RoleManagerModule.cs
- StyleXamlTreeBuilder.cs
- FlagPanel.cs
- Quaternion.cs
- SemanticBasicElement.cs
- XmlSignificantWhitespace.cs
- ResizeGrip.cs
- UnconditionalPolicy.cs
- DownloadProgressEventArgs.cs
- ListViewGroupConverter.cs
- BufferedConnection.cs
- MediaPlayerState.cs
- CommonXSendMessage.cs
- ImageSourceValueSerializer.cs
- CriticalFinalizerObject.cs
- MULTI_QI.cs
- SelectionWordBreaker.cs
- DeferredRunTextReference.cs
- HttpProfileGroupBase.cs
- TimeoutHelper.cs
- MultiPartWriter.cs
- CodeGenerator.cs
- MouseButton.cs
- webproxy.cs
- DbProviderConfigurationHandler.cs
- EntityParameter.cs
- WsdlBuildProvider.cs
- SuspendDesigner.cs
- ParserOptions.cs
- NonVisualControlAttribute.cs
- formatter.cs
- RotateTransform.cs
- ContextStaticAttribute.cs
- ExpressionEvaluator.cs
- ContainerControlDesigner.cs
- TrackingValidationObjectDictionary.cs
- NGCSerializationManagerAsync.cs
- View.cs
- CombinedTcpChannel.cs
- PopupRoot.cs
- PriorityItem.cs
- SettingsPropertyCollection.cs
- WebBrowserNavigatingEventHandler.cs
- IndexOutOfRangeException.cs
- IisTraceListener.cs
- AuthenticationService.cs
- DependencyProperty.cs
- HierarchicalDataBoundControl.cs
- HtmlForm.cs
- XmlWriter.cs
- JsonGlobals.cs
- CachingParameterInspector.cs
- StylusPointPropertyInfoDefaults.cs
- ComplexBindingPropertiesAttribute.cs
- DefaultTextStore.cs
- ListComponentEditorPage.cs
- baseshape.cs
- DataTrigger.cs
- ProviderSettingsCollection.cs
- DataGridPageChangedEventArgs.cs
- FormViewRow.cs
- RootAction.cs
- UnsafeNativeMethods.cs
- TreeNodeClickEventArgs.cs
- TTSVoice.cs
- GeometryCollection.cs
- IgnoreSectionHandler.cs
- GridViewSortEventArgs.cs
- ByteConverter.cs
- Emitter.cs
- DisplayMemberTemplateSelector.cs
- SqlInternalConnection.cs
- Utils.cs
- Pkcs7Signer.cs
- TargetInvocationException.cs
- ResourcesBuildProvider.cs