private static void ExportAkyui(XdImportSettings xdSettings, List <IAkyuiLoader> loaders, AkyuiLogger logger) { if (!string.IsNullOrWhiteSpace(xdSettings.AkyuiOutputPath)) { foreach (var loader in loaders) { using (logger.SetCategory(loader.LayoutInfo.Name)) { var bytes = AkyuiCompressor.Compress(loader); var outputPath = Path.Combine(xdSettings.AkyuiOutputPath, loader.LayoutInfo.Name + ".aky"); File.WriteAllBytes(outputPath, bytes); logger.Log($"Export Akyui"); } } } }
private static void ExportAkyui(XdImportSettings xdSettings, List <IAkyuiLoader> loaders, AkyuiLogger logger) { if (!string.IsNullOrWhiteSpace(xdSettings.AkyuiOutputPath)) { var stopWatch = Stopwatch.StartNew(); foreach (var loader in loaders) { using (logger.SetCategory(loader.LayoutInfo.Name)) { var bytes = AkyuiCompressor.Compress(loader); var outputPath = Path.Combine(xdSettings.AkyuiOutputPath, loader.LayoutInfo.Name + ".aky"); File.WriteAllBytes(outputPath, bytes); } } stopWatch.Stop(); logger.Log($"Export Akyui", ("Time", $"{stopWatch.Elapsed.TotalSeconds:0.00}s")); } }
public static void Save(IAkyuiLoader loader, string filePath) { var bytes = AkyuiCompressor.Compress(loader); File.WriteAllBytes(filePath, bytes); }