public async override Task <DeliverableResponse> Run(string command, string[] args)
        {
            string path;

            if (settings.TryGetSiteRootDirectory(out path))
            {
                await Out.WriteLineFormattedAsync("Site root directory: {0}", path);
            }
            else
            {
                await Out.WriteLineAsync("Unable to locate the site root directory");
            }

            if (settings.TryGetUmbracoDirectory(out path))
            {
                await Out.WriteLineFormattedAsync("Umbraco directory: {0}", path);
            }
            else
            {
                await Out.WriteLineAsync("Unable to locate the Umbraco directory");
            }

            if (settings.TryGetChauffeurDirectory(out path))
            {
                await Out.WriteLineFormattedAsync("Chauffeur directory: {0}", path);
            }
            else
            {
                await Out.WriteLineAsync("Unable to locate the Chauffeur directory");
            }

            await Out.WriteLineFormattedAsync("Connection string: {0}", settings.ConnectionString);

            return(DeliverableResponse.Continue);
        }
Esempio n. 2
0
        public async override Task <DeliverableResponse> Run(string command, string[] args)
        {
            var dic = new Dictionary <string, string>
            {
                { "Umbraco Version", settings.UmbracoVersion },
                { "Chauffeur Version", settings.ChauffeurVersion }
            };

            if (settings.TryGetSiteRootDirectory(out string path))
            {
                dic.Add("Site Root", path);
            }
            else
            {
                dic.Add("Site Root", "Failed to access");
            }

            if (settings.TryGetUmbracoDirectory(out path))
            {
                dic.Add("Umbraco Directory", path);
            }
            else
            {
                dic.Add("Umbraco Directory", "Failed to access");
            }

            if (settings.TryGetChauffeurDirectory(out path))
            {
                dic.Add("Chauffeur Directory", path);
            }
            else
            {
                dic.Add("Chauffeur Directory", "Failed to access");
            }

            dic.Add("Connection String", settings.ConnectionString.ConnectionString);

            await Out.WriteTableAsync(dic.Keys.Select(key => new
            {
                Setting = key,
                Value   = dic[key]
            }));

            return(DeliverableResponse.Continue);
        }