Beispiel #1
0
        static async Task Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("settings.json", true, true)
                         .AddJsonFile("local.settings.json", true, true)
                         .Build();

            storageClient = new StorageClient(config);
            storageClient.InitialiseConnection();

            var receiver = new NmeaReceiver("153.44.253.27", 5631);

            receiver.Items.Buffer(100).SelectMany(OnMessageReceivedAsync).Subscribe();

            while (!receiver.Connected)
            {
                await receiver.InitaliseAsync().ConfigureAwait(false);

                /*await foreach (var item in receiver.GetAsync())
                 * {
                 *  Console.WriteLine($"{item}");
                 * }*/

                await receiver.RecieveAsync().ConfigureAwait(false);
            }
        }
        static async Task Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                         .AddJsonFile("settings.json", true, true)
                         .AddJsonFile("local.settings.json", true, true)
                         .Build();

            storageClient = new StorageClient(config);
            var receiver = new NmeaReceiver("153.44.253.27", 5631);

            receiver.Items.Buffer(100).SelectMany(OnMessageReceivedAsync).Subscribe();

            while (!receiver.Connected)
            {
                await receiver.InitaliseAsync().ConfigureAwait(false);

                await receiver.RecieveAsync().ConfigureAwait(false);
            }
        }