-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HostBuilder.Properties
and HostBuilderContext.Properties
should be dictionaries not arrays
#1470
Comments
I'm happy to make this change. I also think we should change the namespace to Microsoft.Extensions.Hosting to match .NET full. |
Pinging @bytewizer to ask if there was a design motivation to use Arrays instead of dictionaries. |
IIRC the namespace being under nanoframework name means that we are deviating from the .NET API... 🤔 |
Sure that makes sense in cases where we are deviating but this doesn't appear to be one as it's pretty similar. We made a namespace change in this PR for nanoFramework.DependencyInjection which is part of my motivation for suggesting we do the same here. |
Another attempt to get feedback from @bytewizer about this... 😉 @CoryCharlton if there is no feedback (as I don't see any issues with these changes) please go ahead. |
Library/API/IoT binding
nanoFramework.Hosting
Visual Studio version
No response
.NET nanoFramework extension version
No response
Target name(s)
No response
Firmware version
No response
Device capabilities
No response
Description
HostBuilder.Properties
andHostBuilderContext.Properties
are currently arrays. This makes them challenging to work with as the values need to be set at a single time and the order of the items must be known..NET full implements these as dictionaries which makes more sense (https://github.com/dotnet/runtime/blob/69280cd085ca65e8cecee4d94888784f37271386/src/libraries/Microsoft.Extensions.Hosting/src/HostBuilder.cs#L52).
How to reproduce
No response
Expected behaviour
No response
Screenshots
No response
Sample project or code
No response
Aditional information
No response
The text was updated successfully, but these errors were encountered: