Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- FormsAuthenticationModule.cs
- ListViewTableRow.cs
- DesignTimeParseData.cs
- ScrollProperties.cs
- UriSectionReader.cs
- AnnotationElement.cs
- MultiAsyncResult.cs
- Clipboard.cs
- TableLayoutSettingsTypeConverter.cs
- Win32Exception.cs
- GroupQuery.cs
- ISAPIApplicationHost.cs
- FastEncoderWindow.cs
- HtmlInputControl.cs
- GZipUtils.cs
- XmlUtf8RawTextWriter.cs
- AuthorizationContext.cs
- CodeSnippetTypeMember.cs
- HashAlgorithm.cs
- ReflectionUtil.cs
- ProfilePropertySettingsCollection.cs
- _RequestCacheProtocol.cs
- ClientSideQueueItem.cs
- SRef.cs
- FunctionUpdateCommand.cs
- ExpandSegment.cs
- ManipulationStartedEventArgs.cs
- ImageKeyConverter.cs
- MetadataImporterQuotas.cs
- AddingNewEventArgs.cs
- TagMapCollection.cs
- PartialCachingControl.cs
- ToolStripOverflowButton.cs
- MethodRental.cs
- XmlStringTable.cs
- PageCatalogPart.cs
- OracleBFile.cs
- WindowsListViewGroupHelper.cs
- DataServiceQueryContinuation.cs
- ApplicationHost.cs
- ConstructorArgumentAttribute.cs
- TargetException.cs
- Typeface.cs
- RegisteredHiddenField.cs
- CodeTypeParameterCollection.cs
- XmlDataSourceView.cs
- NonSerializedAttribute.cs
- PowerStatus.cs
- Mapping.cs
- CancellationState.cs
- HttpAsyncResult.cs
- QilGenerator.cs
- OdbcPermission.cs
- SrgsRule.cs
- SingleTagSectionHandler.cs
- PrintingPermission.cs
- SystemWebSectionGroup.cs
- ExceptionValidationRule.cs
- RawStylusInputCustomData.cs
- SQLDecimalStorage.cs
- SequenceNumber.cs
- Hex.cs
- ProjectionPlan.cs
- KeyGesture.cs
- DelayedRegex.cs
- LinqDataSourceUpdateEventArgs.cs
- MsmqChannelFactoryBase.cs
- RenderDataDrawingContext.cs
- WebConfigurationFileMap.cs
- CodeDomLocalizationProvider.cs
- OdbcTransaction.cs
- RadioButton.cs
- TextSelectionProcessor.cs
- OneOfConst.cs
- SiteMapNodeCollection.cs
- ModifiableIteratorCollection.cs
- HttpModuleAction.cs
- WizardPanel.cs
- WebReferencesBuildProvider.cs
- ReadOnlyMetadataCollection.cs
- RadioButton.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- XmlComment.cs
- CommonObjectSecurity.cs
- DATA_BLOB.cs
- FormViewDeletedEventArgs.cs
- OpenFileDialog.cs
- ArrayElementGridEntry.cs
- CommandHelper.cs
- IPEndPointCollection.cs
- objectquery_tresulttype.cs
- GPPOINTF.cs
- QueryOutputWriter.cs
- QueryExpr.cs
- RefreshEventArgs.cs
- ClientEventManager.cs
- FontInfo.cs
- InvalidEnumArgumentException.cs
- VirtualPathProvider.cs
- SelectionPatternIdentifiers.cs