Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Access to just the types of the handlers #255

Merged
merged 3 commits into from
May 21, 2024
Merged

Conversation

svrooij
Copy link
Contributor

@svrooij svrooij commented May 18, 2024

Related to this discussion where I want to enable everybody to use dependency injection instead of the self implemented HttpClient factory.

I'm not sure if this code would be better, I don't like the dependency it takes on reflection. But it would reduce it to only have one list to keep.

public static IList<DelegatingHandler> CreateDefaultHandlers()
{
    return GetDefaultHandlerTypes()
        .Select(handlerType => (DelegatingHandler)System.Activator.CreateInstance(handlerType))
        .ToList();
}

Fixed #254

@svrooij svrooij requested a review from a team as a code owner May 18, 2024 19:37
Copy link
Member

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution here @svrooij

Any chance you can bump the version in the csproj file as well as add a changelog entry at the repository root?

@svrooij
Copy link
Contributor Author

svrooij commented May 21, 2024

Thanks for the contribution here

Any chance you can bump the version in the csproj file as well as add a changelog entry at the repository root?

Sure @andrueastman, there you go.

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the changes!

@baywet baywet enabled auto-merge May 21, 2024 18:58
@baywet baywet merged commit 3464453 into microsoft:main May 21, 2024
7 checks passed
@svrooij
Copy link
Contributor Author

svrooij commented May 21, 2024

@baywet this change means the proposed doc update can be more easily. Any idea on when this gets released and do you want me to update the docs pr already?

@baywet
Copy link
Member

baywet commented May 21, 2024

working on the release :)
Follow #257 for now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Access just the types of the handlers
3 participants