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
- SizeF.cs
- OdbcEnvironmentHandle.cs
- WindowVisualStateTracker.cs
- MatrixIndependentAnimationStorage.cs
- HostingEnvironmentSection.cs
- UrlMappingCollection.cs
- DeclaredTypeValidatorAttribute.cs
- CancellationScope.cs
- CultureTableRecord.cs
- HttpCapabilitiesBase.cs
- ReflectionHelper.cs
- CustomSignedXml.cs
- Byte.cs
- __TransparentProxy.cs
- SafeFileMappingHandle.cs
- NamedPermissionSet.cs
- RuntimeArgumentHandle.cs
- DesignerEditorPartChrome.cs
- FileClassifier.cs
- QilXmlWriter.cs
- XamlTemplateSerializer.cs
- SqlRowUpdatingEvent.cs
- GridViewAutomationPeer.cs
- SqlGenericUtil.cs
- exports.cs
- ScriptIgnoreAttribute.cs
- NeutralResourcesLanguageAttribute.cs
- ScalarRestriction.cs
- XmlCollation.cs
- FileVersionInfo.cs
- LayeredChannelListener.cs
- ScaleTransform.cs
- DmlSqlGenerator.cs
- RectAnimationBase.cs
- CompiledQuery.cs
- PointF.cs
- InvalidOleVariantTypeException.cs
- SecuritySessionServerSettings.cs
- ServerProtocol.cs
- CompModSwitches.cs
- Collection.cs
- NumericUpDownAccelerationCollection.cs
- RoleService.cs
- ModelPerspective.cs
- SpanIndex.cs
- BindingOperations.cs
- MessageFormatterConverter.cs
- Rfc2898DeriveBytes.cs
- DispatchWrapper.cs
- MessageBox.cs
- InvokeBinder.cs
- TabletCollection.cs
- ElementNotAvailableException.cs
- DataGridSortingEventArgs.cs
- TypeElement.cs
- AdRotator.cs
- X509CertificateChain.cs
- GifBitmapDecoder.cs
- VisualStyleRenderer.cs
- InputScopeConverter.cs
- EmptyReadOnlyDictionaryInternal.cs
- QilLoop.cs
- ProxyGenerator.cs
- EntityContainer.cs
- XsdBuilder.cs
- FileDetails.cs
- HostProtectionException.cs
- AddingNewEventArgs.cs
- TerminateDesigner.cs
- AppSettingsSection.cs
- Accessors.cs
- RoutingBehavior.cs
- BufferedResponseStream.cs
- NonParentingControl.cs
- RuleSetDialog.cs
- ComponentCollection.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- EntityCommand.cs
- CircleEase.cs
- SqlCacheDependency.cs
- MatchingStyle.cs
- FixedHyperLink.cs
- NotConverter.cs
- ColumnResizeUndoUnit.cs
- PartialCachingControl.cs
- HttpListenerTimeoutManager.cs
- PrivilegedConfigurationManager.cs
- PropertyEmitter.cs
- MergeExecutor.cs
- AnimationTimeline.cs
- ToolBarButtonClickEvent.cs
- ObjectKeyFrameCollection.cs
- WorkflowTimerService.cs
- CheckoutException.cs
- ListViewSortEventArgs.cs
- CachedPathData.cs
- Matrix3DStack.cs
- DeviceFilterEditorDialog.cs
- BufferedReadStream.cs
- IPAddress.cs