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
- OrCondition.cs
- ConfigurationManagerHelper.cs
- Panel.cs
- WizardForm.cs
- GrammarBuilderRuleRef.cs
- CalendarButton.cs
- Internal.cs
- Baml2006ReaderContext.cs
- TextBoxRenderer.cs
- FrameworkContentElement.cs
- DrawingContextWalker.cs
- NonBatchDirectoryCompiler.cs
- SettingsPropertyValue.cs
- TextViewBase.cs
- TreeNodeCollectionEditor.cs
- Process.cs
- ConnectionStringsSection.cs
- CodeGroup.cs
- _SslState.cs
- BindingManagerDataErrorEventArgs.cs
- HtmlImage.cs
- RuntimeHelpers.cs
- Imaging.cs
- ConfigurationPropertyAttribute.cs
- ImageField.cs
- TypedElement.cs
- ButtonPopupAdapter.cs
- ClientSession.cs
- Light.cs
- ComboBox.cs
- DomainUpDown.cs
- VirtualPathProvider.cs
- EventEntry.cs
- TempEnvironment.cs
- Baml6ConstructorInfo.cs
- ActivityExecutorOperation.cs
- SubMenuStyleCollection.cs
- ObjectQueryProvider.cs
- DbConnectionFactory.cs
- DragDeltaEventArgs.cs
- SrgsRule.cs
- DataGridViewComboBoxColumnDesigner.cs
- PasswordTextNavigator.cs
- MulticastNotSupportedException.cs
- OleDbSchemaGuid.cs
- GroupQuery.cs
- WindowsFormsHostPropertyMap.cs
- DecoderReplacementFallback.cs
- XmlName.cs
- TabPage.cs
- PenLineJoinValidation.cs
- BufferedGraphics.cs
- StoreItemCollection.cs
- WeakReferenceKey.cs
- ErrorHandler.cs
- PointLightBase.cs
- AmbientValueAttribute.cs
- SystemIPAddressInformation.cs
- GlobalProxySelection.cs
- BitmapEffectInput.cs
- DesignerLoader.cs
- ScriptManager.cs
- SequenceRangeCollection.cs
- BitmapEffectInput.cs
- ColumnTypeConverter.cs
- FontSource.cs
- DataControlImageButton.cs
- DebugHandleTracker.cs
- WmlSelectionListAdapter.cs
- BlockCollection.cs
- DbExpressionBuilder.cs
- SafeProcessHandle.cs
- StateMachine.cs
- Application.cs
- DetailsViewUpdateEventArgs.cs
- ModelTreeEnumerator.cs
- JavascriptXmlWriterWrapper.cs
- webbrowsersite.cs
- WebEventTraceProvider.cs
- SerialErrors.cs
- RightsManagementEncryptionTransform.cs
- ValidationUtility.cs
- MimeMultiPart.cs
- RemotingAttributes.cs
- EmptyEnumerable.cs
- CollectionTypeElement.cs
- ClientRoleProvider.cs
- SafeNativeMethods.cs
- SelectorAutomationPeer.cs
- ReadOnlyHierarchicalDataSourceView.cs
- AtomMaterializer.cs
- XmlUrlResolver.cs
- StatusBarItem.cs
- mediaeventargs.cs
- AbstractSvcMapFileLoader.cs
- SkewTransform.cs
- UInt16Converter.cs
- BooleanAnimationUsingKeyFrames.cs
- ProcessRequestArgs.cs
- StaticFileHandler.cs