Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var xDocument = XDocument.Load(BaseSnippetLocation);
            var palette   = JsonConvert.DeserializeObject <MdPalette>(File.ReadAllText(MdPaletteJsonLocation));

            //https://coolsubhash-tech.blogspot.com/2016/10/resolved-existing-connection-was.html
            ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

            if (args.Length == 0)
            {
                GenerateXaml(xDocument, false);
            }
            else if (args.Contains("class-swatches"))
            {
                GenerateClasses(palette);
            }
            else if (args.Contains("all-swatches"))
            {
                GenerateXaml(xDocument);
                GenerateXaml(xDocument, true);
                GenerateOldXaml(xDocument);
                GenerateOldXaml(xDocument, true);
            }
            else if (args.Contains("json"))
            {
                GenerateJson(xDocument);
            }
            else if (args.Contains("named"))
            {
                GenerateXaml(xDocument, true);
            }
            else if (args.Contains("old-named"))
            {
                GenerateOldXaml(xDocument, true);
            }
            else if (args.Contains("old"))
            {
                GenerateOldXaml(xDocument, false);
            }
            else if (args.Contains("icons"))
            {
                IconThing.Run();
            }
            else
            {
                GenerateXaml(xDocument, false);
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("FINISHED");
            if (!Console.IsInputRedirected)
            {
                Console.ReadKey();
            }
        }
Ejemplo n.º 2
0
        static async Task Main(string[] args)
        {
            var xDocument = XDocument.Load(BaseSnippetLocation);
            var xmlRoot   = xDocument.Root ??
                            throw new InvalidDataException("The input document does not contain a root");
            var palette = JsonConvert.DeserializeObject <MdPalette>(File.ReadAllText(MdPaletteJsonLocation));

            if (args.Length == 0)
            {
                GenerateXaml(xmlRoot);
            }
            else if (args.Contains("class-swatches"))
            {
                GenerateClasses(palette);
            }
            else if (args.Contains("all-swatches"))
            {
                GenerateXaml(xmlRoot);
                GenerateXaml(xmlRoot, true);
                GenerateOldXaml(xmlRoot);
                GenerateOldXaml(xmlRoot, true);
            }
            else if (args.Contains("json"))
            {
                GenerateJson(xmlRoot);
            }
            else if (args.Contains("named"))
            {
                GenerateXaml(xmlRoot, true);
            }
            else if (args.Contains("old-named"))
            {
                GenerateOldXaml(xmlRoot, true);
            }
            else if (args.Contains("old"))
            {
                GenerateOldXaml(xmlRoot);
            }
            else if (args.Contains("icons"))
            {
                await IconThing.RunAsync();
            }
            else
            {
                GenerateXaml(xmlRoot);
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("FINISHED");
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            var xDocument = XDocument.Load(BaseSnippetLocation);

            //https://coolsubhash-tech.blogspot.com/2016/10/resolved-existing-connection-was.html
            ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

            if (args.Length == 0)
            {
                GenerateXaml(xDocument, false);
            }
            else if (args.Contains("all-swatches"))
            {
                GenerateXaml(xDocument);
                GenerateXaml(xDocument, true);
                GenerateOldXaml(xDocument);
                GenerateOldXaml(xDocument, true);
            }
            else if (args.Contains("json"))
            {
                GenerateJson(xDocument);
            }
            else if (args.Contains("named"))
            {
                GenerateXaml(xDocument, true);
            }
            else if (args.Contains("old-named"))
            {
                GenerateOldXaml(xDocument, true);
            }
            else if (args.Contains("old"))
            {
                GenerateOldXaml(xDocument, false);
            }
            else if (args.Contains("icons"))
            {
                IconThing.Run();
            }
            else
            {
                GenerateXaml(xDocument, false);
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("FINISHED");
            Console.ReadKey();
        }