Discuz.Web.Services/API/Util.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
#if NET1
#else
using System.Collections.Generic;
#endif
using System.Text;
using System.Xml.Serialization;
using System.Xml;
using System.IO;
using System.Net;
using System.Security.Cryptography;
using System.Collections;
using Discuz.Common;
using System.Text.RegularExpressions;
namespace Discuz.Web.Services.API
{
public class Util
{
private const string LINE = "\r\n";
#if NET1
private static Hashtable serializer_dict = new Hashtable();
#else
private static Dictionary<int, XmlSerializer> serializer_dict = new Dictionary<int, XmlSerializer>();
#endif
private DNTParam VersionParam = DNTParam.Create("v", "1.0");
private string api_key;
private string secret;
private bool use_json;
private static Regex[] r = new Regex[3];
private const string REGEX_FORMAT = @"(\<{0}\>)([\s\S]+?)(\<\/{0}\>)";
static Util()
{
r[0] = new Regex(string.Format(REGEX_FORMAT, "message"), RegexOptions.IgnoreCase);
r[1] = new Regex(string.Format(REGEX_FORMAT, "title"), RegexOptions.IgnoreCase);
r[2] = new Regex(string.Format(REGEX_FORMAT, "signature"), RegexOptions.IgnoreCase);
}
private static XmlSerializer ErrorSerializer
{
get
{
return GetSerializer(typeof(Error));
}
}
public Util(string api_key, string secret)
{
this.api_key = api_key;
this.secret = secret;
}
/// <summary>
/// 是否使用json格式返回数据
/// </summary>
public bool UseJson
{
后面还有 237 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
