Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Base64Decoder.cs
- ContextDataSourceView.cs
- MaskedTextBoxDesigner.cs
- DefaultDialogButtons.cs
- SeekStoryboard.cs
- SafeNativeMethods.cs
- SqlBuffer.cs
- TemplateKey.cs
- DriveInfo.cs
- x509store.cs
- ResourceWriter.cs
- ComplexBindingPropertiesAttribute.cs
- StaticFileHandler.cs
- NavigationHelper.cs
- VisualTarget.cs
- TextEmbeddedObject.cs
- XslException.cs
- Pkcs7Signer.cs
- DataObjectEventArgs.cs
- CmsUtils.cs
- PersonalizableAttribute.cs
- FunctionOverloadResolver.cs
- securitycriticaldataformultiplegetandset.cs
- HttpCapabilitiesEvaluator.cs
- StreamUpgradeBindingElement.cs
- SchemaSetCompiler.cs
- CachedPathData.cs
- BackgroundWorker.cs
- TogglePattern.cs
- WebServiceTypeData.cs
- NavigationCommands.cs
- SqlNotificationRequest.cs
- DiscriminatorMap.cs
- printdlgexmarshaler.cs
- HeaderCollection.cs
- ObjectQuery_EntitySqlExtensions.cs
- RequestQueue.cs
- HtmlControlAdapter.cs
- TextPenaltyModule.cs
- SchemaAttDef.cs
- ScriptModule.cs
- DesignerSerializerAttribute.cs
- KeyEvent.cs
- WorkflowRuntimeBehavior.cs
- WebReference.cs
- TextBoxBase.cs
- Types.cs
- EnumMember.cs
- SymmetricSecurityProtocolFactory.cs
- BamlRecords.cs
- _NetworkingPerfCounters.cs
- DbConnectionPoolIdentity.cs
- _ShellExpression.cs
- CurrentTimeZone.cs
- AssemblyAssociatedContentFileAttribute.cs
- SamlConstants.cs
- ResolveRequestResponseAsyncResult.cs
- PackageRelationshipCollection.cs
- BoolLiteral.cs
- ResourceDescriptionAttribute.cs
- StringAttributeCollection.cs
- IDReferencePropertyAttribute.cs
- XmlHierarchicalDataSourceView.cs
- MediaElement.cs
- ColorMap.cs
- XmlSchemaImporter.cs
- XmlMemberMapping.cs
- XdrBuilder.cs
- GridViewDeletedEventArgs.cs
- Misc.cs
- DependencyObject.cs
- Encoder.cs
- AVElementHelper.cs
- XXXOnTypeBuilderInstantiation.cs
- ParsedAttributeCollection.cs
- SiteIdentityPermission.cs
- _CookieModule.cs
- Menu.cs
- Compiler.cs
- ProtectedProviderSettings.cs
- PersonalizationDictionary.cs
- LeaseManager.cs
- StatusBar.cs
- DecryptRequest.cs
- NetworkInformationPermission.cs
- Input.cs
- Composition.cs
- XmlIgnoreAttribute.cs
- RadioButtonPopupAdapter.cs
- CodeNamespace.cs
- RelationshipDetailsCollection.cs
- Int16KeyFrameCollection.cs
- LayeredChannelListener.cs
- LogManagementAsyncResult.cs
- TypefaceCollection.cs
- Filter.cs
- DbDataAdapter.cs
- ConfigurationManagerHelperFactory.cs
- DataTableMappingCollection.cs
- ScriptDescriptor.cs