Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Shared / MS / Utility / PerfService.cs / 1 / PerfService.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Implements the Service class for perf diagnostics // // History // 05/25/06 kiranku Created // //--------------------------------------------------------------------------- using System; using System.Text; using System.Windows; using Microsoft.Win32; using MS.Internal; using MS.Utility; using MS.Internal.PresentationCore; namespace MS.Utility { ////// PerfService loads the PerfDiagnosisHelp.dll and launchs the service. /// [FriendAccessAllowed] static internal class PerfService { #region internal Properties ////// Perfservice uses this property to uniquely identfy each element in the tree. /// this ID gets traced with ETW traces and gets mapped to the element in the tool /// value is valid only if the service is running /// internal static long GetPerfElementID(UIElement element) { if ((PerfElementIDProperty != null) && (element != null)) { return (long)element.GetValue(PerfElementIDProperty); } return 0; } ////// Perfservice uses this property to uniquely identfy each element in the tree. /// this ID gets traced with ETW traces and gets mapped to the element in the tool /// value is valid only if the service is running /// internal static void SetPerfElementID(UIElement element, long value) { if ((PerfElementIDProperty != null) && (element != null)) { element.SetValue(PerfElementIDProperty, value); } return ; } #endregion internal Properties internal static readonly DependencyProperty PerfElementIDProperty = DependencyProperty.RegisterAttached( "PerfElementID", typeof(long), typeof(PerfService), new PropertyMetadata((long)0)); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Implements the Service class for perf diagnostics // // History // 05/25/06 kiranku Created // //--------------------------------------------------------------------------- using System; using System.Text; using System.Windows; using Microsoft.Win32; using MS.Internal; using MS.Utility; using MS.Internal.PresentationCore; namespace MS.Utility { ////// PerfService loads the PerfDiagnosisHelp.dll and launchs the service. /// [FriendAccessAllowed] static internal class PerfService { #region internal Properties ////// Perfservice uses this property to uniquely identfy each element in the tree. /// this ID gets traced with ETW traces and gets mapped to the element in the tool /// value is valid only if the service is running /// internal static long GetPerfElementID(UIElement element) { if ((PerfElementIDProperty != null) && (element != null)) { return (long)element.GetValue(PerfElementIDProperty); } return 0; } ////// Perfservice uses this property to uniquely identfy each element in the tree. /// this ID gets traced with ETW traces and gets mapped to the element in the tool /// value is valid only if the service is running /// internal static void SetPerfElementID(UIElement element, long value) { if ((PerfElementIDProperty != null) && (element != null)) { element.SetValue(PerfElementIDProperty, value); } return ; } #endregion internal Properties internal static readonly DependencyProperty PerfElementIDProperty = DependencyProperty.RegisterAttached( "PerfElementID", typeof(long), typeof(PerfService), new PropertyMetadata((long)0)); } } // 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
- AssertFilter.cs
- CorrelationActionMessageFilter.cs
- TextView.cs
- baseshape.cs
- ControlCollection.cs
- ResolveNameEventArgs.cs
- SplitterPanel.cs
- ThreadExceptionDialog.cs
- SpeakInfo.cs
- Utility.cs
- ObjectSelectorEditor.cs
- AnnotationComponentChooser.cs
- DrawingCollection.cs
- XmlSchemaCollection.cs
- SafeNativeMethods.cs
- Html32TextWriter.cs
- HiddenFieldPageStatePersister.cs
- JumpTask.cs
- QueueNameHelper.cs
- ModifierKeysValueSerializer.cs
- XamlPointCollectionSerializer.cs
- CodeAttributeDeclarationCollection.cs
- BitmapImage.cs
- EnumerableRowCollection.cs
- InkCollectionBehavior.cs
- ObjectDataSourceChooseMethodsPanel.cs
- SimpleMailWebEventProvider.cs
- CardSpaceException.cs
- MappingItemCollection.cs
- SuppressMessageAttribute.cs
- ACE.cs
- GridViewCancelEditEventArgs.cs
- HitTestFilterBehavior.cs
- LongValidator.cs
- XmlStringTable.cs
- ColorConvertedBitmap.cs
- DesignerLinkAdapter.cs
- PictureBox.cs
- BitmapMetadataEnumerator.cs
- DotExpr.cs
- SizeAnimationBase.cs
- TextRangeBase.cs
- BigInt.cs
- _StreamFramer.cs
- Deflater.cs
- Cursors.cs
- TextFragmentEngine.cs
- UICuesEvent.cs
- DynamicQueryStringParameter.cs
- DataGridRowsPresenter.cs
- ErrorsHelper.cs
- UnsafeNativeMethods.cs
- AsynchronousChannel.cs
- Identity.cs
- HScrollBar.cs
- TableLayoutColumnStyleCollection.cs
- XsltInput.cs
- FontStyles.cs
- CompiledXpathExpr.cs
- CodeMemberField.cs
- HMAC.cs
- DataGridViewCellStyleChangedEventArgs.cs
- Polyline.cs
- TransformerInfoCollection.cs
- TextFormatterHost.cs
- CodeTypeConstructor.cs
- TypeExtensionConverter.cs
- CodeLabeledStatement.cs
- FileBasedResourceGroveler.cs
- Debug.cs
- DependencyPropertyAttribute.cs
- ListViewUpdatedEventArgs.cs
- MediaPlayer.cs
- WebConfigurationManager.cs
- Rotation3DKeyFrameCollection.cs
- CompressedStack.cs
- Effect.cs
- ActivitySurrogate.cs
- FactoryGenerator.cs
- XmlQueryContext.cs
- ToolStripContainerDesigner.cs
- EntityDataSourceQueryBuilder.cs
- ClientScriptManager.cs
- FloatMinMaxAggregationOperator.cs
- CompilationLock.cs
- OpenTypeCommon.cs
- GC.cs
- BuildProvidersCompiler.cs
- CompModSwitches.cs
- OleDbCommandBuilder.cs
- TypeExtensionConverter.cs
- ReadOnlyDataSource.cs
- BulletedList.cs
- Selection.cs
- Int64.cs
- PropertyEntry.cs
- TaiwanLunisolarCalendar.cs
- ParallelTimeline.cs
- FrameSecurityDescriptor.cs
- SamlAuthorityBinding.cs