Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / SMDiagnostics / System / ServiceModel / Diagnostics / Activity.cs / 1305376 / Activity.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Diagnostics { class Activity : IDisposable { protected Guid parentId; Guid currentId; bool mustDispose = false; protected Activity(Guid activityId, Guid parentId) { this.currentId = activityId; this.parentId = parentId; this.mustDispose = true; DiagnosticTrace.ActivityId = this.currentId; } internal static Activity CreateActivity(Guid activityId) { Activity retval = null; if (activityId != Guid.Empty) { Guid currentActivityId = DiagnosticTrace.ActivityId; if (activityId != currentActivityId) { retval = new Activity(activityId, currentActivityId); } } return retval; } public virtual void Dispose() { if (this.mustDispose) { this.mustDispose = false; DiagnosticTrace.ActivityId = this.parentId; } GC.SuppressFinalize(this); } protected Guid Id { get { return this.currentId; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Diagnostics { class Activity : IDisposable { protected Guid parentId; Guid currentId; bool mustDispose = false; protected Activity(Guid activityId, Guid parentId) { this.currentId = activityId; this.parentId = parentId; this.mustDispose = true; DiagnosticTrace.ActivityId = this.currentId; } internal static Activity CreateActivity(Guid activityId) { Activity retval = null; if (activityId != Guid.Empty) { Guid currentActivityId = DiagnosticTrace.ActivityId; if (activityId != currentActivityId) { retval = new Activity(activityId, currentActivityId); } } return retval; } public virtual void Dispose() { if (this.mustDispose) { this.mustDispose = false; DiagnosticTrace.ActivityId = this.parentId; } GC.SuppressFinalize(this); } protected Guid Id { get { return this.currentId; } } } } // 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
- RootBrowserWindowProxy.cs
- RtfToken.cs
- ContainerFilterService.cs
- InputLanguageSource.cs
- ShaderEffect.cs
- SessionEndedEventArgs.cs
- MethodImplAttribute.cs
- FixUp.cs
- ReturnValue.cs
- ParameterEditorUserControl.cs
- SessionSwitchEventArgs.cs
- TdsParserSessionPool.cs
- PerfService.cs
- EventEntry.cs
- RoutedEventConverter.cs
- InvalidOperationException.cs
- DocumentReference.cs
- XmlSchemaException.cs
- DocComment.cs
- SqlExpander.cs
- StreamResourceInfo.cs
- ToolStripOverflowButton.cs
- FileAuthorizationModule.cs
- SSmlParser.cs
- ShapingWorkspace.cs
- SecureStringHasher.cs
- AssociationTypeEmitter.cs
- ProxyHwnd.cs
- MenuItemStyle.cs
- ShaderEffect.cs
- InkPresenterAutomationPeer.cs
- OleDbFactory.cs
- WindowsProgressbar.cs
- WebReferencesBuildProvider.cs
- XmlSchemaSimpleContent.cs
- XmlTextReader.cs
- HttpConfigurationSystem.cs
- OdbcConnectionStringbuilder.cs
- EntityDesignerBuildProvider.cs
- InputReferenceExpression.cs
- PerformanceCounterPermissionEntry.cs
- PropertyInfoSet.cs
- MatrixTransform3D.cs
- NativeMethods.cs
- TaskExtensions.cs
- BaseContextMenu.cs
- HttpModule.cs
- VisualCollection.cs
- CompareInfo.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- CounterCreationDataConverter.cs
- PackWebRequestFactory.cs
- DataGridItem.cs
- TraceContext.cs
- Point3D.cs
- UInt16.cs
- AtomServiceDocumentSerializer.cs
- CfgSemanticTag.cs
- UnitySerializationHolder.cs
- XmlSerializableServices.cs
- DataGridBoundColumn.cs
- DispatcherOperation.cs
- BindingExpressionBase.cs
- RegexWorker.cs
- ListBindingHelper.cs
- AnonymousIdentificationModule.cs
- CompositeDispatchFormatter.cs
- UInt32.cs
- CellParaClient.cs
- AsymmetricSignatureFormatter.cs
- SHA512Managed.cs
- OleDbDataReader.cs
- Propagator.JoinPropagator.cs
- XmlQueryStaticData.cs
- Cursor.cs
- WinFormsComponentEditor.cs
- CheckBoxFlatAdapter.cs
- StaticResourceExtension.cs
- GroupItemAutomationPeer.cs
- SystemIPAddressInformation.cs
- Subtree.cs
- ExpressionBindingCollection.cs
- AudioFormatConverter.cs
- BitArray.cs
- Constants.cs
- RequiredFieldValidator.cs
- XmlSchemaInferenceException.cs
- SkipQueryOptionExpression.cs
- ImpersonationContext.cs
- AddInProcess.cs
- AdRotator.cs
- SignedXml.cs
- ReaderWriterLock.cs
- ContractsBCL.cs
- BoolExpressionVisitors.cs
- EventDescriptor.cs
- IgnorePropertiesAttribute.cs
- RemoteWebConfigurationHostServer.cs
- InputLanguageSource.cs
- CellTreeNodeVisitors.cs