public GoogleDriveServerSyncProvider(IConfigurationRetriever configurationRetriever, IGoogleDriveService googleDriveService, ILogManager logManager, IHttpClient httpClient) { _configurationRetriever = configurationRetriever; _googleDriveService = googleDriveService; _httpClient = httpClient; _logger = logManager.GetLogger("GoogleDrive"); }
public GoogleDriveTreeViewModel(string credentialFileName, string applicationName) { var view = _itemsView = new ListCollectionView(_items); view.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); _gService = new GoogleDriveService(credentialFileName, applicationName); }
private void ActivateGoogleDrive(object obj) { if (!IsGoogleDriveEnabled) { if (_googleDriveService == null) { _googleDriveService = Container.Resolve <IGoogleDriveService>(); } if (_googleDriveService != null && _googleDriveService.IsInitalized()) { _googleDriveService.CreateApplicationFolder(); _configService.SaveAppSettingsValue(AppSettingConstants.IsGoogleDriveEnabled, "true"); IsGoogleDriveEnabled = true; } else { _messenger.Send(new GoogleDriveAccessDeniedMsg()); _googleDriveService = null; } } else { _messenger.Send(new GoogleDriveAlreadyEnabledMsg()); } }
public MainWindowViewModel(IDatabaseService databaseService, IMessenger messenger, IImageService imageService, IDataService dataService, IJsonService jsonService, IFtpService ftpService, IConfigService configService) { _databaseService = databaseService; _messenger = messenger; _imageService = imageService; _dataService = dataService; _jsonService = jsonService; _ftpService = ftpService; _configService = configService; //register for messages _messenger.Register <ChooseFilesConfirmMsg>(this, OnChooseFilesConfirmMsg); _messenger.Register <ImportConfirmMsg>(this, OnImportConfirmMsg); _messenger.Register <ExportViewClosedMsg>(this, OnExportviewClosedMsg); _messenger.Register <ChooseFilesGoogleDriveConfirmMsg>(this, OnChooseFilesGoogleDriveConfirmMsg); _messenger.Register <FileProcessFinishedMsg>(this, OnFileProcessFinishedMsg); IsGoogleDriveEnabled = Convert.ToBoolean(_configService.GetAppSettingsValue(AppSettingConstants.IsGoogleDriveEnabled)); _mobileKey = _configService.GetAppSettingsValue(AppSettingConstants.MobileKey); if (!string.IsNullOrEmpty(_mobileKey)) { HasMobileKey = true; } if (IsGoogleDriveEnabled) { _googleDriveService = Container.Resolve <IGoogleDriveService>(); _googleDriveService.DownloadCompleted += GoogleDriveService_DownloadCompleted; } }
public CommandController( EnbsvParserService enbsvParserService, GazServiceParserService gazServiceParserService, IPartsRepository partsRepository, IPartProducerRepository partProducerRepository, ICatalogItemRepository catalogItemRepository, IPartSupplierRepository partSupplierRepository, ISupplierPriceItemRepository supplierPriceItemRepository, IModerationService moderationService, IHostingEnvironment hostingEnvironment, ISchedulerWrapper scheduler, IGoogleDriveService googleDriveService) { this._scheduler = scheduler; this._googleDriveService = googleDriveService; this._moderationService = moderationService; this._gazServiceParserService = gazServiceParserService; this._enbsvParserService = enbsvParserService; this._partSupplierRepository = partSupplierRepository; this._partsRepository = partsRepository; this._partProducerRepository = partProducerRepository; this._hostingEnvironment = hostingEnvironment; this._catalogItemRepository = catalogItemRepository; this._supplierPriceItemRepository = supplierPriceItemRepository; }
public RoutesController(IIOServiceContext context, IHttpContextAccessor httpContextAccessor, IGoogleDriveService googleDriveService, IVtexAPIService vtexAPIService, IDriveImportRepository driveImportRepository) { this._context = context ?? throw new ArgumentNullException(nameof(context)); this._httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); this._googleDriveService = googleDriveService ?? throw new ArgumentNullException(nameof(googleDriveService)); this._vtexAPIService = vtexAPIService ?? throw new ArgumentNullException(nameof(vtexAPIService)); this._driveImportRepository = driveImportRepository ?? throw new ArgumentNullException(nameof(driveImportRepository)); }
public Mutation(IGoogleDriveService googleDriveService, IDriveImportRepository driveImportRepository, IVtexAPIService vtexAPIService) { Name = "Mutation"; Field <StringGraphType>( "importImages", resolve: context => { return(vtexAPIService.DriveImport()); }); Field <BooleanGraphType>( "revokeToken", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "accountName", Description = "Account Name" } ), resolve: context => { bool revoked = googleDriveService.RevokeGoogleAuthorizationToken().Result; if (revoked) { string accountName = context.GetArgument <string>("accountName"); driveImportRepository.SaveFolderIds(null, accountName); } return(revoked); }); Field <StringGraphType>( "googleAuthorize", resolve: context => { return(googleDriveService.GetGoogleAuthorizationUrl()); }); Field <StringGraphType>( "createSheet", resolve: context => { return(googleDriveService.CreateSheet()); }); Field <StringGraphType>( "processSheet", resolve: context => { return(vtexAPIService.SheetImport()); }); Field <StringGraphType>( "addImages", resolve: context => { return(googleDriveService.ClearAndAddImages()); }); }
public CandidatoService( ICandidatoRepository candidatoRepository, IApiResponseMessage apiResponseMessage, IGoogleDriveService googleDriveService) { _candidatoRepository = candidatoRepository; _utilitarios = apiResponseMessage; _googleDriveService = googleDriveService; }
public GameController(GameTestingReportCompiler testReportCompiler, IConfigurationService configService, IGoogleDriveService driveService, IGameRetrieverService drawStore, IPlayerDatabaseController playerController, IStatisticsService statisticsService) { _configService = configService; _driveService = driveService; _gameStore = drawStore; _playerController = playerController; _statisticsService = statisticsService; _gameTestReportCompiler = testReportCompiler; }
public NewFolderViewModel(IMainModel mainModel, INavigationService navigationService, IGoogleDriveService googleDriveService, ISystemTrayService systemTrayService, IMessageBoxService messageBoxService) { _mainModel = mainModel; _navigationService = navigationService; _googleDriveService = googleDriveService; _systemTrayService = systemTrayService; _messageBoxService = messageBoxService; CreateNewFolderCommand = new RelayCommand(CreateNewFolder, () => !IsBusy); }
public Main() { InitializeComponent(); Load += Main_Load; _propertyService = new PropertyService(); _tenantService = new TenantService(); _googleDriveService = new GoogleDriveService(); _nameErrorProvider = new ErrorProvider(); }
public DiscordBotCommunicator(IReporter reporter, IGoogleDriveService gdriveService, IAccountController accountController, IPlayerDatabaseController playerDatabaseController, IGameExecutor gameExecutor, IConfigurationService configurationService) { _reporter = reporter; _accountController = accountController; _playerDatabaseController = playerDatabaseController; _gameExecutor = gameExecutor; _configService = configurationService; _reporter.Initialise(); }
public ListaService( IListaRepository listaRepository, IApiResponseMessage utilitarios, IGoogleDriveService googleDriveService, ICandidatoService candidatoService, ICandidatoRepository candidatoRepository ) { _listaRepository = listaRepository; _googleDriveService = googleDriveService; apiResponseMessage = utilitarios; _candidatoService = candidatoService; _candidatoRepository = candidatoRepository; }
public RenameFileViewModel(IMainModel mainModel, INavigationService navigationService, IGoogleDriveService googleDriveService, ISystemTrayService systemTrayService, IMessageBoxService messageBoxService) { _mainModel = mainModel; _navigationService = navigationService; _googleDriveService = googleDriveService; _systemTrayService = systemTrayService; _messageBoxService = messageBoxService; RenameFileCommand = new RelayCommand(RenameFile, () => !IsBusy); PageLoadedCommand = new RelayCommand(() => { FileName = _mainModel.SelectedFile.Title; }); }
public UsuarioCBService( IListaRepository listaRepository, IApiResponseMessage utilitarios, IGoogleDriveService googleDriveService, ICandidatoService candidatoService, ICandidatoRepository candidatoRepository, IClienteRepository clientesRepository, IUsuarioCoreBRepository usuarioCBRepository ) { _listaRepository = listaRepository; _googleDriveService = googleDriveService; apiResponseMessage = utilitarios; _candidatoService = candidatoService; _candidatoRepository = candidatoRepository; _clienteRepository = clientesRepository; _usuarioCBRepository = usuarioCBRepository; }
public CuentaService( IListaRepository listaRepository, IApiResponseMessage apiResponseMessage, IGoogleDriveService googleDriveService, ICandidatoService candidatoService, ICandidatoRepository candidatoRepository, IClienteRepository clientesRepository, ICuentasRepository cuentasRespository ) { _listaRepository = listaRepository; _googleDriveService = googleDriveService; _apiResponseMessage = apiResponseMessage; _candidatoService = candidatoService; _candidatoRepository = candidatoRepository; _clienteRepository = clientesRepository; _cuentasRespository = cuentasRespository; }
public MovimientoService( IListaRepository listaRepository, IApiResponseMessage utilitarios, IGoogleDriveService googleDriveService, ICandidatoService candidatoService, ICandidatoRepository candidatoRepository, IClienteRepository clientesRepository, IMovimientoRepository movimientoRepository, ICuentasRepository cuentasRepository, IApiResponseMessage apiResponseMessage ) { _listaRepository = listaRepository; _googleDriveService = googleDriveService; apiResponseMessage = utilitarios; _candidatoService = candidatoService; _candidatoRepository = candidatoRepository; _clienteRepository = clientesRepository; _movimientoRepository = movimientoRepository; _cuentasRepository = cuentasRepository; _apiResponseMessage = apiResponseMessage; }
public SyncOrchestrator(ISourceFileProvider sourceFileProvider, IGoogleDriveService googleDriveService, ILog log) { _log = log; _googleDriveService = googleDriveService; _sourceFileProvider = sourceFileProvider; }
public ExplorerViewModel(IMainModel mainModel, IGoogleDriveService googleDriveService, INavigationService navigationService, IMessageBoxService messageBoxService, ISystemTrayService systemTrayService, IPhotoChooserService photoChooserService) { _mainModel = mainModel; _googleDriveService = googleDriveService; _navigationService = navigationService; _messageBoxService = messageBoxService; _systemTrayService = systemTrayService; _photoChooserService = photoChooserService; Files = new ObservableCollection<GoogleFileViewModel>(); PictureFiles = new ObservableCollection<GoogleFileViewModel>(); OpenFileCommand = new RelayCommand<GoogleFileViewModel>(file => { if (IsSelectionEnabled) { return; } OpenFile(file); }); ChangeStaredStatusCommand = new RelayCommand<GoogleFileViewModel>(file => { if (IsSelectionEnabled) { return; } ChangeStaredStatus(file); }); AddFileCommand = new RelayCommand(UploadFile); EnableSelectionCommand = new RelayCommand(() => { if (IsBusy) { return; } IsSelectionEnabled = true; }); RefreshFilesCommand = new RelayCommand(RefreshFiles); DeleteFilesCommand = new RelayCommand<IList>(files => { _messageBoxService.Show("You are about to delete the selected files. Do you wish to proceed?", "Delete files?", new[] { "delete", "cancel" }, button => { if (button != 0) return; var filesArray = files .Cast<GoogleFileViewModel>() .ToArray(); IsSelectionEnabled = false; DeleteFiles(filesArray); }); }); CreateNewFolderCommand = new RelayCommand(CreateNewFolder); RenameFileCommand = new RelayCommand<GoogleFileViewModel>(RenameFile); DeleteFileCommand = new RelayCommand<GoogleFileViewModel>(file => { _messageBoxService.Show(string.Format("You are about to delete '{0}'. Do you wish to proceed?", file.Title), "Delete file?", new[] { "delete", "cancel" }, button => { if (button != 0) return; DeleteFile(file); }); }); ShowAboutCommand = new RelayCommand(() => { _navigationService.NavigateTo("/View/AboutPage.xaml"); }); PageLoadedCommand = new RelayCommand(ExecuteInitialLoad); BackKeyPressCommand = new RelayCommand<CancelEventArgs>(e => { GoogleDriveFile item; if (PivotSelectedIndex == 1) { PivotSelectedIndex = 0; e.Cancel = true; } else if (IsSelectionEnabled) { IsSelectionEnabled = false; e.Cancel = true; } else if (_mainModel.TryPop(out item)) { AbortCurrentCall(); RaisePropertyChanged(() => CurrentPath); RefreshFiles(); e.Cancel = true; } else { AbortCurrentCall(true); Files.Clear(); PictureFiles.Clear(); } }); MessengerInstance.Register<RefreshFilesMessage>(this, message => { DispatcherHelper.RunAsync(RefreshFiles); }); }
public FileManager(IGoogleDriveService googleDriveService) { GoogleDriveService = googleDriveService; }
public Uploader(IGoogleDriveService googleDriveService) { GoogleDriveService = googleDriveService; }
public void Initialize(IGoogleDriveService gService) { _gService = gService; _gService.FileCreated += HandleGoogleDriveFileCreated; }
public MemoryOptionsController(IMemoryOptionService service, IGoogleDriveService driveService) { _service = service; _driveService = driveService; }
public GoogleDriveRestfulService2(IConfigurationRetriever configurationRetriever, IGoogleAuthService googleAuthService, IGoogleDriveService googleDriveService) { _configurationRetriever = configurationRetriever; _googleAuthService = googleAuthService; _googleDriveService = googleDriveService; }
public void Initialize(IGoogleDriveService gService) { _gService = gService; }
public ImpDrive(IGoogleDriveService googleDriveOperation) { _googleDriveOperation = googleDriveOperation; }
public MotherboardsController(IMotherboardService service, IGoogleDriveService driveService) { _service = service; _driveService = driveService; }
public ProposalService(OfferMakerDbContext db, IGoogleDriveService googleDriveService) { this.db = db; this.googleDriveService = googleDriveService; }
public Reader(IGoogleDriveService googleDriveService) { GoogleDriveService = googleDriveService; }
public ViewFileViewModel(IMainModel mainModel, IGoogleDriveService googleDriveService, IMessageBoxService messageBoxService, ISystemTrayService systemTrayService, IMediaLibraryService mediaLibraryService) { _mainModel = mainModel; _googleDriveService = googleDriveService; _messageBoxService = messageBoxService; _systemTrayService = systemTrayService; _mediaLibraryService = mediaLibraryService; DownloadFileCommand = new RelayCommand(DownloadFile, () => !IsBusy && CanDownload); BackKeyPressCommand = new RelayCommand<CancelEventArgs>(e => { AbortCurrentCall(false); }); }
public Query(IGoogleDriveService googleDriveService, IDriveImportRepository driveImportRepository) { Name = "Query"; FieldAsync <BooleanGraphType>( "haveToken", resolve: async context => { Token token = await googleDriveService.GetGoogleToken(); return(token != null && !string.IsNullOrEmpty(token.RefreshToken)); } ); /// query Reviews($searchTerm: String, $from: Int, $to: Int, $orderBy: String, $status: Boolean) FieldAsync <StringGraphType>( "getOwnerEmail", arguments: new QueryArguments( new QueryArgument <StringGraphType> { Name = "accountName", Description = "Account Name" } ), resolve: async context => { string email = string.Empty; string accountName = context.GetArgument <string>("accountName"); Token token = await googleDriveService.GetGoogleToken(); if (token != null) { string newFolderId = string.Empty; FolderIds folderIds = await driveImportRepository.LoadFolderIds(accountName); if (folderIds != null) { newFolderId = folderIds.NewFolderId; } else { newFolderId = await googleDriveService.FindNewFolderId(accountName); } ListFilesResponse listFilesResponse = await googleDriveService.ListFiles(); if (listFilesResponse != null) { var owners = listFilesResponse.Files.Where(f => f.Id.Equals(newFolderId)).Select(o => o.Owners.Distinct()).FirstOrDefault(); if (owners != null) { email = owners.Select(o => o.EmailAddress).FirstOrDefault(); } else { newFolderId = await googleDriveService.FindNewFolderId(accountName); owners = listFilesResponse.Files.Where(f => f.Id.Equals(newFolderId)).Select(o => o.Owners.Distinct()).FirstOrDefault(); if (owners != null) { email = owners.Select(o => o.EmailAddress).FirstOrDefault(); } } } } return(email); } ); FieldAsync <StringGraphType>( "sheetLink", resolve: async context => { return(await googleDriveService.GetSheetLink()); } ); }
public ImagesController(IJustMeetDbContext data, IGoogleDriveService drive) { this.data = data; this.drive = drive; }
public GpusController(IGpuService service, IGoogleDriveService driveService) { _service = service; _driveService = driveService; }
public GoogleDriveController(IGoogleDriveService service, ILog log) { _service = service; _log = log; }
public DrawStore(IGoogleDriveService driveService) { _service = driveService; }