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
- SqlDataSourceSummaryPanel.cs
- ForwardPositionQuery.cs
- SystemColorTracker.cs
- ApplicationContext.cs
- ListViewInsertedEventArgs.cs
- CurrentChangingEventArgs.cs
- FieldNameLookup.cs
- RequestCachePolicyConverter.cs
- CommandValueSerializer.cs
- InvalidAsynchronousStateException.cs
- compensatingcollection.cs
- XpsS0ValidatingLoader.cs
- FontDriver.cs
- HttpModuleActionCollection.cs
- GenericUI.cs
- TextServicesProperty.cs
- hebrewshape.cs
- Maps.cs
- CheckableControlBaseAdapter.cs
- CompositeFontInfo.cs
- CounterCreationData.cs
- DES.cs
- Psha1DerivedKeyGeneratorHelper.cs
- DrawingImage.cs
- CompModSwitches.cs
- PaperSource.cs
- BufferedGraphicsContext.cs
- BufferModeSettings.cs
- DbTransaction.cs
- BinaryCommonClasses.cs
- HostingMessageProperty.cs
- CfgArc.cs
- MenuRendererStandards.cs
- XmlTypeAttribute.cs
- XmlLinkedNode.cs
- EventEntry.cs
- CssClassPropertyAttribute.cs
- ObjectStateEntry.cs
- XmlILStorageConverter.cs
- XmlSerializationGeneratedCode.cs
- FileSystemInfo.cs
- _FixedSizeReader.cs
- SettingsPropertyWrongTypeException.cs
- DbParameterCollectionHelper.cs
- TrimSurroundingWhitespaceAttribute.cs
- ManagementQuery.cs
- GenericAuthenticationEventArgs.cs
- ResourceFallbackManager.cs
- Opcode.cs
- EntitySet.cs
- SafeCryptContextHandle.cs
- ErrorWebPart.cs
- ProviderManager.cs
- TextUtf8RawTextWriter.cs
- SiteMapNodeCollection.cs
- FlowThrottle.cs
- ListComponentEditor.cs
- SmuggledIUnknown.cs
- RequestSecurityTokenForGetBrowserToken.cs
- WebPartVerb.cs
- xml.cs
- XmlChildEnumerator.cs
- UdpUtility.cs
- Roles.cs
- CorrelationKey.cs
- TextTreeDeleteContentUndoUnit.cs
- OracleTransaction.cs
- MDIControlStrip.cs
- ProtocolProfile.cs
- WebPartTransformerAttribute.cs
- MSAAEventDispatcher.cs
- AddingNewEventArgs.cs
- PermissionListSet.cs
- SiteMapSection.cs
- StateMachineDesignerPaint.cs
- CheckBox.cs
- EventLogTraceListener.cs
- StringToken.cs
- HierarchicalDataSourceControl.cs
- Facet.cs
- HttpInputStream.cs
- MultipleViewPattern.cs
- Queue.cs
- TouchPoint.cs
- StickyNoteHelper.cs
- ADRoleFactoryConfiguration.cs
- AsyncStreamReader.cs
- TextDecoration.cs
- EventLogPermissionEntry.cs
- ProfileInfo.cs
- NavigateEvent.cs
- UInt16Storage.cs
- DbProviderManifest.cs
- CodeAccessSecurityEngine.cs
- WinCategoryAttribute.cs
- ErrorProvider.cs
- GroupByQueryOperator.cs
- LocalBuilder.cs
- PropertyBuilder.cs
- WebPartsPersonalizationAuthorization.cs