Exemple #1
0
        public static string SerialiseMetadataPropertiesExpression(MetadataPropertiesExpression item)
        {
            if (item != null)
            {
                string xml = @"
                <c:AllProperties>" + (item.AllProperties != null ? item.AllProperties.ToString().ToLowerCase() : "false") + @"</c:AllProperties>
                <c:PropertyNames xmlns:d='http://schemas.microsoft.com/2003/10/Serialization/Arrays'>";
                if (item.PropertyNames != null)
                {
                    foreach (string value in item.PropertyNames)
                    {
                        xml = xml + @"<d:string>" + value + @"</d:string>";
                    }
                }
                xml = xml + @"
                </c:PropertyNames>
              ";

                return(xml);
            }
            return("");
        }
        public static string SerialiseMetadataPropertiesExpression(MetadataPropertiesExpression item)
        {
            if (item != null)
            {
                string xml = @"
                <c:AllProperties>" + (item.AllProperties!=null ? item.AllProperties.ToString().ToLowerCase() : "false") + @"</c:AllProperties>
                <c:PropertyNames xmlns:d='http://schemas.microsoft.com/2003/10/Serialization/Arrays'>";
                if (item.PropertyNames != null)
                {
                    foreach (string value in item.PropertyNames)
                    {
                        xml = xml + @"<d:string>" + value + @"</d:string>";
                    }
                }
                xml = xml + @"
                </c:PropertyNames>
              ";

                return xml;
            }
            return "";
        }