Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / RouteItem.cs / 1305600 / RouteItem.cs
using System; namespace System.Windows { // An item in the EventRoute // // RouteItem constitutes // the target object and // list of RoutedEventHandlerInfo that need // to be invoked upon the target object internal struct RouteItem { #region Construction // Constructor for RouteItem internal RouteItem(object target, RoutedEventHandlerInfo routedEventHandlerInfo) { _target = target; _routedEventHandlerInfo = routedEventHandlerInfo; } #endregion Construction #region Operations // Returns target internal object Target { get {return _target;} } // Invokes the associated RoutedEventHandler // on the target object with the given // RoutedEventArgs internal void InvokeHandler(RoutedEventArgs routedEventArgs) { _routedEventHandlerInfo.InvokeHandler(_target, routedEventArgs); } /* Commented out to avoid "uncalled private code" fxcop violation ////// Cleanup all the references within the data /// internal void Clear() { _target = null; _routedEventHandlerInfo.Clear(); } */ ////// Is the given object equals the current /// public override bool Equals(object o) { return Equals((RouteItem)o); } ////// Is the given RouteItem equals the current /// public bool Equals(RouteItem routeItem) { return ( routeItem._target == this._target && routeItem._routedEventHandlerInfo == this._routedEventHandlerInfo); } ////// Serves as a hash function for a particular type, suitable for use in /// hashing algorithms and data structures like a hash table /// public override int GetHashCode() { return base.GetHashCode(); } ////// Equals operator overload /// public static bool operator== (RouteItem routeItem1, RouteItem routeItem2) { return routeItem1.Equals(routeItem2); } ////// NotEquals operator overload /// public static bool operator!= (RouteItem routeItem1, RouteItem routeItem2) { return !routeItem1.Equals(routeItem2); } #endregion Operations #region Data private object _target; private RoutedEventHandlerInfo _routedEventHandlerInfo; #endregion Data } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigurationLocation.cs
- SqlBuilder.cs
- SpotLight.cs
- WindowsListViewGroupHelper.cs
- HebrewCalendar.cs
- DriveNotFoundException.cs
- FloaterBaseParaClient.cs
- ServiceDocumentFormatter.cs
- XmlnsCache.cs
- DbSetClause.cs
- Console.cs
- FilteredDataSetHelper.cs
- CqlIdentifiers.cs
- NamespaceDecl.cs
- ComPlusDiagnosticTraceRecords.cs
- Bidi.cs
- ConfigurationSchemaErrors.cs
- CancellationHandlerDesigner.cs
- Line.cs
- XmlHierarchyData.cs
- XPathException.cs
- LogEntryHeaderSerializer.cs
- HttpClientCertificate.cs
- CommandSet.cs
- EntityClientCacheEntry.cs
- HtmlWindowCollection.cs
- SessionStateUtil.cs
- TdsParserStaticMethods.cs
- StatusBarItemAutomationPeer.cs
- PropVariant.cs
- FormattedText.cs
- RtfFormatStack.cs
- GlyphRun.cs
- DocumentReference.cs
- TranslateTransform.cs
- FixedBufferAttribute.cs
- SqlDataRecord.cs
- IImplicitResourceProvider.cs
- DataKey.cs
- RequestedSignatureDialog.cs
- RectIndependentAnimationStorage.cs
- PersonalizationProviderHelper.cs
- WindowHideOrCloseTracker.cs
- BamlLocalizationDictionary.cs
- StateDesigner.Layouts.cs
- QueryCursorEventArgs.cs
- rsa.cs
- KnownTypes.cs
- SimpleHandlerBuildProvider.cs
- RectangleConverter.cs
- DateTimeAutomationPeer.cs
- TextEncodedRawTextWriter.cs
- DynamicDataRoute.cs
- BrowserTree.cs
- CommentEmitter.cs
- TransformCryptoHandle.cs
- DocumentPage.cs
- XmlWrappingReader.cs
- Font.cs
- SerializeAbsoluteContext.cs
- SimpleType.cs
- UnionCqlBlock.cs
- DataServices.cs
- ComUdtElement.cs
- DataGridViewTopRowAccessibleObject.cs
- DragCompletedEventArgs.cs
- NonBatchDirectoryCompiler.cs
- diagnosticsswitches.cs
- HttpRequestBase.cs
- DbMetaDataColumnNames.cs
- SqlBinder.cs
- XmlIlVisitor.cs
- RevocationPoint.cs
- Win32.cs
- MouseWheelEventArgs.cs
- DeploymentSectionCache.cs
- PenContexts.cs
- TreeViewEvent.cs
- UserNamePasswordValidator.cs
- ToolStripPanelRenderEventArgs.cs
- ItemContainerGenerator.cs
- XmlBinaryReader.cs
- DoubleCollectionValueSerializer.cs
- DataGridViewColumnCollectionDialog.cs
- InnerItemCollectionView.cs
- Application.cs
- XmlChildEnumerator.cs
- AssemblyInfo.cs
- GetChildSubtree.cs
- PropertySourceInfo.cs
- dbdatarecord.cs
- ComplexBindingPropertiesAttribute.cs
- ValidationPropertyAttribute.cs
- MessageEnumerator.cs
- CreateDataSourceDialog.cs
- EventLogStatus.cs
- HttpBrowserCapabilitiesWrapper.cs
- RayMeshGeometry3DHitTestResult.cs
- DataTableReader.cs
- OSFeature.cs