GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — build DiscordClient on top of IOC by akiraveliara · Pull Request #1908 · DSharpPlus/DSharpPlus Conversation
|
| this.httpClient.BaseAddress = new Uri(Utilities.GetApiBaseUri()); | ||
| this.httpClient.Timeout = timeout; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it'd be worthwhile to go the Remora route and expose a [rest] client builder; there's occasional reason to change what the client does (e.g., adding additional polly handlers for metrics, or using the canary api for one reason or another)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
(Client builder as in Action<HttpClient> parameter)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
i think this is something we should look into in a separate pull request to customize specifically rest further
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is okay? Regardless please write a migration guide for this PR specifically. Before we release v5, we'll merge the migration guide for this PR and all other breaking changes into one. I just want a guide to reference right now since I myself don't particularly understand what the intended use is.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursory glance (namely because of a jumble of a diff), but LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@OoLunar added the migration guide as requested |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* centralize the service provider * prepare the rest client for IOC * obsolete all the old events... * obsolete SocketErrored even more * enables registering event handlers to the service collection * fix event-related build errors * make DiscordApiClient IOC-constructible * death (migrate events (not dispatch yet) to the interim model) * update DiscordClient.Dipshit.cs * fix most trivial build errors * more progress towards usability * DSharpPlus.dll should now work:tm: * build? * miser, miser * add public construction code * update docs * convenience * details * migration guide (partial, only as far as this PR is concerned) * build * switch to CreateDefault * nit
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Centralized ServiceProvider
There was an error while loading. Please reload this page.