DTcms.API/DTcms.API.Payment.wxpay/WxPayData.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using DTcms.Common;
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Xml;

namespace DTcms.API.Payment.wxpay
{
	public class WxPayData
	{
		private System.Collections.Generic.SortedDictionary<string, object> m_values = new System.Collections.Generic.SortedDictionary<string, object>();

		public void SetValue(string key, object value)
		{
			this.m_values[key] = value;
		}

		public object GetValue(string key)
		{
			object o = null;
			this.m_values.TryGetValue(key, out o);
			return o;
		}

		public bool IsSet(string key)
		{
			object o = null;
			this.m_values.TryGetValue(key, out o);
			return null != o;
		}

		public string ToXml()
		{
			if (0 == this.m_values.Count)
			{
				throw new WxPayException("WxPayData数据为空!");
			}
			string xml = "<xml>";
			foreach (System.Collections.Generic.KeyValuePair<string, object> pair in this.m_values)
			{
				if (pair.Value == null)
				{
					throw new WxPayException("WxPayData内部含有值为null的字段!");
				}
				if (pair.Value.GetType() == typeof(int))
				{
					object obj = xml;
					xml = string.Concat(new object[]
					{
						obj,
						"<",
						pair.Key,
						">",
						pair.Value,
						"</",
						pair.Key,
						">"
					});
				}
后面还有 146 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。