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
- AsymmetricSecurityProtocol.cs
- ValueOfAction.cs
- LoginViewDesigner.cs
- oledbmetadatacolumnnames.cs
- CellConstantDomain.cs
- AmbientValueAttribute.cs
- EncoderParameter.cs
- PublishLicense.cs
- ipaddressinformationcollection.cs
- MdiWindowListItemConverter.cs
- RuleSetDialog.cs
- ConfigXmlCDataSection.cs
- NullableConverter.cs
- CheckPair.cs
- SessionEndingEventArgs.cs
- GeneralTransform3D.cs
- ScrollableControl.cs
- indexingfiltermarshaler.cs
- LoadWorkflowByInstanceKeyCommand.cs
- ToolStripLocationCancelEventArgs.cs
- SafeSerializationManager.cs
- SplineKeyFrames.cs
- ResourceProperty.cs
- CollectionType.cs
- DataGridViewTextBoxCell.cs
- ArrayElementGridEntry.cs
- CodeTryCatchFinallyStatement.cs
- MethodAccessException.cs
- FreeFormDragDropManager.cs
- FileReader.cs
- PageCache.cs
- Point4DConverter.cs
- AutoGeneratedFieldProperties.cs
- ConsumerConnectionPointCollection.cs
- FocusWithinProperty.cs
- RelationshipDetailsRow.cs
- DmlSqlGenerator.cs
- Attributes.cs
- UnauthorizedWebPart.cs
- MeshGeometry3D.cs
- DataGridAutoFormat.cs
- ScrollContentPresenter.cs
- DeleteHelper.cs
- StrokeDescriptor.cs
- IntellisenseTextBox.designer.cs
- SystemEvents.cs
- Multiply.cs
- TrackPointCollection.cs
- DataGridViewColumnTypePicker.cs
- DesignerActionListCollection.cs
- Int32CollectionValueSerializer.cs
- PropertyGridView.cs
- BindingsCollection.cs
- ZipQueryOperator.cs
- ObjectAssociationEndMapping.cs
- ContainerTracking.cs
- MappingException.cs
- CharacterMetrics.cs
- Animatable.cs
- DashStyles.cs
- ConfigXmlCDataSection.cs
- TableLayoutCellPaintEventArgs.cs
- TextModifierScope.cs
- RegexCapture.cs
- SendMessageChannelCache.cs
- TypeSemantics.cs
- ProcessHostConfigUtils.cs
- UITypeEditor.cs
- ConfigsHelper.cs
- DrawingImage.cs
- SecurityTokenSpecification.cs
- HttpConfigurationSystem.cs
- MetricEntry.cs
- CollectionViewGroupRoot.cs
- OracleInfoMessageEventArgs.cs
- DataServiceException.cs
- XmlTypeMapping.cs
- Column.cs
- StateWorkerRequest.cs
- BitmapEffectInputData.cs
- EncoderParameter.cs
- LineServices.cs
- MethodBuilder.cs
- DataListItem.cs
- ViewLoader.cs
- DataMemberFieldEditor.cs
- SqlDataSourceDesigner.cs
- LinqDataSourceView.cs
- CollectionViewSource.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- _ListenerResponseStream.cs
- XmlSchemaAny.cs
- XmlDictionaryWriter.cs
- JapaneseLunisolarCalendar.cs
- MultiPageTextView.cs
- InternalCache.cs
- QueryOptionExpression.cs
- DefaultProxySection.cs
- XsdBuilder.cs
- PerspectiveCamera.cs