public GSPlatform(string apiKey, string apiSecret, string apiCredential)
#endif
        {
#if !__WINDOWS__
            ApiKey        = apiKey;
            ApiSecret     = apiSecret;
            ApiCredential = apiCredential;
            string newDataPath = Path.Combine(PersistentDataPath, dataPath);
#endif

#if __IOS__
            dispatchAdapter = new DispatchAdapter(owner);
#elif __ANDROID__
            dispatchAdapter = new DispatchAdapter(activity);
#elif __WINDOWS__
            dispatchAdapter = new DispatchAdapter();
#endif
            dispatchAdapter = new DispatchAdapter();
#if !__WINDOWS__
            dataStore = new KeyValueStore();
            try
            {
                if (File.Exists(newDataPath))
                {
                    using (var stream = File.OpenRead(newDataPath))
                    {
                        dataStore = KeyValueStore.Read(stream);
                    }
                }
            }
            catch
            {
            }
#endif
        }
Esempio n. 2
0
 public void Setup()
 {
     _lakselvAirport   = new Airport("LKL", "Lakselv");
     _trondheimAirport = new Airport("TRD", "Trondheim");
     _flightsService   = new FlightsServiceStub();
     _objectStore      = new ObjectStoreStub();
     _messenger        = new TinyMessengerHub();
     _dispatcher       = new DispatchAdapter();
     _viewModel        = new FlightsViewModel(_flightsService, _objectStore, _messenger, _dispatcher);
 }
Esempio n. 3
0
 public DispatchController()
 {
     DispatchAdapter = new DispatchAdapter();
 }
 public DispatchController()
 {
     DispatchAdapter = new DispatchAdapter();
 }
 public void Setup()
 {
     _lakselvAirport = new Airport("LKL", "Lakselv");
     _trondheimAirport = new Airport("TRD", "Trondheim");
     _flightsService = new FlightsServiceStub();
     _objectStore = new ObjectStoreStub();
     _messenger = new TinyMessengerHub();
     _dispatcher = new DispatchAdapter();
     _viewModel = new FlightsViewModel(_flightsService, _objectStore, _messenger, _dispatcher);
 }
Esempio n. 6
0
 public HomeController()
 {
     DispatchAdapter = new DispatchAdapter();
 }