microsoft / microsoft/agent-framework

.NET: Why is AddWorkflow extension method defined on IHostApplicationBuilder interface?

Open
#2,897 0 comments 5 reactions 1 assignee Claimed by @alliscode View on GitHub
.NET workflows
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

I have noticed that the `AddAIAgent` extension method is defined on both the `IHostApplicationBuilder` and `IServiceCollection` interfaces, but the former simply delegates to the latter.

By contrast, `AddWorkflow` is defined only on `IHostApplicationBuilder`, even though its implementation effectively operates on `builder.Services`.

I believe that, for consistency with the rest of .NET, both methods should be defined only on `IServiceCollection`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.