Beispiel #1
0
 public SyncService(IMailchimpService mailchimpService, IFirestoreService firestoreService, ILogger <SyncService> logger, ICollection collection)
 {
     _mailchimpService = mailchimpService;
     _firestoreService = firestoreService;
     _logger           = logger;
     _collection       = collection;
 }
 public void Setup()
 {
     _firestoreService = new FirestoreService(ConfigurationService);
     _ftpService       = new FtpService(ConfigurationService);
     _storageService   = new StorageService(UnitTestLoggerFactory, ConfigurationService);
     _igcReaderService = new IgcReaderService();
 }
Beispiel #3
0
        public Program()
        {
            System.Environment.SetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS", "D:\\llauner\\GoogleCloud_Credentials\\Service_Account_Key-igcheatmap-f012be117f9c.json");

            _firestoreService = new FirestoreService(ConfigurationService);
            _ftpService       = new FtpService(ConfigurationService);
            _storageService   = new StorageService(ConfigurationService);
            _igcReaderService = new IgcReaderService();
        }
 public HeatmapController(ILogger <NetcoupeController> logger,
                          IConfigurationService configuration,
                          IDataConverter dataConverter,
                          IFirestoreService firestoreService)
 {
     _logger           = logger;
     _configuration    = configuration;
     _dataConverter    = dataConverter;
     _firestoreService = firestoreService;
 }
Beispiel #5
0
 public NetcoupeController(ILogger <NetcoupeController> logger,
                           IConfigurationService configuration,
                           IDataConverter dataConverter,
                           IAggregatorService aggregatorService,
                           IStorageService storageService,
                           IFirestoreService firestoreService)
 {
     _logger            = logger;
     _configuration     = configuration;
     _dataConverter     = dataConverter;
     _aggregatorService = aggregatorService;
     _storageService    = storageService;
     _firestoreService  = firestoreService;
 }
 public AggregatorService(ILoggerFactory loggerFactory,
                          IConfigurationService configuration,
                          IFtpService ftpService,
                          IFirestoreService fireStoreService,
                          IStorageService storageService,
                          IIgcReaderService igcReaderService,
                          INetcoupeService netcoupeService)
 {
     _logger           = loggerFactory.CreateLogger <AggregatorService>();
     _configuration    = configuration;
     _ftpService       = ftpService;
     _firestoreService = fireStoreService;
     _storageService   = storageService;
     _igcReaderService = igcReaderService;
     _netcoupeService  = netcoupeService;
 }
Beispiel #7
0
        public StorageService(
            ILogger <StorageService> logger, IJsInteropService jsInteropService,
            IFirebaseGoogleAuthService authService, IFirestoreService firestoreService)
        {
            Logger           = logger;
            JSR              = jsInteropService;
            AuthService      = authService;
            FirestoreService = firestoreService;

            AuthService.AuthStateChangedCallback += async(GoogleAuthUser user) =>
            {
                if (user != null)
                {
                    // signed in
                    if (!_subscribedForDocUpdates)
                    {
                        FirestoreOperationResult <UserDocument> res =
                            await FirestoreService.SubscribeForDocumentUpdates <UserDocument>(
                                "users", user.uid, async document =>
                        {
                            // Update local storage with firestore content
                            UserDocument userDoc = document as UserDocument;
                            if (userDoc.TrackedTimezoneIds == null || userDoc.TrackedTimezoneIds.Count == 0)
                            {
                                await DeleteAllTrackedTimezones();
                            }
                            else
                            {
                                await SaveTrackedTimezones(userDoc.TrackedTimezoneIds);
                            }

                            TrackedTimezoneListUpdateCallback.Invoke();
                        });

                        if (res.Success)
                        {
                            Logger.LogInformation("Subscribed for timezone list updates.");
                            _subscribedForDocUpdates = true;
                        }
                        else
                        {
                            Logger.LogError("Failed to subscribe for timezone list updates.");
                        }
                    }
                }
            };
        }
Beispiel #8
0
 public UserService(IFirestoreService firestoreService)
 {
     this.firestoreService = firestoreService;
 }
Beispiel #9
0
        public UserService(IFirestoreService firestoreService)
        {
            this.firestoreService = firestoreService;

            passwordRegex = new Regex(PasswordPattern);
        }
 public FirestoreController(IFirestoreService firestoreService)
 {
     _firestoreService = firestoreService;
 }
 public CartService(IFirestoreService firestoreService)
 {
     this.firestoreService = firestoreService;
 }
 public BookService(IFirestoreService firestoreService, IFilterService filterService)
 {
     this.firestoreService = firestoreService;
     this.filterService    = filterService;
 }
Beispiel #13
0
 public FirestoreController(ILogger <DatabaseController> logger, IFirestoreService service)
 {
     _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
     _fireStoreService = service ?? throw new ArgumentNullException(nameof(service));
 }
Beispiel #14
0
 public AuthorService(IFirestoreService firestoreService)
 {
     this.firestoreService = firestoreService;
 }
 public ReviewService(IFirestoreService firestoreService)
 {
     this.firestoreService = firestoreService;
 }