Esempio n. 1
0
        private static void Configure(EnvironmentOptions options)
        {
            var settingsRepository = new SettingsRepository();

            CreatioEnvironment.EnvironmentName = options.Environment;
            CreatioEnvironment.Settings        = settingsRepository.GetEnvironment(options);
        }
Esempio n. 2
0
 public override int Execute(OpenAppOptions options)
 {
     try {
         var settings = new SettingsRepository();
         var env      = settings.GetEnvironment(options);
         WebBrowser.OpenUrl(env.Uri);
         return(0);
     } catch (Exception e) {
         Console.WriteLine(e);
         return(1);
     }
 }
Esempio n. 3
0
        private static InstallNugetPkgOptions CreateInstallNugetPkgOptions(InstallGateOptions options)
        {
            var    settingsRepository   = new SettingsRepository();
            var    settings             = settingsRepository.GetEnvironment(options);
            string packageName          = settings.IsNetCore ? "cliogate_netcore" : "cliogate";
            var    nugetPackageFullName = new NugetPackageFullName(packageName, PackageVersion.LastVersion);

            return(new InstallNugetPkgOptions {
                Names = nugetPackageFullName,
                SourceUrl = "https://ts1-infr-nexus.bpmonline.com:8443/repository/developer-sdk",
                DevMode = options.DevMode,
                Environment = options.Environment,
                IsNetCore = options.IsNetCore,
                Login = options.Login,
                Maintainer = options.Maintainer,
                Password = options.Password,
                Safe = options.Safe
            });
        }
Esempio n. 4
0
        public void Delete_FormsCorrectApplicationRequest_WhenApplicationRunsUnderNetFramework()
        {
            IApplicationClient applicationClient = Substitute.For <IApplicationClient>();
            var deleteOptions = new DeletePkgOptions {
                Login      = "******",
                Password   = "******",
                IsNetCore  = false,
                Maintainer = "Test",
                Uri        = "http://test.domain.com",
                Name       = "TestPackage"
            };
            var settingsRepository             = new SettingsRepository();
            var environment                    = settingsRepository.GetEnvironment(deleteOptions);
            DeletePackageCommand deleteCommand = new DeletePackageCommand(applicationClient, environment);

            deleteCommand.Execute(deleteOptions);
            applicationClient.Received(1).ExecutePostRequest(
                deleteOptions.Uri + "/0/ServiceModel/AppInstallerService.svc/DeletePackage",
                "\"TestPackage\"", Arg.Any <int>());
        }
Esempio n. 5
0
        private static EnvironmentSettings GetEnvironmentSettings(EnvironmentOptions options)
        {
            var settingsRepository = new SettingsRepository();

            return(settingsRepository.GetEnvironment(options));
        }