示例#1
0
 public static string ToXml <valueType>(this valueType value, fastCSharp.emit.xmlSerializer.config config = null)
 {
     return(fastCSharp.emit.xmlSerializer.ToXml(value, config));
 }
示例#2
0
 public static void ToXml <valueType>(this valueType value, charStream xmlStream, fastCSharp.emit.xmlSerializer.config config = null)
 {
     fastCSharp.emit.xmlSerializer.ToXml(value, xmlStream, config);
 }
示例#3
0
 /// <summary>
 /// API请求XML数据
 /// </summary>
 /// <typeparam name="valueType">数据类型</typeparam>
 /// <typeparam name="formType">表单数据类型</typeparam>
 /// <param name="url">请求地址</param>
 /// <param name="formValue">POST表单</param>
 /// <param name="xml">输出XML字符串</param>
 /// <param name="config">XML序列化配置</param>
 /// <returns>数据对象,失败放回null</returns>
 public valueType RequestXml <valueType, formType>(string url, formType formValue, out string xml, fastCSharp.emit.xmlSerializer.config config = null)
     where valueType : class, IValue
 {
     return(parseXml <valueType>(xml = request.Request(url, encoding, null, Encoding.UTF8.GetBytes(fastCSharp.emit.xmlSerializer.ToXml(formValue, config))), url, true));
 }
示例#4
0
 /// <summary>
 /// API请求XML返回文本数据
 /// </summary>
 /// <typeparam name="formType">表单数据类型</typeparam>
 /// <param name="url">请求地址</param>
 /// <param name="formValue">POST表单</param>
 /// <param name="config">XML序列化配置</param>
 /// <returns>数据对象,失败放回null</returns>
 public string RequestXml <formType>(string url, formType formValue, fastCSharp.emit.xmlSerializer.config config = null)
 {
     return(request.Request(url, encoding, null, Encoding.UTF8.GetBytes(fastCSharp.emit.xmlSerializer.ToXml(formValue, config))));
 }
示例#5
0
        /// <summary>
        /// API请求XML数据
        /// </summary>
        /// <typeparam name="valueType">数据类型</typeparam>
        /// <typeparam name="formType">表单数据类型</typeparam>
        /// <param name="url">请求地址</param>
        /// <param name="formValue">POST表单</param>
        /// <param name="config">XML序列化配置</param>
        /// <param name="isValue">是否验证数据</param>
        /// <returns>数据对象,失败放回null</returns>
        public valueType RequestXml <valueType, formType>(string url, formType formValue, fastCSharp.emit.xmlSerializer.config config = null, bool isValue = true)
            where valueType : class, IValue
        {
            string xml;

            return(RequestXml <valueType, formType>(url, formValue, out xml, config));
        }