internal static XmlResult Xml(object data, string contentType, Encoding contentEncoding,
                               XmlRequestBehavior behavior)
 {
     return(new XmlResult()
     {
         ContentEncoding = contentEncoding,
         ContentType = contentType,
         Data = data,
         XmlRequestBehavior = behavior
     });
 }
Exemple #2
0
 public static XmlResult Xml(this Controller request, object obj, string contentType, Encoding contentEncoding, XmlRequestBehavior behavior)
 {
     return(Xml(obj, contentType, contentEncoding, behavior));
 }
Exemple #3
0
 public static XmlResult Xml(this Controller request, object obj, XmlRequestBehavior behavior)
 {
     return(Xml(obj, null, null, behavior));
 }
Exemple #4
0
        internal static XmlResult Xml(object data, string contentType, Encoding contentEncoding, XmlRequestBehavior behavior)
        {
            XmlDocument xdoc = new XmlDocument();

            xdoc.LoadXml(data.ToString());
            data = xdoc;
            return(new XmlResult()
            {
                ContentEncoding = contentEncoding, ContentType = contentType, Data = data, XmlRequestBehavior = behavior
            });
        }