Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3103e4
commit b661015
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.Extensions.DependencyInjection; | ||
using MvvmCross.Commands; | ||
using MvvmCross.Core; | ||
using MvvmCross.Navigation; | ||
using MvvmCross.ViewModels; | ||
|
||
namespace MvvmCross.Extensions; | ||
|
||
public static class MvvmCrossInfrastructureExtensions | ||
{ | ||
public static IServiceCollection AddCoreServices(this IServiceCollection services) | ||
{ | ||
services.AddSingleton<IMvxSettings, MvxSettings>(); | ||
services.AddSingleton<IMvxStringToTypeParser, MvxStringToTypeParser>(); | ||
services.AddSingleton<IMvxViewModelLoader, MvxViewModelLoader>(); | ||
services.AddSingleton<IMvxNavigationService, MvxNavigationService>(); | ||
services.AddSingleton<MvxViewModelByNameLookup>(); | ||
services.AddSingleton<IMvxViewModelTypeFinder, MvxViewModelViewTypeFinder>(); | ||
services.AddSingleton<IMvxTypeToTypeLookupBuilder, MvxViewModelViewLookupBuilder>(); | ||
services.AddSingleton<IMvxCommandCollectionBuilder, MvxCommandCollectionBuilder>(); | ||
services.AddSingleton<IMvxNavigationSerializer, MvxStringDictionaryNavigationSerializer>(); | ||
services.AddSingleton<IMvxChildViewModelCache, MvxChildViewModelCache>(); | ||
|
||
services.AddTransient<IMvxCommandHelper, MvxWeakCommandHelper>(); | ||
return services; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters