Esempio n. 1
0
        private async static Task ReadChannelData()
        {
            AuthenticationConfig config = AuthenticationConfig.ReadFromJsonFile("appsettings.json");
            var channelInfoFile         = config.ChannelsConfig;


            ChannelStore channelInfo = ChannelStore.ReadFromJsonFile(channelInfoFile);

            if (channelInfo != null && channelInfo.Channels.Any())
            {
                Channels.AddRange(channelInfo.Channels);
            }
            else
            {
                Console.WriteLine("No Channels to List");
            }
        }
Esempio n. 2
0
        public static async Task Main(string[] args)
        {
            try
            {
                await ReadChannelData();
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex.Message);
                Console.ResetColor();
            }

            try
            {
                AuthenticationConfig config = AuthenticationConfig.ReadFromJsonFile("appsettings.json");
                LogonName = config.UserName;
                var passCode = config.Passcode;

                var x = passCode.ToCharArray();

                x.ToList().ForEach(x => Passcode.AppendChar(x));


                await GetUserNameByCredentialProvider();

                //await SetUp();
                Console.ForegroundColor = ConsoleColor.Yellow;
                while (loop)
                {
                    Loop();
                }
            }
            catch (Exception ex)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(ex.Message);
                Console.ResetColor();
            }
        }