//using System; using System.Collections.Generic; using System.Text; namespace Apewer.Internals { internal class Constant { #region Byte[] /// 空字节数组。 public static readonly byte[] EmptyBytes = new byte[0]; /// UTF-8 BOM。 public static byte[] Bom { get => new byte[] { 0xEF, 0xBB, 0xBF }; } #endregion #region String /// 空字符串。 public const string EmptyString = ""; /// 换行符,由 ASCII 13 和 ASCII 10 组成。 public const string LineFeed = "\r\n"; /// 空白半角字符。 public const string BlankDbcCaseChars = " \n\r\t\b\f"; /// 空白全角字符。 public const string BlankSbcCaseChars = " "; /// 所有易识别的字符,包含大写字母和数字。 public const string LucidCollection = "3456789acefhknpstwxyz"; /// 所有 GUID 中的字符,包含字母、数字和连字符。 public const string GuidCollection = "0123456789ABCDEFabcdef-"; /// 所有主键字符。 public const string KeyCollection = "0123456789abcdefghijklmnopqrstuvwxyz"; /// 所有十六进制字符。 public const string HexCollection = "0123456789abcdef"; /// 所有数字(ASCII 48 ~ 57)。 public const string NumberCollection = "0123456789"; /// 所有数字(ASCII 48 ~ 57)。 public const string NumericCollection = "0123456789"; /// 所有小写字母(ASCII 97 ~ 122)。 public const string LowerCollection = "abcdefghijklmnopqrstuvwxyz"; /// 所有大写字母(ASCII 65 ~ 90)。 public const string UpperCollection = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; /// 所有字母。 public const string LetterCollection = LowerCollection + UpperCollection; /// 注入字符默认黑名单。 public const string InjectDefaultBlackList = "\"'`\b\f\n\r\t\\/:*?<>|@"; /// 注入字符黑名单。 public const string InjectJsonBlackList = "\\\"'\b\f\n\r\t/@"; #endregion #region Preset Property /// TCP 传输缓冲区大小。 public const int TcpBufferSize = 8191; /// 默认的缓冲区容量。 public const int DefaultBufferCapacity = 1024; #endregion } }