Example #1
0
        static int Main(string[] args)
        {
            if (args.Length != 2)
            {
                Console.Error.WriteLine($"Usage: {GetExecutableName()} [fullClassFilePath] [fullProjectFilePath]");
                return(ExitCodes.Error);
            }
            var classFilePath   = args[0];
            var projectFilePath = args[1];

            if (!File.Exists(classFilePath))
            {
                Console.Error.WriteLine($"{classFilePath} does not exist.");
                return(ExitCodes.Error);
            }

            if (!File.Exists(projectFilePath))
            {
                Console.Error.WriteLine($"{projectFilePath} does not exist.");
                return(ExitCodes.Error);
            }
            DoClassification(classFilePath, projectFilePath, out var htmlReportPath);
            Chalk.Green($"Analysis is complete. Please find your report on {htmlReportPath}");
            return(ExitCodes.Success);
        }
Example #2
0
 private static void Main(string[] args)
 {
     Chalk.Red(string.Format("asdf{0}", "ludmal"));
     Chalk.Blue("blue");
     Chalk.Green("green");
     Chalk.Yellow("yellow");
     Chalk.Gray("gray");
 }
Example #3
0
        private static void Main(string[] args)
        {
            var service = new SqsService <EmailMessage>(new AwsCredentials
            {
                RegionEndpoint = RegionEndpoint.USWest2
            });

            service.QueueUrl = ConfigurationManager.AppSettings["EmailQueue"];

            var response = service.Push(new HelloEmail());

            Chalk.Green(string.Format("Message {0} send successfully", response.MessageId));


            while (true)
            {
                var items = service.Process();
                Chalk.Green(items.Select(x => x.Subject).ToString());
                System.Threading.Thread.Sleep(3000);
            }
        }