Ejemplo n.º 1
0
        public async Task Stream(string fromFile, int delay, FileType fileFormat)
        {
            var pc = new PowerBIProducerCommands(CurrentContext, service);

            int timeBetweenMessages = 1000;

            if (delay > 0)
            {
                timeBetweenMessages = delay;
            }

            if (fileFormat == FileType.NDJSON)
            {
                await pc.StreamNDJSON(fromFile, timeBetweenMessages);
            }
            else
            {
                Console.WriteLine($"Invalid file format: {fileFormat}, expected ndjson");
                return;
            }
        }