We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ITNOA
I think it is very useful to add ability to load configuration from file in Ioc, Some of values of this features
namespace Microsoft.Extensions.DependencyInjection { /// <summary> /// Extension methods for adding services to an <see cref="IServiceCollection" />. /// </summary> public static class ServiceCollectionServiceExtensions { public static IServiceCollection AddFromConfig(this IServiceCollection services, IConfigurationSection config) {} }
Ioc.Default.ConfigureServices( new ServiceCollection() .AddFromConfig(config.GetSection("Ioc")) .BuildServiceProvider());
// Register services Ioc.Default.ConfigureServices( new ServiceCollection() .AddSingleton<IDialogService, DialogService>() //Services .AddSingleton<IFilesService, FilesService>() .AddSingleton<ISettingsService, SettingsService>() .AddSingleton(RestService.For<IRedditService>("https://www.reddit.com/")) .AddSingleton(RestService.For<IContactsService>("https://randomuser.me/")) .AddTransient<PostWidgetViewModel>() //ViewModels .AddTransient<SubredditWidgetViewModel>() .AddTransient<ContactsListWidgetViewModel>() .AddTransient<AsyncRelayCommandPageViewModel>() .AddTransient<IocPageViewModel>() .AddTransient<MessengerPageViewModel>() .AddTransient<ObservableObjectPageViewModel>() .AddTransient<ObservableValidatorPageViewModel>() .AddTransient<ValidationFormWidgetViewModel>() .AddTransient<RelayCommandPageViewModel>() .AddTransient<CollectionsPageViewModel>() .AddTransient<SamplePageViewModel>() .BuildServiceProvider()); }
No response
The text was updated successfully, but these errors were encountered:
related to dotnet/runtime#71832 related to CommunityToolkit/dotnet#328
Sorry, something went wrong.
@khellang Any note about this issue?
thanks
No branches or pull requests
Background and motivation
ITNOA
I think it is very useful to add ability to load configuration from file in Ioc, Some of values of this features
API Proposal
API Usage
Alternative Designs
Risks
No response
The text was updated successfully, but these errors were encountered: