Exemple #1
0
        // private async Task<MessageResponse> OnInputMessageReceived(Message msg, object ctx)
        // {
        //
        // }
        protected virtual async Task AzureConnectionInitAsync <M>() where M : AzureModuleBase, new()
        {
            await Task.Run(async() =>
            {
                try
                {
                    Module = new M();
                    await Module.AzureModuleInitAsync(this);
                }
                catch (Exception e)
                {
                    Log.WriteLine("AzureConnectionInitAsync ModuleInit lambda exception {0}", e.ToString());
                    Environment.Exit(1);     // failfast
                }
            });

            Log.WriteLine("Azure base generic connection Initialized");
        }