ReSharper Platform SDK
 
Because ReSharper Platform SDK undefined is still in development, this documentation may not be entirely accurate and is subject to change.

Component Lifetime

Last modified: 04 July 2023

The simplest way to get a Lifetime instance is to let the Component Model inject it into your constructor:

The Component Model will create a new Lifetime instance for each component, and is responsible for terminating it. The Lifetime is terminated when the appropriate component container is disposed.

For example, the Lifetime for a component decorated with [ShellComponent] is terminated when the shell itself is terminated, normally when Visual Studio closes. A component decorated with [SolutionComponent] will have its Lifetime terminated when the currently open solution closes.