pulumi/sdk/dotnet/Pulumi/Deployment/IRunner.cs
Nathan Winder 0bdf73341b
Enable creation of TStack using IServiceProvider (#5723)
* Enable creation of TStack using IServiceProvider to enable dependency injection.

* fixed line endings

* update change log

* Added PR link to change log

* fixed change log

* Added integration test

* Review adjustments

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
2020-11-30 16:43:18 +01:00

17 lines
503 B
C#

// Copyright 2016-2019, Pulumi Corporation
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Pulumi
{
internal interface IRunner
{
void RegisterTask(string description, Task task);
Task<int> RunAsync(Func<Task<IDictionary<string, object?>>> func, StackOptions? options);
Task<int> RunAsync<TStack>() where TStack : Stack, new();
Task<int> RunAsync<TStack>(IServiceProvider serviceProvider) where TStack : Stack;
}
}