Exemple #1
0
        public async Task <List <string> > GetFileSystemNames(MajorVersion buildMajorVersion)
        {
            if (buildMajorVersion != MajorVersion.V30 && buildMajorVersion != MajorVersion.V35)
            {
                return(new List <string>());
            }

            try
            {
                return(await AbstractLegacyMigrator.GetResourcesToMigrate(_serverUrl, _httpClient, true, _apiKey, _enableBasicAuthenticationOverUnsecuredHttp, _skipServerCertificateValidation, null, _serverStore.ServerShutdown));
            }
            catch (Exception e) when(e is UnauthorizedAccessException || e is AuthorizationException)
            {
                return(new List <string>());
            }
        }
Exemple #2
0
        public async Task <List <string> > GetFileSystemNames(MajorVersion builMajorVersion)
        {
            if (builMajorVersion != MajorVersion.V30 && builMajorVersion != MajorVersion.V35)
            {
                return(new List <string>());
            }

            try
            {
                return(await AbstractLegacyMigrator.GetResourcesToMigrate(_serverUrl, _httpClient, true, _serverStore.ServerShutdown));
            }
            catch (UnauthorizedAccessException)
            {
                return(new List <string>());
            }
        }
Exemple #3
0
        public async Task <List <string> > GetDatabaseNames(MajorVersion buildMajorVersion, Reference <bool> authorized, Reference <bool> isLegacyOAuthToken = null)
        {
            authorized.Value = true;
            if (buildMajorVersion == MajorVersion.Unknown)
            {
                return(new List <string>());
            }

            try
            {
                return(buildMajorVersion == MajorVersion.V4
                    ? await Importer.GetDatabasesToMigrate(_serverUrl, _httpClient, _serverStore.ServerShutdown)
                    : await AbstractLegacyMigrator.GetResourcesToMigrate(_serverUrl, _httpClient, false, _apiKey, _enableBasicAuthenticationOverUnsecuredHttp, _skipServerCertificateValidation, isLegacyOAuthToken, _serverStore.ServerShutdown));
            }
            catch (Exception e) when(e is UnauthorizedAccessException || e is AuthorizationException)
            {
                authorized.Value = false;
                return(new List <string>());
            }
        }
Exemple #4
0
        public async Task <List <string> > GetDatabaseNames(MajorVersion builMajorVersion, Reference <bool> authorized)
        {
            authorized.Value = true;
            if (builMajorVersion == MajorVersion.Unknown)
            {
                return(new List <string>());
            }

            try
            {
                return(builMajorVersion == MajorVersion.V4
                    ? await Importer.GetDatabasesToMigrate(_serverUrl, _httpClient, _serverStore.ServerShutdown)
                    : await AbstractLegacyMigrator.GetResourcesToMigrate(_serverUrl, _httpClient, false, _serverStore.ServerShutdown));
            }
            catch (UnauthorizedAccessException)
            {
                authorized.Value = false;
                return(new List <string>());
            }
        }