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
- DataGridHelper.cs
- DataGridViewCellStyleConverter.cs
- Form.cs
- TransformedBitmap.cs
- NavigationEventArgs.cs
- HtmlInputText.cs
- Decoder.cs
- TextEmbeddedObject.cs
- AutomationEventArgs.cs
- TemplateDefinition.cs
- ParameterCollection.cs
- Stopwatch.cs
- XsltContext.cs
- QuaternionRotation3D.cs
- EntityContainer.cs
- KeySpline.cs
- ZipPackagePart.cs
- ErrorLog.cs
- GridViewHeaderRowPresenter.cs
- ImpersonateTokenRef.cs
- Page.cs
- JournalEntry.cs
- EntityProviderFactory.cs
- UIElementPropertyUndoUnit.cs
- HelpInfo.cs
- ProxyHwnd.cs
- AutoSizeComboBox.cs
- Merger.cs
- ServiceControllerDesigner.cs
- SamlConstants.cs
- ProgressPage.cs
- ParameterDataSourceExpression.cs
- CodeGotoStatement.cs
- StyleXamlParser.cs
- InputBuffer.cs
- AssociationSetEnd.cs
- TreeViewItem.cs
- ProtectedProviderSettings.cs
- FontFamily.cs
- BigInt.cs
- MemoryMappedFileSecurity.cs
- SqlDelegatedTransaction.cs
- Matrix.cs
- InstanceData.cs
- StrokeIntersection.cs
- PersistenceTypeAttribute.cs
- DataSourceConverter.cs
- TimeSpanStorage.cs
- ModuleConfigurationInfo.cs
- NameScopePropertyAttribute.cs
- X509ChainPolicy.cs
- AutoCompleteStringCollection.cs
- PublishLicense.cs
- MsmqIntegrationProcessProtocolHandler.cs
- MutableAssemblyCacheEntry.cs
- LayoutEditorPart.cs
- InputBinding.cs
- DataObject.cs
- WorkflowRuntimeSection.cs
- PingReply.cs
- WebPartsPersonalizationAuthorization.cs
- PointCollection.cs
- UnSafeCharBuffer.cs
- RequestBringIntoViewEventArgs.cs
- SuspendDesigner.cs
- TreeViewCancelEvent.cs
- ManipulationDelta.cs
- ResXResourceWriter.cs
- QueuePropertyVariants.cs
- XmlSchemaComplexType.cs
- WeakHashtable.cs
- ByteStreamGeometryContext.cs
- ProfessionalColors.cs
- ICspAsymmetricAlgorithm.cs
- SudsCommon.cs
- HostExecutionContextManager.cs
- DescendantOverDescendantQuery.cs
- ClassData.cs
- HtmlLink.cs
- XmlSchemaInclude.cs
- ControlDesignerState.cs
- XmlUtil.cs
- XmlILConstructAnalyzer.cs
- AbstractDataSvcMapFileLoader.cs
- PeerCollaboration.cs
- WindowsFont.cs
- XmlIgnoreAttribute.cs
- Inflater.cs
- AsyncCompletedEventArgs.cs
- OleDbDataAdapter.cs
- DesignerCommandAdapter.cs
- ObfuscateAssemblyAttribute.cs
- MsmqIntegrationBinding.cs
- IndexerNameAttribute.cs
- RelationshipEntry.cs
- DesignerCatalogPartChrome.cs
- ExternalFile.cs
- TextParagraphCache.cs
- AffineTransform3D.cs
- COM2PictureConverter.cs