Example #1
0
        /// <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;
        }
Example #2
0
 /// <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;
 }
Example #3
0
 /// <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;
 }
Example #4
0
 protected CommandResult(Enums.ResultCode result, string message)
 {
     Result  = result;
     Message = message;
 }
Example #5
0
 /// <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;
 }
Example #6
0
 /// <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)
 {
 }
Example #7
0
 /// <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;
 }