/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.InputFile"/> class. /// </summary> /// <param name="basePath">Base path.</param> /// <param name="fullPath">Full path.</param> /// <param name="code">Result code.</param> public InputFile(string basePath, string fullPath, Enums.ResultCode code) { var dir = Path.GetDirectoryName(fullPath); var file = Path.GetFileName(fullPath); Directory = dir.ToPartPath(basePath); Filename = file; Code = code; Id = Path.Combine(Directory, Filename); IsDirectory = false; }
/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.Result"/> class. /// </summary> /// <param name="code">Code.</param> public Result(Enums.ResultCode code) { Code = code; }
/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.Result"/> class. /// </summary> /// <param name="code">Code.</param> /// <param name="message">Message.</param> public Result(Enums.ResultCode code, string message) { Code = code; Message = message; }
protected CommandResult(Enums.ResultCode result, string message) { Result = result; Message = message; }
/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.InputFile"/> class. /// </summary> public InputFile(string directory, Enums.ResultCode code) { IsDirectory = true; Directory = directory; Code = code; }
/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.InputFilesResult"/> class. /// </summary> /// <param name="code">Code.</param> /// <param name="message">Message.</param> public InputFilesResult(Enums.ResultCode code, string message) : base(code, message) { }
/// <summary> /// Initializes a new instance of the <see cref="T:KotoriCli.Tokens.InputFilesResult"/> class. /// </summary> /// <param name="code">Code.</param> /// <param name="inputFiles">Input files.</param> public InputFilesResult(Enums.ResultCode code, IEnumerable <InputFile> inputFiles) : base(code) { InputFiles = inputFiles; }