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
- Deserializer.cs
- GestureRecognizer.cs
- ToolStripRenderEventArgs.cs
- PiiTraceSource.cs
- IdentityModelStringsVersion1.cs
- PublishLicense.cs
- LoginCancelEventArgs.cs
- SchemaNamespaceManager.cs
- ExtendedProperty.cs
- NumberFormatInfo.cs
- MediaContextNotificationWindow.cs
- SHA256.cs
- RsaSecurityTokenParameters.cs
- TableItemPatternIdentifiers.cs
- GestureRecognizer.cs
- Stylesheet.cs
- filewebresponse.cs
- SplitContainer.cs
- SQLInt32.cs
- SplineKeyFrames.cs
- EncodingTable.cs
- ConsoleKeyInfo.cs
- HtmlInputReset.cs
- DoubleCollection.cs
- messageonlyhwndwrapper.cs
- MinimizableAttributeTypeConverter.cs
- RecordsAffectedEventArgs.cs
- TextCharacters.cs
- QueryCacheEntry.cs
- ComplexBindingPropertiesAttribute.cs
- BaseTemplateCodeDomTreeGenerator.cs
- TextReturnReader.cs
- MulticastNotSupportedException.cs
- Stopwatch.cs
- dbdatarecord.cs
- SqlTransaction.cs
- BinaryObjectWriter.cs
- ImmutablePropertyDescriptorGridEntry.cs
- SamlAuthenticationStatement.cs
- DataQuery.cs
- FixedPageAutomationPeer.cs
- BamlResourceContent.cs
- EdmProperty.cs
- VisualBasicReference.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- Rect3DConverter.cs
- GenericUI.cs
- DataGridPageChangedEventArgs.cs
- VarRefManager.cs
- ResourceReader.cs
- SR.cs
- WorkflowApplicationEventArgs.cs
- COAUTHINFO.cs
- DefaultTextStore.cs
- AssemblyCache.cs
- SqlConnection.cs
- GridLengthConverter.cs
- SmiMetaData.cs
- PageBreakRecord.cs
- NavigationCommands.cs
- DESCryptoServiceProvider.cs
- ClientSettingsSection.cs
- SyndicationDeserializer.cs
- GridViewPageEventArgs.cs
- ListViewSortEventArgs.cs
- InvokeGenerator.cs
- Utils.cs
- TabControlCancelEvent.cs
- XmlTextWriter.cs
- LifetimeServices.cs
- FormsAuthenticationModule.cs
- HtmlTableRow.cs
- MD5CryptoServiceProvider.cs
- FormsAuthenticationEventArgs.cs
- TemplateKey.cs
- UpdateCompiler.cs
- OciHandle.cs
- SafeLibraryHandle.cs
- RedistVersionInfo.cs
- Misc.cs
- PictureBox.cs
- ResetableIterator.cs
- SynchronousChannel.cs
- ProfileEventArgs.cs
- CollectionConverter.cs
- CodeMemberProperty.cs
- SchemaImporterExtensionElement.cs
- SmiTypedGetterSetter.cs
- AccessDataSource.cs
- RepeatInfo.cs
- TdsParserSessionPool.cs
- Constants.cs
- ComNativeDescriptor.cs
- AppearanceEditorPart.cs
- ExtenderProvidedPropertyAttribute.cs
- SiteMapHierarchicalDataSourceView.cs
- AssertFilter.cs
- SqlBuilder.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- XmlAttributeProperties.cs