static InnerOptions CreateInnerOptions(IOutput output, Options op) { var io = new InnerOptions(); CreateInnerOption(output, () => op.Red, s => io.File_R = s, n => io.Color_R = n, "Red"); CreateInnerOption(output, () => op.Green, s => io.File_G = s, n => io.Color_G = n, "Green"); CreateInnerOption(output, () => op.Blue, s => io.File_B = s, n => io.Color_B = n, "Blue"); CreateInnerOption(output, () => op.Alpha, s => io.File_A = s, n => io.Color_A = n, "Alpha"); io.File_O = op.Output.ToLowerInvariant(); if (!io.File_O.EndsWith(".png")) { io.File_O += ".png"; } var dir = Path.GetDirectoryName(op.Output); if (!Directory.Exists(dir)) { Directory.CreateDirectory(dir); } return(io); }
public Merger(IOutput output, InnerOptions io) { _output = output; _io = io; }