internal Fix CreateFix(FixVersionOne v1Fix)
        {
            Fix fix = null;

            if (v1Fix != null)
            {
                fix = new Fix()
                {
                    Description = CreateMessage(v1Fix.Description),
                    Changes     = v1Fix.FileChanges?.Select(CreateFileChange).ToList()
                };
            }

            return(fix);
        }
        internal FixVersionOne CreateFixVersionOne(Fix v2Fix)
        {
            FixVersionOne fix = null;

            if (v2Fix != null)
            {
                try
                {
                    fix = new FixVersionOne()
                    {
                        Description = v2Fix.Description?.Text,
                        FileChanges = v2Fix.Changes?.Select(CreateFileChangeVersionOne).ToList()
                    };
                }
                catch (UnknownEncodingException)
                {
                    // A replacement in this fix specifies plain text, but the file's
                    // encoding is unknown or unsupported, so we refuse to transform the fix.
                    return(null);
                }
            }

            return(fix);
        }