static void Main(string[] args) { string firstArg; if (args.Length < 1) { firstArg = "1"; } else { firstArg = args[0]; } var artistId = Convert.ToInt32(firstArg); var appSettingsCredentials = new AppSettingsCredentials(); var apiUri = new ApiUri(); var api = new ApiFactory(apiUri, appSettingsCredentials); Console.WriteLine("Using creds: {0} - {1}", appSettingsCredentials.ConsumerKey, appSettingsCredentials.ConsumerSecret); // console apps can't have an async main method, so we have to call an async method var task = Use7DigitalApi(api, artistId); task.Wait(); Console.ReadKey(); }
static void Main(string[] args) { var s = args[0]; var artistId = Convert.ToInt32(s); var appSettingsCredentials = new AppSettingsCredentials(); var apiUri = new ApiUri(); var api = new ApiFactory(apiUri, appSettingsCredentials); Console.WriteLine("Using creds: {0} - {1}", appSettingsCredentials.ConsumerKey, appSettingsCredentials.ConsumerSecret); // console apps can't have an async main method, so we have to call an async method var task = Use7DigitalApi(api, artistId); task.Wait(); Console.ReadKey(); }