Пример #1
0
        public Task StartDeploymentServiceAsync(CancellationToken token)
        {
            foreach (var kvp in AzureCredentialEnvironmentVariables)
            {
                Environment.SetEnvironmentVariable(kvp.Key, kvp.Value);
            }

#if NET_COREAPP
            return(DeploymentProgram.RunAsync(new[]
            {
                "--KeyVaultUri", KeyVaultUri,
                "--DeploymentRoot", DeploymentRoot
            },
                                              token));
#else
            return(Task.CompletedTask);
#endif
        }
Пример #2
0
        public static async Task <int> RunDeploymentProxyWithCacheServiceAsync(string[] args = null, CancellationToken token = default)
        {
            try
            {
                await Task.Yield();

                args ??= new[]
                {
                    "cacheService",
                    "--cacheconfigurationPath", SourceRoot + @"\CacheConfiguration.json",
                    "--proxyconfigurationPath", SourceRoot + @"\ProxyConfiguration.json",
                    "--standalone", "true"
                };
#if NET_COREAPP
                await DeploymentProgram.RunAsync(args, token);
#endif
                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception in RunDeploymentProxyWithCacheServiceAsync: " + ex.ToString());
                return(-1);
            }
        }