* Add IAsyncComponent * Rewrite to use IAsyncComposer * Add AsyncComponentBase and RuntimeAsyncComponentBase * Remove manual disposing of components on restart
33 lines
772 B
C#
33 lines
772 B
C#
namespace Umbraco.Cms.Core.Composing;
|
|
|
|
/// <inheritdoc />
|
|
[Obsolete("Use IAsyncComponent instead. This interface will be removed in a future version.")]
|
|
public interface IComponent : IAsyncComponent
|
|
{
|
|
/// <summary>
|
|
/// Initializes the component.
|
|
/// </summary>
|
|
void Initialize();
|
|
|
|
/// <summary>
|
|
/// Terminates the component.
|
|
/// </summary>
|
|
void Terminate();
|
|
|
|
/// <inheritdoc />
|
|
Task IAsyncComponent.InitializeAsync(bool isRestarting, CancellationToken cancellationToken)
|
|
{
|
|
Initialize();
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
Task IAsyncComponent.TerminateAsync(bool isRestarting, CancellationToken cancellationToken)
|
|
{
|
|
Terminate();
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|