static void Main(string[] args) { var options = new Options(); if (!Parser.Default.ParseArguments(args, options)) return; try { PerformTask(options); } catch (WebException exception) { Console.WriteLine(exception.Message); } }
private static void PerformTask(Options options) { using (var client = new WebClient()) { if (options.Snapshot) { // TODO KO // Stream stream = client.OpenRead(options.Address); // String request = reader.ReadToEnd(); } else { client.UploadFile(options.Address, options.InputFile); } } }