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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XslNumber.cs
- ArrowControl.xaml.cs
- DetailsViewDeleteEventArgs.cs
- CharAnimationUsingKeyFrames.cs
- XmlDocumentSurrogate.cs
- DbModificationClause.cs
- RouteUrlExpressionBuilder.cs
- DrawingContextDrawingContextWalker.cs
- Pen.cs
- Geometry3D.cs
- HttpsChannelFactory.cs
- SqlCommand.cs
- ByteStreamMessageUtility.cs
- EntityProviderFactory.cs
- Int32Rect.cs
- SchemaElementLookUpTable.cs
- RoutingExtension.cs
- GenericNameHandler.cs
- DataBoundControlParameterTarget.cs
- AttributeInfo.cs
- Faults.cs
- FlowDocument.cs
- InternalBufferManager.cs
- PropertyMap.cs
- SettingsSection.cs
- HtmlGenericControl.cs
- TiffBitmapDecoder.cs
- ToolboxCategory.cs
- ClientConfigurationHost.cs
- XmlSchemaAll.cs
- MemoryFailPoint.cs
- UInt32Storage.cs
- GridItemCollection.cs
- DiscoveryInnerClientAdhoc11.cs
- MappingItemCollection.cs
- IImplicitResourceProvider.cs
- Vector3DValueSerializer.cs
- TrackBar.cs
- AsyncDataRequest.cs
- LayoutSettings.cs
- DesignerOptionService.cs
- OleDbCommand.cs
- HtmlWindow.cs
- TrustLevelCollection.cs
- FrameworkTextComposition.cs
- HtmlEncodedRawTextWriter.cs
- RijndaelManaged.cs
- NativeMethods.cs
- Int32AnimationBase.cs
- X509IssuerSerialKeyIdentifierClause.cs
- DurableInstanceProvider.cs
- PriorityBindingExpression.cs
- DoubleCollectionConverter.cs
- DecoratedNameAttribute.cs
- Control.cs
- keycontainerpermission.cs
- HitTestResult.cs
- GlyphElement.cs
- WorkflowApplicationAbortedException.cs
- SqlTrackingQuery.cs
- TemplateBamlTreeBuilder.cs
- Image.cs
- PathBox.cs
- Converter.cs
- WindowsAuthenticationEventArgs.cs
- ParseNumbers.cs
- ProfileSettings.cs
- WebPartConnectionsCloseVerb.cs
- Activity.cs
- ExecutionContext.cs
- EncryptedData.cs
- VectorAnimationBase.cs
- DesignerWebPartChrome.cs
- FullTextState.cs
- XPathDocumentBuilder.cs
- ConfigXmlCDataSection.cs
- Container.cs
- _AuthenticationState.cs
- ValueQuery.cs
- EventlogProvider.cs
- BindingsCollection.cs
- ISFTagAndGuidCache.cs
- CompilationRelaxations.cs
- SendDesigner.xaml.cs
- ParserStreamGeometryContext.cs
- TimelineClockCollection.cs
- UndoEngine.cs
- LocationSectionRecord.cs
- ObjectFullSpanRewriter.cs
- PropertyEmitter.cs
- SendKeys.cs
- HandlerFactoryWrapper.cs
- GetReadStreamResult.cs
- ManagementBaseObject.cs
- ControlCommandSet.cs
- webproxy.cs
- TextContainer.cs
- EdmScalarPropertyAttribute.cs
- ProjectionPathBuilder.cs
- DynamicResourceExtensionConverter.cs