Ejemplo n.º 1
0
        // For layering reasons this has to live in the `tye` project. We don't want to leak
        // the extensions themselves into Tye.Core.
        public static async Task ProcessExtensionsAsync(this ApplicationBuilder application, HostOptions?options, OutputContext output, ExtensionContext.OperationKind operation)
        {
            foreach (var extensionConfig in application.Extensions)
            {
                if (!WellKnownExtensions.Extensions.TryGetValue(extensionConfig.Name, out var extension))
                {
                    throw new CommandException($"Could not find the extension '{extensionConfig.Name}'.");
                }

                var context = new ExtensionContext(application, options, output, operation);
                await extension.ProcessAsync(context, extensionConfig);
            }
        }
Ejemplo n.º 2
0
 public abstract Task ProcessAsync(ExtensionContext context, ExtensionConfiguration config);