예제 #1
0
        public static async Task <TumblerClientRuntime> FromConfigurationAsync(TumblerClientConfigurationBase configuration, ClientInteraction interaction)
        {
            TumblerClientRuntime runtime = new TumblerClientRuntime();

            try
            {
                await runtime.ConfigureAsync(configuration, interaction).ConfigureAwait(false);
            }
            catch
            {
                runtime.Dispose();
                throw;
            }
            return(runtime);
        }
예제 #2
0
        public static async Task <TumblerClientRuntime> FromConfigurationAsync(TumblerClientConfiguration configuration, ClientInteraction interaction)
        {
            TumblerClientRuntime runtime = new TumblerClientRuntime();

            try
            {
                await runtime.ConfigureAsync(configuration, interaction).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                var message = ex.Message;
                runtime.Dispose();
                throw;
            }
            return(runtime);
        }
예제 #3
0
        public static async Task <TumblerClientRuntime> FromConfigurationAsync(TumblerClientConfigurationBase configuration, ClientInteraction interaction = null, bool connectionTest = false)
        {
            TumblerClientRuntime runtime = new TumblerClientRuntime();

            try
            {
                await runtime.ConfigureAsync(configuration, interaction, connectionTest).ConfigureAwait(false);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception during runtime configuration: " + e);
                runtime?.Dispose();
                throw;
            }
            return(runtime);
        }