public GoogleDriveProvider(ProviderParameters model, IBlobCache blobCache) { Parameters = model; _blobCache = blobCache; _isAuthorized.OnNext(false); EnsureLoggedInIfTokenSaved(); }
public YandexDiskProvider(ProviderParameters model, IAuthenticator authenticator) { Parameters = model; _authenticator = authenticator; _isAuthorized.OnNext(false); EnsureLoggedInIfTokenSaved(); }
protected override void ProcessRecord() { IVault existingVault = null; var existingProfile = VaultProfileManager.GetProfile(ProfileName); if (existingProfile != null) { try { existingVault = Util.VaultHelper.GetVault(ProfileName); } catch (Exception) { } } if (Remove) { if (existingProfile == null) { return; } if (!Force && existingVault != null && existingVault.TestStorage()) { throw new InvalidOperationException("profile refers to an existing Vault;" + " specify -Force to remove anyway"); } VaultProfileManager.RemoveProfile(ProfileName); } else { if (!Force && existingProfile != null) { throw new InvalidOperationException("existing profile found;" + " specify -Force to overwrite"); } var pp = (IReadOnlyDictionary <string, object> )ProviderParameters.Convert <string, object>(); var vp = (IReadOnlyDictionary <string, object> )VaultParameters.Convert <string, object>(); VaultProfileManager.SetProfile(ProfileName, Provider, pp, vp); } }
public GitHubProvider(ProviderParameters model) { Parameters = model; _isAuthenticated.OnNext(false); EnsureLoggedInIfTokenSaved(); }
public XmlProvider(ProviderParameters constructorParams) : this((Uri)SentinelHelper.PassThroughNonNull(constructorParams).Data) { }
public VkDocsProvider(ProviderParameters model) { Parameters = model; _isAuthorized.OnNext(false); EnsureLoggedInIfTokenSaved(); }
public SftpProvider(ProviderParameters model) { Parameters = model; _isAuthorized.OnNext(false); }
public IProvider CreateProvider(ProviderParameters parameters) => parameters.Type switch {
public LocalProvider(ProviderParameters model) => Parameters = model;