private static void ProcessCommandLineArgs(IReadOnlyList <string> args) { if (args.Count == 0) { throw new ArgumentException("No file specified!"); } imagePath = args[ImagePathArgIndex]; // Optional command line arguments. widthPixels = args.Count > 1 ? GetWidthPixelsArg(args) : MaxWidthPixels; brightnessType = args.Count > 2 ? GetBrightnessTypeArg(args) : DefaultBrightnessType; invertBrightness = args.Count > 3 ? GetInvertBrightnessArg(args) : DefaultInvertBrightness; }
private Brightness(BrightnessType type, int value) : this() { Type = type; Value = value; }