Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/ModularPipelines.Chocolatey/AssemblyInfo.Generated.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// <auto-generated>
// This file was generated by ModularPipelines.OptionsGenerator.
// Do not edit this file manually.
// </auto-generated>

using System.Reflection;

[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.Tool", "choco")]
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-01-04T18:46:17.0925093Z")]
258 changes: 0 additions & 258 deletions src/ModularPipelines.Chocolatey/Choco.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// <auto-generated>
// This file was generated by ModularPipelines.OptionsGenerator.
// Do not edit this file manually.
// </auto-generated>

using System.Runtime.CompilerServices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using ModularPipelines.Context;
using ModularPipelines.Engine;
using ModularPipelines.Chocolatey.Services;

namespace ModularPipelines.Chocolatey.Extensions;

/// <summary>
/// Generated extensions for registering choco services.
/// </summary>
public static class ChocoExtensions
{
#pragma warning disable CA2255
[ModuleInitializer]
#pragma warning restore CA2255
public static void RegisterChocoContext()
{
ModularPipelinesContextRegistry.RegisterContext(collection => RegisterChocoContext(collection));
}

/// <summary>
/// Registers choco services with the dependency injection container.
/// </summary>
/// <param name="services">The service collection.</param>
/// <returns>The service collection for chaining.</returns>
public static IServiceCollection RegisterChocoContext(this IServiceCollection services)
{
services.TryAddScoped<IChoco, Services.Choco>();
return services;
}

/// <summary>
/// Gets the choco service from the pipeline context.
/// </summary>
/// <param name="context">The pipeline context.</param>
/// <returns>The choco service.</returns>
public static IChoco Choco(this IPipelineHookContext context)
{
return context.ServiceProvider.GetRequiredService<IChoco>();
}
}
26 changes: 0 additions & 26 deletions src/ModularPipelines.Chocolatey/Extensions/ChocolateyExtensions.cs

This file was deleted.

Loading