Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- JavaScriptString.cs
- SequentialOutput.cs
- GenericRootAutomationPeer.cs
- DataKeyCollection.cs
- PackWebResponse.cs
- OleDbDataAdapter.cs
- IntSecurity.cs
- RemotingServices.cs
- TextBreakpoint.cs
- TableSectionStyle.cs
- DesignerActionPanel.cs
- Span.cs
- PageHandlerFactory.cs
- AuthorizationRule.cs
- TextPointerBase.cs
- WebPartConnectionsCancelVerb.cs
- Timeline.cs
- SpotLight.cs
- OdbcStatementHandle.cs
- QueryResponse.cs
- ComponentEditorPage.cs
- CompensationHandlingFilter.cs
- PerspectiveCamera.cs
- DesignerActionVerbList.cs
- _AcceptOverlappedAsyncResult.cs
- OpCodes.cs
- ListViewCancelEventArgs.cs
- WebPartConnectionsEventArgs.cs
- CounterSampleCalculator.cs
- COM2ExtendedTypeConverter.cs
- FreezableCollection.cs
- UnsafeNativeMethods.cs
- SafeSecurityHelper.cs
- InstanceOwnerException.cs
- WindowsFormsSynchronizationContext.cs
- HtmlInputControl.cs
- FieldAccessException.cs
- Filter.cs
- StringTraceRecord.cs
- HelpKeywordAttribute.cs
- SoapSchemaMember.cs
- RectangleConverter.cs
- IpcChannel.cs
- DrawingContextDrawingContextWalker.cs
- TextElementEnumerator.cs
- IList.cs
- Literal.cs
- FontStyles.cs
- SwitchElementsCollection.cs
- ShaperBuffers.cs
- xdrvalidator.cs
- NullableFloatMinMaxAggregationOperator.cs
- WsdlHelpGeneratorElement.cs
- RSAPKCS1SignatureFormatter.cs
- StylusPointPropertyInfoDefaults.cs
- DoubleCollectionValueSerializer.cs
- RawMouseInputReport.cs
- SecurityContext.cs
- XmlText.cs
- XhtmlBasicCalendarAdapter.cs
- PeerName.cs
- RuleSetDialog.Designer.cs
- activationcontext.cs
- DesignerForm.cs
- TableRowCollection.cs
- GraphicsPathIterator.cs
- InvalidateEvent.cs
- CallbackHandler.cs
- XmlSchemaParticle.cs
- EpmSourceTree.cs
- SponsorHelper.cs
- DataGridViewHitTestInfo.cs
- SpeechEvent.cs
- SqlWriter.cs
- CoordinationService.cs
- XmlEncoding.cs
- XsltCompileContext.cs
- selecteditemcollection.cs
- SecurityTraceRecordHelper.cs
- MediaElement.cs
- ProgressPage.cs
- DynamicValueConverter.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ParserExtension.cs
- ExternalException.cs
- Decorator.cs
- BaseValidatorDesigner.cs
- LambdaCompiler.Address.cs
- TreeNodeStyle.cs
- DoubleAnimationUsingKeyFrames.cs
- RegexRunner.cs
- Utils.cs
- MemoryMappedFileSecurity.cs
- PersonalizationProvider.cs
- ListBoxChrome.cs
- LogicalTreeHelper.cs
- CompoundFileStreamReference.cs
- ControlCollection.cs
- DropDownButton.cs
- NameSpaceExtractor.cs