Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / RouteItem.cs / 1 / 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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlAttributeHolder.cs
- MultipleViewProviderWrapper.cs
- ResolveNameEventArgs.cs
- ToolboxItemFilterAttribute.cs
- ISAPIRuntime.cs
- Marshal.cs
- EqualityArray.cs
- DependencyPropertyDescriptor.cs
- StylusPlugin.cs
- ThrowHelper.cs
- UnSafeCharBuffer.cs
- MetadataSource.cs
- DbConnectionClosed.cs
- SchemaTableOptionalColumn.cs
- CmsInterop.cs
- VisualStyleInformation.cs
- HandlerBase.cs
- DataGridViewBand.cs
- WinEventTracker.cs
- TreeViewItem.cs
- FullTextLine.cs
- MetadataCache.cs
- PkcsUtils.cs
- ZipIOCentralDirectoryFileHeader.cs
- Point4D.cs
- PartialTrustValidationBehavior.cs
- DataPagerField.cs
- TranslateTransform3D.cs
- ResourceWriter.cs
- FormViewModeEventArgs.cs
- HandlerFactoryCache.cs
- InitializationEventAttribute.cs
- DecimalStorage.cs
- bidPrivateBase.cs
- SqlUtils.cs
- ADRoleFactoryConfiguration.cs
- PeerNameRegistration.cs
- PeerNameRecordCollection.cs
- SecurityElement.cs
- RectAnimationClockResource.cs
- XmlSchemaImporter.cs
- RoleServiceManager.cs
- CodeDirectoryCompiler.cs
- AspCompat.cs
- CatchBlock.cs
- BStrWrapper.cs
- GuidTagList.cs
- ToolStrip.cs
- StrokeCollection.cs
- TextBoxBase.cs
- DependencyPropertyConverter.cs
- ProgressChangedEventArgs.cs
- ToolStripDropDownClosedEventArgs.cs
- Security.cs
- sapiproxy.cs
- SecurityUtils.cs
- Matrix.cs
- XPathNodeIterator.cs
- TrackingDataItem.cs
- _NestedMultipleAsyncResult.cs
- OutputCacheSettings.cs
- DataGridViewCellStateChangedEventArgs.cs
- SqlUDTStorage.cs
- MD5.cs
- CalendarSelectionChangedEventArgs.cs
- PageStatePersister.cs
- StringReader.cs
- PrintControllerWithStatusDialog.cs
- CookieParameter.cs
- SafeProcessHandle.cs
- SchemaNamespaceManager.cs
- MultiBinding.cs
- PrimitiveXmlSerializers.cs
- TlsnegoTokenProvider.cs
- CorrelationExtension.cs
- StringInfo.cs
- ConnectionPoint.cs
- XmlCodeExporter.cs
- OrderedHashRepartitionEnumerator.cs
- OutputCacheProfile.cs
- PropertyCondition.cs
- ContentDesigner.cs
- ExpressionPrefixAttribute.cs
- NonSerializedAttribute.cs
- EncoderParameter.cs
- TextEditorSelection.cs
- InputElement.cs
- WebBrowser.cs
- Multiply.cs
- SelectionEditor.cs
- IIS7UserPrincipal.cs
- ApplicationException.cs
- ChangeInterceptorAttribute.cs
- ScopedKnownTypes.cs
- SqlColumnizer.cs
- Mappings.cs
- QilGenerator.cs
- AuthenticationModulesSection.cs
- NonClientArea.cs
- OdbcException.cs