AmazonGlacierSample.Program.CheckRequiredFields C# (CSharp) Méthode

CheckRequiredFields() static private méthode

static private CheckRequiredFields ( ) : bool
Résultat bool
        static bool CheckRequiredFields()
        {
            NameValueCollection appConfig = ConfigurationManager.AppSettings;

            if (string.IsNullOrEmpty(appConfig["AWSProfileName"]))
            {
                Console.WriteLine("AWSProfileName was not set in the App.config file.");
                return false;
            }
            if (string.IsNullOrEmpty(vaultName))
            {
                Console.WriteLine("The variable vaultName is not set.");
                return false;
            }
            if (string.IsNullOrEmpty(filePath))
            {
                Console.WriteLine("The variable filePath is not set.");
                return false;
            }
            if (string.IsNullOrEmpty(downloadFilePath))
            {
                Console.WriteLine("The variable downloadFilePath is not set.");
                return false;
            }

            return true;
        }
    }