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
- X509RawDataKeyIdentifierClause.cs
- SingleQueryOperator.cs
- TransformGroup.cs
- CreateUserWizard.cs
- Scheduler.cs
- AppDomainUnloadedException.cs
- RecordConverter.cs
- SmiContext.cs
- HwndProxyElementProvider.cs
- DataGridCell.cs
- PolicyValidator.cs
- ExpressionPrefixAttribute.cs
- FileSecurity.cs
- Misc.cs
- HttpHandlersInstallComponent.cs
- MessageEncoder.cs
- NumberFunctions.cs
- CultureData.cs
- NumericPagerField.cs
- LiteralControl.cs
- ChtmlFormAdapter.cs
- LocalBuilder.cs
- CharUnicodeInfo.cs
- Number.cs
- ItemsControlAutomationPeer.cs
- CodeCommentStatement.cs
- DebugControllerThread.cs
- BrowsableAttribute.cs
- EnvironmentPermission.cs
- XmlSchemaAnnotation.cs
- ListManagerBindingsCollection.cs
- SettingsPropertyWrongTypeException.cs
- AutomationTextAttribute.cs
- OdbcCommandBuilder.cs
- ResolveNameEventArgs.cs
- ConfigurationPropertyCollection.cs
- DynamicUpdateCommand.cs
- CLSCompliantAttribute.cs
- EmptyEnumerator.cs
- GeneratedCodeAttribute.cs
- Identifier.cs
- CmsInterop.cs
- UpdatePanelControlTrigger.cs
- DataSourceCollectionBase.cs
- XamlTemplateSerializer.cs
- OdbcDataAdapter.cs
- CommonXSendMessage.cs
- SeparatorAutomationPeer.cs
- GenericEnumerator.cs
- HtmlInputImage.cs
- ValidationPropertyAttribute.cs
- Int64Animation.cs
- MSAAEventDispatcher.cs
- Buffer.cs
- DoubleAnimationBase.cs
- BevelBitmapEffect.cs
- HttpResponseBase.cs
- ToolStripComboBox.cs
- CodeBinaryOperatorExpression.cs
- Int32RectValueSerializer.cs
- ComplexObject.cs
- CommandExpr.cs
- EntityDataSourceDataSelectionPanel.designer.cs
- LambdaCompiler.Generated.cs
- ExtenderProvidedPropertyAttribute.cs
- DesignRelationCollection.cs
- NumericPagerField.cs
- StrokeCollection2.cs
- ObjectResult.cs
- OrderedParallelQuery.cs
- WrapPanel.cs
- Separator.cs
- AssemblyInfo.cs
- WindowInteropHelper.cs
- NameScopePropertyAttribute.cs
- Zone.cs
- DeferredSelectedIndexReference.cs
- WinCategoryAttribute.cs
- PKCS1MaskGenerationMethod.cs
- RegexReplacement.cs
- PageThemeBuildProvider.cs
- RewritingValidator.cs
- RegistryKey.cs
- TypeLibraryHelper.cs
- SQLDecimal.cs
- Image.cs
- XmlRootAttribute.cs
- CssStyleCollection.cs
- CurrentTimeZone.cs
- FtpRequestCacheValidator.cs
- ISSmlParser.cs
- DiscoveryDocument.cs
- Native.cs
- IHttpResponseInternal.cs
- Utils.cs
- LabelEditEvent.cs
- MissingMemberException.cs
- RedirectionProxy.cs
- DbConnectionOptions.cs
- MetadataCache.cs