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
- ComNativeDescriptor.cs
- SqlPersonalizationProvider.cs
- DataGridViewIntLinkedList.cs
- ResourceAssociationSet.cs
- BindingContext.cs
- HttpAsyncResult.cs
- SocketAddress.cs
- SignatureHelper.cs
- StrongNameKeyPair.cs
- InlinedAggregationOperator.cs
- XmlQueryOutput.cs
- ImageDrawing.cs
- BoundingRectTracker.cs
- ObjectSpanRewriter.cs
- newitemfactory.cs
- assemblycache.cs
- PathBox.cs
- HelloOperationCD1AsyncResult.cs
- ScaleTransform3D.cs
- Globals.cs
- SlipBehavior.cs
- DynamicMetaObject.cs
- EUCJPEncoding.cs
- BamlReader.cs
- SqlMethods.cs
- Configuration.cs
- SecurityRuntime.cs
- RtfControls.cs
- MergeFilterQuery.cs
- ColumnMapCopier.cs
- InternalControlCollection.cs
- SpecularMaterial.cs
- DBConnection.cs
- SqlDataSourceCommandParser.cs
- PauseStoryboard.cs
- Delegate.cs
- DataGridViewCheckBoxColumn.cs
- DynamicFilter.cs
- WebEncodingValidatorAttribute.cs
- WpfGeneratedKnownTypes.cs
- TextEvent.cs
- RoleServiceManager.cs
- DataGridViewCheckBoxCell.cs
- CriticalExceptions.cs
- MenuItemBinding.cs
- TextShapeableCharacters.cs
- Drawing.cs
- GradientStop.cs
- XmlStringTable.cs
- DelegateBodyWriter.cs
- Menu.cs
- TemplateParser.cs
- SafeNativeMemoryHandle.cs
- LazyTextWriterCreator.cs
- CorrelationKey.cs
- HwndMouseInputProvider.cs
- ResXResourceReader.cs
- SQLBinaryStorage.cs
- BlobPersonalizationState.cs
- SymLanguageVendor.cs
- TypeConverters.cs
- DocumentPageView.cs
- StringConverter.cs
- Hashtable.cs
- UnauthorizedAccessException.cs
- StyleCollection.cs
- RuntimeEnvironment.cs
- CustomPopupPlacement.cs
- EmptyEnumerator.cs
- ZipIOBlockManager.cs
- XmlSchemaValidationException.cs
- DesignerActionPanel.cs
- ResolveResponse.cs
- IssuanceLicense.cs
- RepeaterCommandEventArgs.cs
- Assembly.cs
- ReversePositionQuery.cs
- MergePropertyDescriptor.cs
- ClientBuildManagerCallback.cs
- TraceInternal.cs
- List.cs
- State.cs
- SaveFileDialog.cs
- Normalization.cs
- PeerServiceMessageContracts.cs
- ConfigXmlElement.cs
- HwndAppCommandInputProvider.cs
- BamlReader.cs
- CodeTypeReferenceCollection.cs
- WorkflowInstanceExtensionManager.cs
- UnsafeNativeMethods.cs
- FillBehavior.cs
- ResourceCategoryAttribute.cs
- BigInt.cs
- WebReferencesBuildProvider.cs
- ClassData.cs
- SyndicationSerializer.cs
- PageSettings.cs
- RelationshipEndCollection.cs
- DirectoryRootQuery.cs