Пример #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;
        }
Пример #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;
 }
Пример #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;
 }
Пример #4
0
 protected CommandResult(Enums.ResultCode result, string message)
 {
     Result  = result;
     Message = message;
 }
Пример #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;
 }
Пример #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)
 {
 }
Пример #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;
 }