private static string CreateConflictDetails(
            IMigrationAction action,
            Exception exception,
            string sourceItemId,
            string sourceItemRevision)
        {
            InvalidSubmissionConflictDetails dtls = new InvalidSubmissionConflictDetails(
                new XmlDocument(), exception, sourceItemId, sourceItemRevision);

            XmlSerializer serializer = new XmlSerializer(typeof(InvalidSubmissionConflictDetails));

            using (MemoryStream memStrm = new MemoryStream())
            {
                serializer.Serialize(memStrm, dtls);
                memStrm.Seek(0, SeekOrigin.Begin);
                using (StreamReader sw = new StreamReader(memStrm))
                {
                    return(sw.ReadToEnd());
                }
            }
        }
        public override string TranslateConflictDetailsToReadableDescription(string dtls)
        {
            if (string.IsNullOrEmpty(dtls))
            {
                throw new ArgumentNullException("dtls");
            }

            XmlSerializer serializer = new XmlSerializer(typeof(InvalidSubmissionConflictDetails));

            using (StringReader strReader = new StringReader(dtls))
                using (XmlReader xmlReader = XmlReader.Create(strReader))
                {
                    InvalidSubmissionConflictDetails details =
                        (InvalidSubmissionConflictDetails)serializer.Deserialize(xmlReader);

                    return(string.Format(
                               "Source Item {0} (revision {1}) is invalid. The submission to TFS server threw the following exception:\n  {2}.",
                               details.SourceItemId,
                               details.SourceItemRevision,
                               string.Format("  Exception: {0}\n  Message: {1}\n  Inner Exception: {2}\n  Inner Exception Message: {3}",
                                             details.ExceptionType, details.ExceptionMessage, details.InnerExceptionType, details.InnerExceptionMessage)));
                }
        }