Condividi tramite


TaskLoggingHelper.InitializeLifetimeService Method

InitializeLifetimeService is called when the remote object is activated.

This method will determine how long the lifetime for the object will be.

Thread safe. However, InitializeLifetimeService and MarkAsInactive should only be called in that order, together or not at all, and no more than once.

MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Syntax

'Declaration
Public Overrides Function InitializeLifetimeService As Object
public override Object InitializeLifetimeService()
public:
virtual Object^ InitializeLifetimeService() override
abstract InitializeLifetimeService : unit -> Object  
override InitializeLifetimeService : unit -> Object
public override function InitializeLifetimeService() : Object

Return Value

Type: System.Object
The lease object to control this object's lifetime.

.NET Framework Security

See Also

Reference

TaskLoggingHelper Class

Microsoft.Build.Utilities Namespace