public TestView() { InitializeComponent(); databaseService = CustomDependencyService.Get <IDatabaseService>(); randomService = CustomDependencyService.Get <IRandomService>(); fileEmbeddedService = CustomDependencyService.Get <IFileEmbeddedService>(); }
public RawSQLitePlatformService() { var path = CustomDependencyService.Get <IPathService>().GetDatabasePath("RawSqlite"); if (!File.Exists(path)) { SqliteConnection.CreateFile(path); } base.ApplySerialized(); Connection = new SqliteConnection($"Data Source={path};Version=3;PRAGMA journal_mode=WAL;PRAGMA cache_size=1;PRAGMA synchronous=1;PRAGMA locking_mode=EXCLUSIVE"); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); CustomDependencyService.Register <PathService>(); CustomDependencyService.Register <IRawSQLitePlatformService, RawSQLitePlatformService>(); global::Xamarin.Forms.Forms.Init(this, bundle); LoadApplication(new App()); }
public RawJsonService() { pathService = CustomDependencyService.Get <IPathService>(); }
private void ChangeDatabaseServiceType(Type targetType) { CustomDependencyService.Register(targetType); App.ChangePresented(); }
public MasterDetailPageMasterViewModel() { MenuItems = new ObservableCollection <MasterDetailPageMenuItem>(CustomDependencyService.Get <MenuService>().GetMenuItems()); }
public OrmSqliteService() { connection = new SQLite.SQLiteAsyncConnection(CustomDependencyService.Get <IPathService>().GetDatabasePath("sqlite.db")); CreateTables(); }
public RawSQLiteService() { platformService = CustomDependencyService.Get <IRawSQLitePlatformService>(); }
public LiteDBService() { database = new LiteDatabase(CustomDependencyService.Get <IPathService>().GetDatabasePath("LiteDB")); MapModels(); }
public RealmService() { database = Realms.Realm.GetInstance(CustomDependencyService.Get <IPathService>().GetDatabasePath("Realm")); }