コード例 #1
0
 internal static XmlResult Xml(object data, string contentType, Encoding contentEncoding,
                               XmlRequestBehavior behavior)
 {
     return(new XmlResult()
     {
         ContentEncoding = contentEncoding,
         ContentType = contentType,
         Data = data,
         XmlRequestBehavior = behavior
     });
 }
コード例 #2
0
 public static XmlResult Xml(this Controller request, object obj, string contentType, Encoding contentEncoding, XmlRequestBehavior behavior)
 {
     return(Xml(obj, contentType, contentEncoding, behavior));
 }
コード例 #3
0
 public static XmlResult Xml(this Controller request, object obj, XmlRequestBehavior behavior)
 {
     return(Xml(obj, null, null, behavior));
 }
コード例 #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
            });
        }