Esempio n. 1
0
        static async Task <SpecToolClient> InitSpecToolClient(string url)
        {
            var credentials = Environment.GetEnvironmentVariable("SPECTOOL_CREDENTIALS", EnvironmentVariableTarget.User).Split(':');
            var username    = credentials[0];
            var password    = credentials[1];

            return(await SpecToolClient.Login(new Uri(url), username, password));
        }
Esempio n. 2
0
        static async Task <IEnumerable <SpecToolDocument> > GetWorkAreaDocuments(SpecToolClient specTool, string workAreaName)
        {
            var workAreas = await specTool.GetWorkAreas();

            var workArea = workAreas.FirstOrDefault(wa => wa.Name == workAreaName);

            return(workArea == null
                ? Enumerable.Empty <SpecToolDocument>()
                : await specTool.GetDocuments(workArea.Id));
        }