Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / Tools / System.Activities.Presentation / System / Activities / Presentation / DesignerPerfEventProvider.cs / 1305376 / DesignerPerfEventProvider.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.Activities.Presentation { using System; using System.Collections.Generic; using System.Text; using System.Diagnostics.Eventing; class DesignerPerfEventProvider { EventProvider provider = null; public DesignerPerfEventProvider() { try { this.provider = new EventProvider(new Guid("{B5697126-CBAF-4281-A983-7851DAF56454}")); } catch (PlatformNotSupportedException) { this.provider = null; } } public void WorkflowDesignerApplicationIdleAfterLoad() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerApplicationIdleAfterLoad); } } public void WorkflowDesignerDeserializeEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerDeserializeEnd); } } public void WorkflowDesignerDeserializeStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerDeserializeStart); } } public void WorkflowDesignerDrop() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerDrop); } } public void WorkflowDesignerIdleAfterDrop() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerIdleAfterDrop); } } public void WorkflowDesignerLoadComplete() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerLoadComplete); } } public void WorkflowDesignerLoadStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerLoadStart); } } public void WorkflowDesignerSerializeEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerSerializeEnd); } } public void WorkflowDesignerSerializeStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerSerializeStart); } } public void WorkflowDesignerExpressionEditorCompilationEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerExpressionEditorCompilationEnd); } } public void WorkflowDesignerExpressionEditorCompilationStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerExpressionEditorCompilationStart); } } public void WorkflowDesignerExpressionEditorLoaded() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerExpressionEditorLoaded); } } public void WorkflowDesignerExpressionEditorLoadStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerExpressionEditorLoadStart); } } public void WorkflowDesignerValidationEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerValidationEnd); } } public void WorkflowDesignerValidationStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.WorkflowDesignerValidationStart); } } public void FlowchartDesignerLoadEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.FlowchartDesignerLoadEnd); } } public void FlowchartDesignerLoadStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.FlowchartDesignerLoadStart); } } public void FreeFormPanelMeasureEnd() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.FreeFormPanelMeasureEnd); } } public void FreeFormPanelMeasureStart() { if (this.IsEnabled()) { WriteEventHelper((int)DesignerPerfEvents.FreeFormPanelMeasureStart); } } private bool IsEnabled() { bool isEnabled = false; if (this.provider != null) { isEnabled = this.provider.IsEnabled(); } return isEnabled; } private void WriteEventHelper(int eventId) { if (this.provider != null) { EventDescriptor descriptor = new EventDescriptor(eventId, 0, 0, 0, 0, 0, 0); this.provider.WriteEvent(ref descriptor); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DynamicValidator.cs
- ProcessThreadCollection.cs
- FunctionImportMapping.cs
- ProxyWebPartManager.cs
- FixedSOMElement.cs
- ToolStripItemTextRenderEventArgs.cs
- ToolboxItemSnapLineBehavior.cs
- _BaseOverlappedAsyncResult.cs
- SignedXml.cs
- Point3DCollection.cs
- Int64.cs
- PrintingPermissionAttribute.cs
- EntityViewGenerator.cs
- mda.cs
- FixedSOMSemanticBox.cs
- ListViewHitTestInfo.cs
- WCFServiceClientProxyGenerator.cs
- BrowserCapabilitiesCodeGenerator.cs
- PaintEvent.cs
- SectionInput.cs
- XslVisitor.cs
- ClientTarget.cs
- EntityCommandCompilationException.cs
- CultureTable.cs
- OracleLob.cs
- ObjectNotFoundException.cs
- SingleResultAttribute.cs
- DefaultValidator.cs
- ScanQueryOperator.cs
- SQLBinary.cs
- ComboBox.cs
- CollectionChangedEventManager.cs
- QueryAsyncResult.cs
- ParseElement.cs
- TableHeaderCell.cs
- TransactionFilter.cs
- StreamHelper.cs
- RandomDelayQueuedSendsAsyncResult.cs
- TaiwanCalendar.cs
- IdleTimeoutMonitor.cs
- Region.cs
- SafeCryptoHandles.cs
- PropagatorResult.cs
- SettingsBindableAttribute.cs
- XmlSchemaInferenceException.cs
- XamlFigureLengthSerializer.cs
- Binding.cs
- HtmlTitle.cs
- XPathEmptyIterator.cs
- COM2EnumConverter.cs
- ConfigurationStrings.cs
- SecurityDocument.cs
- SmiMetaDataProperty.cs
- XmlBaseWriter.cs
- AutomationPeer.cs
- EventMappingSettings.cs
- JapaneseLunisolarCalendar.cs
- CharacterMetricsDictionary.cs
- AttributeXamlType.cs
- NetStream.cs
- Or.cs
- SqlMethodAttribute.cs
- entityreference_tresulttype.cs
- DateTimeConverter.cs
- ViewBase.cs
- GeneralTransform2DTo3DTo2D.cs
- AsymmetricAlgorithm.cs
- MaskedTextBox.cs
- ProxyAttribute.cs
- ItemMap.cs
- NavigationProgressEventArgs.cs
- DataGridViewCellCancelEventArgs.cs
- OperandQuery.cs
- PLINQETWProvider.cs
- ClientSponsor.cs
- TextServicesDisplayAttributePropertyRanges.cs
- FormClosingEvent.cs
- DataGridPageChangedEventArgs.cs
- ProfileModule.cs
- DataKeyCollection.cs
- DifferencingCollection.cs
- UInt32Converter.cs
- TypeResolvingOptionsAttribute.cs
- VideoDrawing.cs
- RotationValidation.cs
- OdbcPermission.cs
- Parameter.cs
- FontFamilyValueSerializer.cs
- MsiStyleLogWriter.cs
- TextParaClient.cs
- ArgumentReference.cs
- AttachmentCollection.cs
- HitTestFilterBehavior.cs
- _BasicClient.cs
- DoubleKeyFrameCollection.cs
- MissingFieldException.cs
- QilLoop.cs
- XPathCompileException.cs
- DiscoveryUtility.cs
- ModuleBuilder.cs