1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00
bitwarden-mobile/src/Core/Utilities/AppSetup.cs
2023-09-29 11:02:19 -03:00

27 lines
953 B
C#

using Bit.App.Abstractions;
using Bit.App.Lists.ItemViewModels.CustomFields;
using Bit.App.Services;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
namespace Bit.App.Utilities
{
public interface IAppSetup
{
void InitializeServicesLastChance();
}
public class AppSetup : IAppSetup
{
public void InitializeServicesLastChance()
{
var i18nService = ServiceContainer.Resolve<II18nService>("i18nService");
var eventService = ServiceContainer.Resolve<IEventService>("eventService");
// TODO: This could be further improved by Lazy Registration since it may not be needed at all
ServiceContainer.Register<ICustomFieldItemFactory>("customFieldItemFactory", new CustomFieldItemFactory(i18nService, eventService));
ServiceContainer.Register<IDeepLinkContext>(new DeepLinkContext(ServiceContainer.Resolve<IMessagingService>()));
}
}
}