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
- UnsafeNativeMethods.cs
- XmlReflectionMember.cs
- NonParentingControl.cs
- _SpnDictionary.cs
- TagNameToTypeMapper.cs
- WebRequestModuleElementCollection.cs
- PolicyException.cs
- MarkerProperties.cs
- COM2TypeInfoProcessor.cs
- EdmComplexTypeAttribute.cs
- HotSpot.cs
- UriTemplateVariableQueryValue.cs
- WebPartConnection.cs
- ListViewSelectEventArgs.cs
- AssemblyBuilder.cs
- Int32CAMarshaler.cs
- FixedFlowMap.cs
- AnalyzedTree.cs
- HandlerBase.cs
- Timer.cs
- AdCreatedEventArgs.cs
- DependencyObject.cs
- ElapsedEventArgs.cs
- storepermission.cs
- NamespaceQuery.cs
- ContextStaticAttribute.cs
- WindowsTokenRoleProvider.cs
- MimeParameter.cs
- MutexSecurity.cs
- WhereQueryOperator.cs
- URLBuilder.cs
- ButtonBaseAdapter.cs
- UserControlAutomationPeer.cs
- RelationshipEndMember.cs
- LoginView.cs
- SHA384.cs
- Literal.cs
- ExpanderAutomationPeer.cs
- FastEncoder.cs
- RecommendedAsConfigurableAttribute.cs
- BitmapEffectDrawingContextState.cs
- EntityConnection.cs
- DataServiceQueryException.cs
- WebPartConnection.cs
- InvalidPrinterException.cs
- XmlNavigatorStack.cs
- SmtpCommands.cs
- WebControl.cs
- CancellationHandlerDesigner.cs
- HebrewCalendar.cs
- SecurityContextTokenValidationException.cs
- SerializationException.cs
- TableCell.cs
- _UncName.cs
- LineMetrics.cs
- SqlConnectionPoolProviderInfo.cs
- PaginationProgressEventArgs.cs
- ITreeGenerator.cs
- CommonDialog.cs
- AppDomainFactory.cs
- FlowLayout.cs
- IPCCacheManager.cs
- CompiledIdentityConstraint.cs
- WizardPanel.cs
- InputQueue.cs
- XmlSerializerNamespaces.cs
- HttpContext.cs
- Size3D.cs
- ParserExtension.cs
- HtmlTableRowCollection.cs
- CursorConverter.cs
- PersonalizationStateInfoCollection.cs
- DeferredElementTreeState.cs
- Glyph.cs
- WorkflowServiceBehavior.cs
- SafeArrayRankMismatchException.cs
- SafeArrayRankMismatchException.cs
- ActivityXRefConverter.cs
- StandardRuntimeEnumValidator.cs
- SQLBytesStorage.cs
- WebResponse.cs
- XamlSerializationHelper.cs
- MetafileHeaderEmf.cs
- ScaleTransform.cs
- Registry.cs
- RotateTransform.cs
- ItemCheckedEvent.cs
- BinaryFormatter.cs
- StreamGeometryContext.cs
- ActivityTypeDesigner.xaml.cs
- TraceUtils.cs
- RoutedUICommand.cs
- SerialStream.cs
- CrossAppDomainChannel.cs
- InputBindingCollection.cs
- SoapAttributeOverrides.cs
- ContentOperations.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- DoubleAnimationBase.cs
- ClientSettingsStore.cs