Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- NativeActivityContext.cs
- CloudCollection.cs
- GlobalizationSection.cs
- XpsDigitalSignature.cs
- VectorKeyFrameCollection.cs
- DmlSqlGenerator.cs
- MD5.cs
- ToolStripDropDownClosingEventArgs.cs
- FunctionMappingTranslator.cs
- sitestring.cs
- TreeViewItem.cs
- ActionFrame.cs
- SqlDataSourceView.cs
- FlagsAttribute.cs
- ContextMenuStrip.cs
- DropShadowBitmapEffect.cs
- Viewport2DVisual3D.cs
- CheckBoxField.cs
- SystemMulticastIPAddressInformation.cs
- ColorComboBox.cs
- BackgroundWorker.cs
- DBCommandBuilder.cs
- UniqueSet.cs
- XmlDownloadManager.cs
- DynamicActivityXamlReader.cs
- _SslState.cs
- DnsEndpointIdentity.cs
- SingleConverter.cs
- LiteralControl.cs
- RequestCache.cs
- counter.cs
- CodeThrowExceptionStatement.cs
- Stackframe.cs
- CodePropertyReferenceExpression.cs
- WebPartVerbsEventArgs.cs
- InternalPermissions.cs
- FileSystemInfo.cs
- XmlTypeAttribute.cs
- ResourceDescriptionAttribute.cs
- FileDialog_Vista.cs
- CodeVariableDeclarationStatement.cs
- DrawingCollection.cs
- PropertyToken.cs
- OdbcEnvironment.cs
- ToolStripTemplateNode.cs
- LinkClickEvent.cs
- InfoCardKeyedHashAlgorithm.cs
- SafeFileMapViewHandle.cs
- ExpressionPrinter.cs
- IisTraceWebEventProvider.cs
- CodeSubDirectory.cs
- Grant.cs
- StoragePropertyMapping.cs
- QilValidationVisitor.cs
- PropertyEmitterBase.cs
- EncoderNLS.cs
- RawMouseInputReport.cs
- safesecurityhelperavalon.cs
- ObjectReaderCompiler.cs
- CustomTrackingQuery.cs
- ListBindableAttribute.cs
- DataReceivedEventArgs.cs
- FontSource.cs
- ErrorWebPart.cs
- ThreadAttributes.cs
- VsPropertyGrid.cs
- FontUnitConverter.cs
- XmlSerializationGeneratedCode.cs
- FileNotFoundException.cs
- ComboBoxHelper.cs
- GridItemCollection.cs
- XmlObjectSerializerReadContextComplexJson.cs
- TableRowGroup.cs
- XmlValidatingReaderImpl.cs
- CancellationScope.cs
- LocalFileSettingsProvider.cs
- SingleObjectCollection.cs
- SyncMethodInvoker.cs
- SiteMapNodeCollection.cs
- ButtonBaseAutomationPeer.cs
- FixedSOMTableCell.cs
- HttpStaticObjectsCollectionBase.cs
- AlgoModule.cs
- UInt64Storage.cs
- RelationshipType.cs
- DummyDataSource.cs
- ChildDocumentBlock.cs
- ToolTipAutomationPeer.cs
- Separator.cs
- DirectoryNotFoundException.cs
- WSTrustDec2005.cs
- TriggerCollection.cs
- DataListCommandEventArgs.cs
- ConfigurationConverterBase.cs
- GridViewItemAutomationPeer.cs
- EventMemberCodeDomSerializer.cs
- ProcessProtocolHandler.cs
- File.cs
- ReadWriteControlDesigner.cs
- RepeatButtonAutomationPeer.cs