예제 #1
0
        public override bool Execute(List <string> args)
        {
            if (args.Count != 1)
            {
                return(false);
            }
            var tag = ArgumentParser.ParseTagIndex(_cache, args[0]);

            if (tag == null)
            {
                return(false);
            }

            HaloTag newTag;

            using (var stream = _fileInfo.Open(FileMode.Open, FileAccess.ReadWrite))
                newTag = _cache.DuplicateTag(stream, tag);

            Console.WriteLine("Tag duplicated successfully!");
            Console.Write("New tag: ");
            TagPrinter.PrintTagShort(newTag);
            return(true);
        }