private static FileCopyOperation ParseCopyingFileFrom(Match match, bool copied = true)
        {
            var result = new FileCopyOperation();

            result.Source      = match.Groups["From"].Value;
            result.Destination = match.Groups["To"].Value;
            result.Copied      = copied;

            return(result);
        }
Пример #2
0
        private static FileCopyOperation ParseCopyingFileFrom(string text, string prefix, string infix)
        {
            var result = new FileCopyOperation();

            var split        = text.IndexOf(infix);
            var prefixLength = prefix.Length;
            int toLength     = infix.Length;

            result.Source      = text.Substring(prefixLength, split - prefixLength);
            result.Destination = text.Substring(split + toLength, text.Length - 2 - split - toLength);
            result.Copied      = true;

            return(result);
        }