Esempio n. 1
0
        private void SetIoc()
        {
            Xamarin.Forms.Forms.Init();
            Xamarin.FormsMaps.Init();

            LitePlatform.Initialize(new LitePlatformiOS());

            var app = new XFormsAppiOS();

            app.Init(this);

            var resolverContainer = new SimpleContainer();

            resolverContainer.Register <IDevice>(t => AppleDevice.CurrentDevice)
            .Register <IDisplay>(t => t.Resolve <IDevice>().Display)
            .Register <IFontManager>(t => new FontManager(t.Resolve <IDisplay>()))
            .Register <IGeolocator>(t => new Geolocator())
            .Register <ITextToSpeechService, TextToSpeechService>()
            .Register <IEmailService, EmailService>()
            .Register <IMediaPicker, MediaPicker>()
            .Register <ISecureStorage, SecureStorage>()
            .Register <IDependencyContainer>(t => resolverContainer);

            Resolver.SetResolver(resolverContainer.GetResolver());
        }
Esempio n. 2
0
 public TestBase()
 {
     LitePlatform.Initialize(new LitePlatformWindowsStore(ApplicationData.Current.TemporaryFolder));
 }
 public DatabaseService()
 {
     LitePlatform.Initialize(new LitePlatformWindowsStore());
     CreateDB();
 }
Esempio n. 4
0
 public TestBase()
 {
     LitePlatform.Initialize(new LitePlatformNetCore());
 }
Esempio n. 5
0
 public TestBase()
 {
     LitePlatform.Initialize(new LitePlatformAndroid());
 }
 public DatabaseQueryMethods()
 {
     LitePlatform.Initialize(new LitePlatformWindowsStore());
     CreateDB();
 }
 public DatabaseDataLogStorage()
 {
     LitePlatform.Initialize(new LitePlatformFullDotNet());
 }
Esempio n. 8
0
 public PlaylistService(string name)
 {
     LitePlatform.Initialize(new LitePlatformWindowsStore());
     Name = name;
     CreateDB();
 }
Esempio n. 9
0
 public TestBase()
 {
     LitePlatform.Initialize(new LiteDB.Platform.LitePlatformFullDotNet());
 }
Esempio n. 10
0
 public TestBase()
 {
     LitePlatform.Initialize(new LitePlatformWindowsStore());
 }
Esempio n. 11
0
 public TestBase()
 {
     LitePlatform.Initialize(new LitePlatformiOS());
 }