public FilesService( IDropboxService dropboxService, IDeletableEntityRepository <File> fileRepository) { this.dropboxService = dropboxService; this.fileRepository = fileRepository; }
public DropboxAuthenticationWindowViewModel(IDropboxService dropboxService, DropboxAppData dropboxAppData, DropboxAuthenticationWindowTranslation translation) { _dropboxService = dropboxService; _dropboxData = dropboxAppData; Translation = translation; CancelDialogCommand = new DelegateCommand(CancelInputDialog); }
public DropboxConsumerTokenManager(int userId,IDropboxService dropboxService, IUserService userService) { _userService = userService; _userId = userId; ConsumerKey = dropboxService.GetConsumerKey(); ConsumerSecret = dropboxService.GetConsumerSecret(); }
public DropboxUserInfoManager(IDropboxService dropboxService, DropboxAppData dropboxAppData, IDropboxHttpListener dropboxHttpListener, IDropboxCodeExchanger dropboxCodeExchanger) { _dropboxService = dropboxService; _dropboxAppData = dropboxAppData; _dropboxHttpListener = dropboxHttpListener; _dropboxCodeExchanger = dropboxCodeExchanger; }
public DropboxAuthenticationController(IDropboxService dropbox, IOrchardServices orchard, IHttpContextAccessor httpContext) { _dropbox = dropbox; _orchard = orchard; _httpContext = httpContext; Logger = NullLogger.Instance; }
public DropboxStorageController(IDropboxService dropbox, IOrchardServices orchard, IMediaLibraryService media) { _dropbox = dropbox; _orchard = orchard; _media = media; Logger = NullLogger.Instance; }
public DropboxAccountRemoveCommand(IInteractionRequest interactionRequest, ICurrentSettingsProvider currentSettingsProvider, IDropboxService dropboxService, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _dropboxService = dropboxService; _profiles = currentSettingsProvider?.Profiles; _dropboxAccounts = currentSettingsProvider?.Settings?.ApplicationSettings?.Accounts?.DropboxAccounts ?? new ObservableCollection <DropboxAccount>(); _dropboxAccounts.CollectionChanged += (sender, args) => RaiseCanExecuteChanged(); }
public DropboxAuthenticationController(IDropboxService dropbox, IOrchardServices orchard, IHttpContextAccessor httpContext) { _dropbox = dropbox; _orchard = orchard; _httpContext = httpContext; Logger = NullLogger.Instance; }
public DropboxStorageController(IDropboxService dropbox, IOrchardServices orchard, IMediaLibraryService media) { _dropbox = dropbox; _orchard = orchard; _media = media; Logger = NullLogger.Instance; }
public DropboxFileSystemProvider(IDropboxService dropbox,IZinOSDesktopDropboxAccount zinOSDesktopDropboxAccount) { _dropboxService = dropbox; _zinOSDesktopDropboxAccount = zinOSDesktopDropboxAccount; _rootFileSystemItem = new FileSystemItem { IsDirectory = true, Path = String.Format(@"\{0}", DropboxProviderName), Name = DropboxProviderName }; }
public void Setup() { var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _translation = new DropboxTranslation(); _dropboxService = Substitute.For <IDropboxService>(); _dropboxService.ParseAccessToken(Arg.Any <Uri>()).Returns("AccessAccount"); _dropboxAppData = new DropboxAppData("DummieAppKeyForTest", _redirectUri); _viewModel = new DropboxAccountViewModel(_dropboxService, _dropboxAppData, translationUpdater); _accountInteraction = new DropboxAccountInteraction(); _viewModel.SetInteraction(_accountInteraction); }
public DropboxAccountRemoveCommand(IInteractionRequest interactionRequest, ICurrentSettings <Accounts> accountsProvider, ICurrentSettings <ObservableCollection <ConversionProfile> > profilesProvider, IDropboxService dropboxService, ITranslationUpdater translationUpdater) : base(translationUpdater) { _interactionRequest = interactionRequest; _accountsProvider = accountsProvider; _profilesProvider = profilesProvider; _dropboxService = dropboxService; }
public DropboxActionViewModel(DropboxSettingsAndActionTranslation translation, IInteractionInvoker interactionInvoker, IDropboxService dropboxService, TokenHelper tokenHelper) { Translation = translation; _interactionInvoker = interactionInvoker; _dropboxService = dropboxService; AddDropboxAccountCommand = new DelegateCommand(AuthoriseDropboxUser); _accountsCollection = new SynchronizedCollection <DropboxAccount>(new List <DropboxAccount>()); RemoveDropboxAccountCommand = new DelegateCommand(RemoveDropboxAccount, RemoveDropboxCanExecute); TokenReplacer = tokenHelper.TokenReplacerWithPlaceHolders; TokenViewModel = new TokenViewModel(x => CurrentProfile.DropboxSettings.SharedFolder = x, () => CurrentProfile?.DropboxSettings.SharedFolder, tokenHelper.GetTokenListForDirectory()); DisplayName = translation.DisplayName; }
public DropBoxControlViewModel(IInteractionInvoker interactionInvoker, IDropboxService dropboxService, TokenHelper tokenHelper, ITranslationUpdater translationUpdater, ISelectedProfileProvider profile) : base(translationUpdater, profile) { _interactionInvoker = interactionInvoker; _dropboxService = dropboxService; AddDropboxAccountCommand = new DelegateCommand(AuthoriseDropboxUser); _accountsCollection = new Helper.SynchronizedCollection <DropboxAccount>(new List <DropboxAccount>()); RemoveDropboxAccountCommand = new DelegateCommand(RemoveDropboxAccount, RemoveDropboxCanExecute); if (tokenHelper != null) { TokenReplacer = tokenHelper.TokenReplacerWithPlaceHolders; TokenViewModel = new TokenViewModel(x => CurrentProfile.DropboxSettings.SharedFolder = x, () => CurrentProfile?.DropboxSettings.SharedFolder, tokenHelper.GetTokenListForDirectory(), ReplaceTokens); } }
public void SetUp() { _interactionRequest = new UnitTestInteractionRequest(); _translation = new DropboxTranslation(); _dropboxAccounts = new ObservableCollection <DropboxAccount>(); _usedAccount = new DropboxAccount(); _usedAccount.AccountId = nameof(_usedAccount); _usedAccount.AccountInfo = "AI1"; _usedAccount.AccessToken = "AT1"; _dropboxAccounts.Add(_usedAccount); _unusedAccount = new DropboxAccount(); _unusedAccount.AccountId = nameof(_unusedAccount); _unusedAccount.AccountInfo = "AI2"; _unusedAccount.AccessToken = "AT2"; _dropboxAccounts.Add(_unusedAccount); _profilesProvider = Substitute.For <ICurrentSettings <ObservableCollection <ConversionProfile> > >(); _profiles = new ObservableCollection <ConversionProfile>(); _profileWithDropboxActionEnabled = new ConversionProfile(); _profileWithDropboxActionEnabled.Name = nameof(_profileWithDropboxActionEnabled); _profileWithDropboxActionEnabled.DropboxSettings.Enabled = true; _profileWithDropboxActionEnabled.DropboxSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithDropboxActionEnabled); _profileWithDropboxActionDisabled = new ConversionProfile(); _profileWithDropboxActionDisabled.Name = nameof(_profileWithDropboxActionDisabled); _profileWithDropboxActionDisabled.DropboxSettings.Enabled = false; _profileWithDropboxActionDisabled.DropboxSettings.AccountId = _usedAccount.AccountId; _profiles.Add(_profileWithDropboxActionDisabled); var settings = new PdfCreatorSettings(); settings.ApplicationSettings.Accounts.DropboxAccounts = _dropboxAccounts; settings.ConversionProfiles = _profiles; _accountsProvider = Substitute.For <ICurrentSettings <Accounts> >(); _accountsProvider.Settings.Returns(settings.ApplicationSettings.Accounts); _profilesProvider.Settings.Returns(_profiles); var translationUpdater = new TranslationUpdater(new TranslationFactory(), new ThreadManager()); _dropboxService = Substitute.For <IDropboxService>(); _dropboxAccountRemoveCommand = new DropboxAccountRemoveCommand(_interactionRequest, _accountsProvider, _profilesProvider, _dropboxService, translationUpdater); }
public void SetUp() { _profile = new ConversionProfile(); _profile.DropboxSettings.Enabled = true; _profile.DropboxSettings.AccountId = _accountId; _dropboxService = Substitute.For <IDropboxService>(); _dropboxAccount = new DropboxAccount(); _dropboxAccount.AccountId = _accountId; _dropboxAccount.AccessToken = _accessToken; _accounts = new Accounts(); _accounts.DropboxAccounts.Add(_dropboxAccount); _dropboxAction = new DropboxAction(_dropboxService); }
public DropboxOAuthConsumer(int userId, IDropboxService dropboxService, IUserService userService) { var dropboxEnpoints = dropboxService.GetDroboxOAuthEndpoints(); ServiceProviderDescription = new ServiceProviderDescription { RequestTokenEndpoint = new MessageReceivingEndpoint(dropboxEnpoints.RequestToken, HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.PostRequest), UserAuthorizationEndpoint = new MessageReceivingEndpoint(dropboxEnpoints.UserAuthorization, HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.GetRequest), AccessTokenEndpoint = new MessageReceivingEndpoint(dropboxEnpoints.AccessToken, HttpDeliveryMethods.AuthorizationHeaderRequest | HttpDeliveryMethods.PostRequest), TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement() }, ProtocolVersion = ProtocolVersion.V10 }; WebConsumer = new WebConsumer(ServiceProviderDescription, new DropboxConsumerTokenManager(userId, dropboxService, userService)); }
public MainViewModel(ICryptographyService cryptographyService, IMessenger messenger, IDataAccessLayer database, IDropboxService dropboxService) { _cryptographyService = cryptographyService; _messenger = messenger; _database = database; _dropboxService = dropboxService; //register for messages _messenger.Register<AssignNewKeysConfirmMsg>(this, OnAssignNewKeysConfirmMsg); _messenger.Register<ExportPublicKeyConfirmMsg>(this, OnExportPublicKeyConfirmMsg); _messenger.Register<ContactsViewClosedMsg>(this, OnContactsViewClosedMsg); _messenger.Register<ChooseSourceConfirmMsg>(this, OnChooseSourceConfirmMsg); _messenger.Register<ChooseTargetConfirmMsg>(this, OnChooseTargetConfirmMsg); _messenger.Register<ContactSelectedMsg>(this, OnContactSelectedMsg); _messenger.Register<ConnectDropboxViewClosedMsg>(this, OnConnectDropboxViewClosedMsg); _messenger.Register<DropboxAccessTokenSavedMsg>(this, OnDropboxAccessTokenSavedMsg); _messenger.Register<FileListViewClosedMsg>(this, OnFileListViewClosedMsg); _messenger.Register<DropboxFileDownloadFinishedMsg>(this, OnDropboxFileDownloadFinishedMsg); _messenger.Register<EncryptionSuccsessMsg>(this, OnEncryptionSuccsessMsg); CheckDropboxAccess(); }
public MainViewModel(ICryptographyService cryptographyService, IMessenger messenger, IDataAccessLayer database, IDropboxService dropboxService) { _cryptographyService = cryptographyService; _messenger = messenger; _database = database; _dropboxService = dropboxService; //register for messages _messenger.Register <AssignNewKeysConfirmMsg>(this, OnAssignNewKeysConfirmMsg); _messenger.Register <ExportPublicKeyConfirmMsg>(this, OnExportPublicKeyConfirmMsg); _messenger.Register <ContactsViewClosedMsg>(this, OnContactsViewClosedMsg); _messenger.Register <ChooseSourceConfirmMsg>(this, OnChooseSourceConfirmMsg); _messenger.Register <ChooseTargetConfirmMsg>(this, OnChooseTargetConfirmMsg); _messenger.Register <ContactSelectedMsg>(this, OnContactSelectedMsg); _messenger.Register <ConnectDropboxViewClosedMsg>(this, OnConnectDropboxViewClosedMsg); _messenger.Register <DropboxAccessTokenSavedMsg>(this, OnDropboxAccessTokenSavedMsg); _messenger.Register <FileListViewClosedMsg>(this, OnFileListViewClosedMsg); _messenger.Register <DropboxFileDownloadFinishedMsg>(this, OnDropboxFileDownloadFinishedMsg); _messenger.Register <EncryptionSuccsessMsg>(this, OnEncryptionSuccsessMsg); CheckDropboxAccess(); }
public FileListViewModel(IDataAccessLayer database, IDropboxService dropboxService, IMessenger messenger) { _database = database; _dropboxService = dropboxService; _messenger = messenger; }
public Get_File_List_v1(ICrateManager crateManager, IDropboxService dropboxService) : base(crateManager) { _dropboxService = dropboxService; }
public FileListViewModel(IDataAccessLayer database, IDropboxService dropboxService, IMessenger messenger) { _database = database; _dropboxService = dropboxService; _messenger = messenger; }
public ConnectDropboxViewModel(IDataAccessLayer database, IMessenger messenger, IDropboxService dropboxService) { _database = database; _messenger = messenger; _dropboxService = dropboxService; }
public DropboxAction(IDropboxService dropboxService) { _dropboxService = dropboxService; }
/// <summary> /// Initializes a new instance of the <see cref="DropboxVirtualFile"/> class. /// </summary> /// <param name="virtualPath">The virtual path.</param> /// <param name="provider">The provider.</param> /// <param name="dropboxService"></param> public DropboxVirtualFile(string virtualPath, DropboxVirtualPathProvider provider, IDropboxService dropboxService) : base(virtualPath) { _dropboxService = dropboxService; _provider = provider; }
public UserController(IUserService userService, IDropboxService dropboxService) { _userService = userService; _dropboxService = dropboxService; }
public HomeController(IDropboxService dropboxService) { _dropboxService = dropboxService; }
public DropboxAccountViewModel(IDropboxService dropboxService, DropboxAppData dropboxAppData, ITranslationUpdater translationUpdater) : base(translationUpdater) { _dropboxService = dropboxService; _dropboxData = dropboxAppData; }
public DropboxAction(IDropboxService dropboxService, IDropboxSharedLinksProvider dropboxSharedLinksProvider) { _dropboxService = dropboxService; _dropboxSharedLinksProvider = dropboxSharedLinksProvider; }
/// <summary> /// Initializes a new instance of the <b>DropboxVirtualPathProvider</b> class. /// </summary> /// <param name="service"></param> public DropboxVirtualPathProvider(IDropboxService service) { _service=service; }
public ConnectDropboxViewModel(IDataAccessLayer database, IMessenger messenger, IDropboxService dropboxService) { _database = database; _messenger = messenger; _dropboxService = dropboxService; }