Пример #1
0
        public static async Task Main(string[] args)
        {
            var exportPath = AssemblyHelper.EntryAssemblyDirectory;

            if (args != null && args.Any())
            {
                exportPath = args.First();
            }

            var outputPath = Path.Combine(exportPath, "fa2cs-output");

            if (Directory.Exists(outputPath))
            {
                Directory.Delete(outputPath, true);
            }

            Directory.CreateDirectory(outputPath);

            var downloader = new FontAwesomeDownloader();
            var codeWriter = new CodeWriter();

            var icons = await downloader.DownloadIconCodes(Endpoint);

            var code = codeWriter.Write(icons);

            File.WriteAllText(Path.Combine(exportPath, "FontAwesomeIcons.cs"), code);

            OpenFileHelper.OpenAndSelect(exportPath);
        }
Пример #2
0
        public static async Task Main(string[] args)
        {
            var downloader = new FontAwesomeDownloader();
            var writer     = new CodeWriter();

            var result = await downloader.DownloadIconCodes();

            var code = writer.Write(result);

            var outputFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), FontAwesomeIconsFileName);

            File.WriteAllText(outputFilePath, code);

            OpenFileHelper.OpenAndSelect(outputFilePath);
        }
Пример #3
0
        public static async Task Main(string[] args)
        {
            var exportPath = AssemblyHelper.EntryAssemblyDirectory;

            if (args != null && args.Any())
            {
                exportPath = args.First();
            }

            var outputPath = Path.Combine(exportPath, "fa2cs-output");

            if (Directory.Exists(outputPath))
            {
                Directory.Delete(outputPath, true);
            }

            Directory.CreateDirectory(outputPath);

            var downloader = new FontAwesomeDownloader();
            var codeWriter = new CodeWriter();

            var icons = await downloader.DownloadIconCodes(Endpoint);

            var code = codeWriter.Write(icons);

            var codeFiles = new List <string>()
            {
                code,
                ResourcesHelper.ReadResourceContent("AssemblyInfoTemplate.txt"),
            };

            AssemblyEmitter.EmitAssembly(codeFiles, outputPath);

            File.WriteAllText(Path.Combine(outputPath, "readme.txt"), ResourcesHelper.ReadResourceContent("readme.txt"));
            File.WriteAllText(Path.Combine(exportPath, "FontAwesomeIcons.cs"), code);

            OpenFileHelper.OpenAndSelect(exportPath);
        }