示例#1
0
        private void SetAllFieldValues(DocumentInfo p_DocumentInfo)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("<AllFieldValues>");
            foreach (string metadataName in p_DocumentInfo.Fields())
            {
                sb.AppendFormat("<Field name=\"{0}\" value=\"{1}\"/>{2}",
                                metadataName,
                                p_DocumentInfo.GetFieldValue(metadataName),
                                Environment.NewLine);
            }
            sb.AppendLine("</AllFieldValues>");
            p_DocumentInfo.SetFieldValue("AllFieldValues", sb.ToString());
        }