using Api.Framework.Tools;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows.Forms;
namespace Api.Framework.SDK
{
///
/// 配置文件属性
///
public class ConfigAttribute : Attribute
{
///
/// 保存的文件名
///
public string Name { get; set; }
///
/// 是否存档到数据库
///
public bool IsSaveDB { get; set; }
private byte[] _encKey;
///
/// 16位密钥 - 不填写则使用系统秘钥
///
public byte[] EncKey
{
get { return _encKey; }
set
{
if (value != null)
{
if (value.Length != 16) throw new Exception("长度必须等于16字节!");
_encKey = value;
}
}
}
///
/// 是否加密数据信息 默认为False
///
public bool IsEncryption { get; set; }
public ConfigAttribute()
{
this.IsSaveDB = true;
this._encKey = new byte[16];
}
}
///
/// 配置属性
///
public class ParamAttribute : Attribute
{
///
/// 标签信息 - 一般表示变量
///
public string[] Tags { get; set; }
///
/// 描述信息
///
public string Describe { get; set; }
}
}