Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TreeViewEvent.cs
- MatrixTransform3D.cs
- DCSafeHandle.cs
- ListViewItemEventArgs.cs
- CodeCompiler.cs
- LayoutTableCell.cs
- SharedDp.cs
- EventLogger.cs
- Size.cs
- MarkupCompilePass1.cs
- TemplateGroupCollection.cs
- PointAnimationBase.cs
- CompositeActivityValidator.cs
- URL.cs
- TextFormatterContext.cs
- DecimalConverter.cs
- Visual3DCollection.cs
- MemberMaps.cs
- ProfilePropertySettings.cs
- Stroke2.cs
- UrlUtility.cs
- SystemIcmpV6Statistics.cs
- InvalidOperationException.cs
- XslVisitor.cs
- ComponentEditorForm.cs
- ValidationResult.cs
- CodeRemoveEventStatement.cs
- StretchValidation.cs
- LightweightCodeGenerator.cs
- RootNamespaceAttribute.cs
- DefaultObjectMappingItemCollection.cs
- Stream.cs
- OperationResponse.cs
- EventLogEntryCollection.cs
- TextTreeInsertElementUndoUnit.cs
- RemotingException.cs
- IImplicitResourceProvider.cs
- MouseGesture.cs
- ReadContentAsBinaryHelper.cs
- RegexWorker.cs
- NullableFloatSumAggregationOperator.cs
- OuterGlowBitmapEffect.cs
- SmtpException.cs
- SchemaAttDef.cs
- WebEncodingValidator.cs
- Exceptions.cs
- ViewPort3D.cs
- BackEase.cs
- TableHeaderCell.cs
- TargetException.cs
- DataControlReferenceCollection.cs
- DataBindingExpressionBuilder.cs
- TextSegment.cs
- PlanCompiler.cs
- XmlCharacterData.cs
- hresults.cs
- _RequestCacheProtocol.cs
- DataObjectFieldAttribute.cs
- ImageListDesigner.cs
- Transform3D.cs
- XmlSchemaSimpleContent.cs
- ClrProviderManifest.cs
- WinFormsComponentEditor.cs
- SqlCachedBuffer.cs
- LinqDataSourceEditData.cs
- EdmMember.cs
- MexHttpsBindingElement.cs
- FileEnumerator.cs
- ListViewCommandEventArgs.cs
- TargetParameterCountException.cs
- EntityProviderFactory.cs
- GridViewRowPresenterBase.cs
- MailHeaderInfo.cs
- ImageIndexConverter.cs
- ImpersonationContext.cs
- XmlSchemaObjectCollection.cs
- Vector3D.cs
- BlurEffect.cs
- XmlQueryOutput.cs
- CngUIPolicy.cs
- DeferrableContentConverter.cs
- SqlDataSourceAdvancedOptionsForm.cs
- Grammar.cs
- TypeDescriptionProviderAttribute.cs
- Calendar.cs
- Selection.cs
- BaseProcessor.cs
- QueueException.cs
- keycontainerpermission.cs
- DataKeyCollection.cs
- HttpApplication.cs
- parserscommon.cs
- SiteMapPath.cs
- FamilyCollection.cs
- EntityDesignerBuildProvider.cs
- InvokePattern.cs
- Source.cs
- FormViewRow.cs
- ZeroOpNode.cs
- FamilyTypefaceCollection.cs