Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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 [....] 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
- RenderContext.cs
- PrivilegedConfigurationManager.cs
- Int32.cs
- Missing.cs
- BrowserCapabilitiesFactory.cs
- HandlerFactoryWrapper.cs
- PipelineModuleStepContainer.cs
- CodeGenerator.cs
- SpotLight.cs
- TableAdapterManagerMethodGenerator.cs
- PartialArray.cs
- TrackingServices.cs
- ToolboxControl.cs
- XmlFileEditor.cs
- TextRangeBase.cs
- SingleObjectCollection.cs
- StreamUpdate.cs
- StrokeFIndices.cs
- StyleReferenceConverter.cs
- CellParagraph.cs
- Storyboard.cs
- DecoderFallbackWithFailureFlag.cs
- Marshal.cs
- RSACryptoServiceProvider.cs
- ILGenerator.cs
- RSAOAEPKeyExchangeFormatter.cs
- _SSPIWrapper.cs
- HttpEncoder.cs
- ToolStripDropDownButton.cs
- BitmapEffect.cs
- LogEntryDeserializer.cs
- EventListener.cs
- TextBox.cs
- JavaScriptSerializer.cs
- MappingItemCollection.cs
- PopOutPanel.cs
- TransportContext.cs
- BrowserCapabilitiesCompiler.cs
- KeyEvent.cs
- DbQueryCommandTree.cs
- DoubleConverter.cs
- CaseCqlBlock.cs
- XmlParserContext.cs
- ButtonPopupAdapter.cs
- RuntimeConfigurationRecord.cs
- TableLayoutSettingsTypeConverter.cs
- SelectionItemPattern.cs
- ExecutedRoutedEventArgs.cs
- SelectionPatternIdentifiers.cs
- MessageDroppedTraceRecord.cs
- ClickablePoint.cs
- NetTcpSecurityElement.cs
- EmptyControlCollection.cs
- FolderBrowserDialog.cs
- WebExceptionStatus.cs
- IteratorDescriptor.cs
- DataGridViewCellMouseEventArgs.cs
- SAPICategories.cs
- HttpStreamMessageEncoderFactory.cs
- AttributeInfo.cs
- ServiceDebugBehavior.cs
- ProfileModule.cs
- SplitContainer.cs
- HttpProxyTransportBindingElement.cs
- LayoutTableCell.cs
- isolationinterop.cs
- SslStream.cs
- GatewayDefinition.cs
- DataBoundControlAdapter.cs
- EpmTargetTree.cs
- DefaultValidator.cs
- CodeGenerator.cs
- CompilationLock.cs
- MsmqTransportSecurityElement.cs
- CustomCategoryAttribute.cs
- NumericUpDown.cs
- ResourcePermissionBaseEntry.cs
- LinqExpressionNormalizer.cs
- ThreadSafeList.cs
- FormViewInsertedEventArgs.cs
- Label.cs
- MailWebEventProvider.cs
- Executor.cs
- ErrorInfoXmlDocument.cs
- PrintControllerWithStatusDialog.cs
- SelfSignedCertificate.cs
- RoutedUICommand.cs
- LingerOption.cs
- RangeValueProviderWrapper.cs
- GeneralTransform2DTo3DTo2D.cs
- SafeHGlobalHandleCritical.cs
- Helper.cs
- XPathDocument.cs
- ProtectedConfiguration.cs
- AddInStore.cs
- OracleMonthSpan.cs
- Html32TextWriter.cs
- DateBoldEvent.cs
- HasCopySemanticsAttribute.cs
- TaskFormBase.cs