Exemple #1
0
        private static async Task Login(So3ApiConnector connector, string url, EnvironmentInfoBase environmentInfo)
        {
            Console.WriteLine($"Login into '{url}'...");
            await connector.Login(environmentInfo.Username, environmentInfo.Password);

            Console.WriteLine("Successfully Logged in");
        }
Exemple #2
0
        private static async Task <LayoutPageResponse> SetupLayoutPage(
            So3ApiConnector connector,
            EnvironmentInfoBase environmentInfo)
        {
            var path     = environmentInfo.LayoutFacilityPath;
            var name     = environmentInfo.LayoutPageName;
            var fullPath = $"{path}/{name}";

            // Setup layout page
            Console.WriteLine($"Checking if Layout page with the path '<{fullPath}>' exists...");
            var layoutPage = await connector.GetLayoutPage(fullPath);

            if (layoutPage == null)
            {
                Console.WriteLine("Layout page doesn't exist. Creating ...");
                layoutPage = await connector.CreateLayoutPage(path, name);

                Console.WriteLine($"Layout page {layoutPage.Name} created with guid {layoutPage.LayoutGuid}");
            }
            else
            {
                Console.WriteLine($"Layout page {layoutPage.Name} exists with guid {layoutPage.LayoutGuid}");
            }

            return(layoutPage);
        }