mirror of
https://gitee.com/RRQM_Home/TouchSocket.git
synced 2025-12-06 08:28:52 +08:00
发布:3.0.20
This commit is contained in:
@@ -271,6 +271,7 @@ dotnet_naming_style.常量.required_suffix =
|
||||
dotnet_naming_style.常量.word_separator =
|
||||
dotnet_naming_style.常量.capitalization = pascal_case
|
||||
csharp_prefer_static_anonymous_function = true:suggestion
|
||||
|
||||
[*.{cs,vb}]
|
||||
end_of_line = crlf
|
||||
dotnet_style_qualification_for_field = true:suggestion
|
||||
@@ -280,4 +281,12 @@ dotnet_style_qualification_for_event = true:suggestion
|
||||
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
|
||||
tab_width = 4
|
||||
indent_size = 4
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||
spelling_languages = en-us,zh-cn
|
||||
spelling_checkable_types = identifiers,comments
|
||||
spelling_exclusion_path = exclusion.dic
|
||||
spelling_use_default_exclusion_dictionary = false
|
||||
|
||||
[*.cs]
|
||||
# Add file header
|
||||
file_header_template =------------------------------------------------------------------------------\n此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有\n源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权\nCSDN博客:https://blog.csdn.net/qq_40374647\n哔哩哔哩视频:https://space.bilibili.com/94253567\nGitee源代码仓库:https://gitee.com/RRQM_Home\nGithub源代码仓库:https://github.com/RRQM\nAPI首页:https://touchsocket.net/\n交流QQ群:234762506\n感谢您的下载和使用\n------------------------------------------------------------------------------
|
||||
|
||||
1
exclusion.dic
Normal file
1
exclusion.dic
Normal file
@@ -0,0 +1 @@
|
||||
args
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>3.0.19</Version>
|
||||
<Version>3.0.20</Version>
|
||||
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
@@ -51,34 +51,34 @@
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.0'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net45'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net461'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net462'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net472'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemMemory;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net481'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='netstandard2.1'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DefaultInterfaceMethods</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DefaultInterfaceMethods;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net6.0'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net9.0'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net8.0'">
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods</DefineConstants>
|
||||
<DefineConstants>ValueTask;Unsafe;SystemNetHttp;SystemMemory;SystemTextJson;AsyncEnumerable;DisposeAsync;DefaultInterfaceMethods;AsyncLocal</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
|
||||
@@ -23,26 +23,26 @@ namespace TouchSocket.Core;
|
||||
public class TouchSocketCoreUtility
|
||||
{
|
||||
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
|
||||
public static readonly Type stringType = typeof(string);
|
||||
public static readonly Type byteType = typeof(byte);
|
||||
public static readonly Type sbyteType = typeof(sbyte);
|
||||
public static readonly Type shortType = typeof(short);
|
||||
public static readonly Type objType = typeof(object);
|
||||
public static readonly Type ushortType = typeof(ushort);
|
||||
public static readonly Type intType = typeof(int);
|
||||
public static readonly Type uintType = typeof(uint);
|
||||
public static readonly Type boolType = typeof(bool);
|
||||
public static readonly Type charType = typeof(char);
|
||||
public static readonly Type longType = typeof(long);
|
||||
public static readonly Type ulongType = typeof(ulong);
|
||||
public static readonly Type floatType = typeof(float);
|
||||
public static readonly Type doubleType = typeof(double);
|
||||
public static readonly Type decimalType = typeof(decimal);
|
||||
public static readonly Type dateTimeType = typeof(DateTime);
|
||||
public static readonly Type bytesType = typeof(byte[]);
|
||||
public static readonly Type dicType = typeof(IDictionary);
|
||||
public static readonly Type arrayType = typeof(Array);
|
||||
public static readonly Type nullableType = typeof(Nullable<>);
|
||||
public static readonly Type StringType = typeof(string);
|
||||
public static readonly Type ByteType = typeof(byte);
|
||||
public static readonly Type SbyteType = typeof(sbyte);
|
||||
public static readonly Type ShortType = typeof(short);
|
||||
public static readonly Type ObjType = typeof(object);
|
||||
public static readonly Type UshortType = typeof(ushort);
|
||||
public static readonly Type IntType = typeof(int);
|
||||
public static readonly Type UintType = typeof(uint);
|
||||
public static readonly Type BoolType = typeof(bool);
|
||||
public static readonly Type CharType = typeof(char);
|
||||
public static readonly Type LongType = typeof(long);
|
||||
public static readonly Type UlongType = typeof(ulong);
|
||||
public static readonly Type FloatType = typeof(float);
|
||||
public static readonly Type DoubleType = typeof(double);
|
||||
public static readonly Type DecimalType = typeof(decimal);
|
||||
public static readonly Type DateTimeType = typeof(DateTime);
|
||||
public static readonly Type BytesType = typeof(byte[]);
|
||||
public static readonly Type DicType = typeof(IDictionary);
|
||||
public static readonly Type ArrayType = typeof(Array);
|
||||
public static readonly Type NullableType = typeof(Nullable<>);
|
||||
#pragma warning restore CS1591 // 缺少对公共可见类型或成员的 XML 注释
|
||||
|
||||
/// <summary>
|
||||
@@ -82,7 +82,7 @@ public class TouchSocketCoreUtility
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsURL(string input)
|
||||
public static bool IsUrl(string input)
|
||||
{
|
||||
var pattern = @"^[a-zA-Z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$?";
|
||||
var regex = new Regex(pattern);
|
||||
@@ -98,15 +98,15 @@ public class TouchSocketCoreUtility
|
||||
{
|
||||
try
|
||||
{
|
||||
var IPs = input.Split('.');
|
||||
var iPs = input.Split('.');
|
||||
var regex = new Regex(@"^\d+$");
|
||||
for (var i = 0; i < IPs.Length; i++)
|
||||
for (var i = 0; i < iPs.Length; i++)
|
||||
{
|
||||
if (!regex.IsMatch(IPs[i]))
|
||||
if (!regex.IsMatch(iPs[i]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (Convert.ToUInt16(IPs[i]) > 255)
|
||||
if (Convert.ToUInt16(iPs[i]) > 255)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public class TouchSocketCoreUtility
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsIPV6(string input)
|
||||
public static bool IsIpv6(string input)
|
||||
{
|
||||
var temp = input;
|
||||
var strs = temp.Split(':');
|
||||
@@ -132,7 +132,7 @@ public class TouchSocketCoreUtility
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var count = StringExtension.HitStringCount(input, "::");
|
||||
var count = input.HitStringCount("::");
|
||||
string pattern;
|
||||
if (count > 1)
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@ public static class ReflectionExtension
|
||||
var att = propertyInfo.CustomAttributes.FirstOrDefault(a => a.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute");
|
||||
return att != null || propertyInfo.PropertyType.IsGenericType && propertyInfo.PropertyType.
|
||||
GetGenericTypeDefinition().Equals
|
||||
(TouchSocketCoreUtility.nullableType);
|
||||
(TouchSocketCoreUtility.NullableType);
|
||||
}
|
||||
|
||||
#endregion ParameterInfo
|
||||
@@ -116,7 +116,7 @@ public static class ReflectionExtension
|
||||
{
|
||||
var att = fieldInfo.CustomAttributes.FirstOrDefault(a => a.AttributeType.FullName == "System.Runtime.CompilerServices.NullableAttribute");
|
||||
return att != null || fieldInfo.FieldType.IsGenericType && fieldInfo.FieldType.GetGenericTypeDefinition().Equals
|
||||
(TouchSocketCoreUtility.nullableType);
|
||||
(TouchSocketCoreUtility.NullableType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -26,6 +26,95 @@ namespace TouchSocket.Core;
|
||||
/// </summary>
|
||||
public static class StringExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认的空格字符串。
|
||||
/// </summary>
|
||||
public const string DefaultSpaceString = " ";
|
||||
|
||||
/// <summary>
|
||||
/// 默认的空格字符串的UTF-8表示。
|
||||
/// </summary>
|
||||
public static ReadOnlySpan<byte> DefaultSpaceUtf8Span => " "u8;
|
||||
|
||||
/// <summary>
|
||||
/// 从Base64转到数组。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ByBase64ToBytes(this string value)
|
||||
{
|
||||
return Convert.FromBase64String(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将16进制的字符转换为数组。
|
||||
/// </summary>
|
||||
/// <param name="hexString"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ByHexStringToBytes(this string hexString, string split = default)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(split))
|
||||
{
|
||||
hexString = hexString.Replace(split, string.Empty);
|
||||
}
|
||||
|
||||
if ((hexString.Length % 2) != 0)
|
||||
{
|
||||
hexString += StringExtension.DefaultSpaceString;
|
||||
}
|
||||
var returnBytes = new byte[hexString.Length / 2];
|
||||
for (var i = 0; i < returnBytes.Length; i++)
|
||||
{
|
||||
returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
|
||||
}
|
||||
return returnBytes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将16进制的字符转换为int32。
|
||||
/// </summary>
|
||||
/// <param name="hexString"></param>
|
||||
/// <returns></returns>
|
||||
public static int ByHexStringToInt32(this string hexString)
|
||||
{
|
||||
return string.IsNullOrEmpty(hexString) ? default : int.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 格式化字符串。
|
||||
/// </summary>
|
||||
/// <param name="str">要格式化的字符串。</param>
|
||||
/// <param name="ps">格式化参数。</param>
|
||||
/// <returns>格式化后的字符串。</returns>
|
||||
public static string Format(this string str, params object[] ps)
|
||||
{
|
||||
return string.Format(str, ps);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查字符串是否具有有效值。
|
||||
/// </summary>
|
||||
/// <param name="str">要检查的字符串。</param>
|
||||
/// <returns>如果字符串不是null且非空格或制表符等,则返回true;否则返回false。</returns>
|
||||
public static bool HasValue([NotNullWhen(true)] this string str)
|
||||
{
|
||||
// 使用string.IsNullOrWhiteSpace方法检查字符串是否为null或包含仅空格或制表符等
|
||||
// 返回相反的结果以确定字符串是否具有有效值
|
||||
return !string.IsNullOrWhiteSpace(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断字符串compare 在 input字符串中出现的次数
|
||||
/// </summary>
|
||||
/// <param name="input">源字符串</param>
|
||||
/// <param name="compare">用于比较的字符串</param>
|
||||
/// <returns>字符串compare 在 input字符串中出现的次数</returns>
|
||||
public static int HitStringCount(this string input, string compare)
|
||||
{
|
||||
var index = input.IndexOf(compare);
|
||||
return index != -1 ? 1 + HitStringCount(input.Substring(index + compare.Length), compare) : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查字符串是否为空或只包含空格。
|
||||
@@ -37,6 +126,15 @@ public static class StringExtension
|
||||
return string.IsNullOrEmpty(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查字符串是否为 null 或仅包含空白字符。
|
||||
/// </summary>
|
||||
/// <param name="str">要检查的字符串。</param>
|
||||
/// <returns>如果字符串为 null 或仅包含空白字符,则返回 true;否则返回 false。</returns>
|
||||
public static bool IsNullOrWhiteSpace([NotNullWhen(false)] this string str)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将输入字符串转换为有效的标识符。
|
||||
@@ -62,27 +160,120 @@ public static class StringExtension
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查字符串是否为 null 或仅包含空白字符。
|
||||
/// 将字符转换为对应的基础类型类型。
|
||||
/// </summary>
|
||||
/// <param name="str">要检查的字符串。</param>
|
||||
/// <returns>如果字符串为 null 或仅包含空白字符,则返回 true;否则返回 false。</returns>
|
||||
public static bool IsNullOrWhiteSpace([NotNullWhen(false)] this string str)
|
||||
/// <param name="value"></param>
|
||||
/// <param name="destinationType">目标类型必须为基础类型</param>
|
||||
/// <returns></returns>
|
||||
public static object ParseToType(this string value, Type destinationType)
|
||||
{
|
||||
return string.IsNullOrWhiteSpace(str);
|
||||
if (TryParseToType(value, destinationType, out var returnValue))
|
||||
{
|
||||
return returnValue;
|
||||
}
|
||||
ThrowHelper.ThrowNotSupportedException(TouchSocketCoreResource.StringParseToTypeFail.Format(value, destinationType));
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查字符串是否具有有效值。
|
||||
/// 移除字符串末尾指定数量的字符。
|
||||
/// </summary>
|
||||
/// <param name="str">要检查的字符串。</param>
|
||||
/// <returns>如果字符串不是null且非空格或制表符等,则返回true;否则返回false。</returns>
|
||||
public static bool HasValue([NotNullWhen(true)] this string str)
|
||||
/// <param name="str">要处理的字符串。</param>
|
||||
/// <param name="count">要移除的字符数量。</param>
|
||||
/// <returns>移除末尾指定数量字符后的字符串。</returns>
|
||||
public static string RemoveLastChars(this string str, int count)
|
||||
{
|
||||
// 使用string.IsNullOrWhiteSpace方法检查字符串是否为null或包含仅空格或制表符等
|
||||
// 返回相反的结果以确定字符串是否具有有效值
|
||||
return !string.IsNullOrWhiteSpace(str);
|
||||
if (string.IsNullOrEmpty(str) || count <= 0)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
// 计算需要保留的字符长度
|
||||
|
||||
var lengthToKeep = str.Length - count;
|
||||
|
||||
// 如果需要保留的长度小于0,则返回空字符串
|
||||
|
||||
if (lengthToKeep < 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
// 返回去除末尾指定数量字符后的子串
|
||||
return str.Substring(0, lengthToKeep);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按字符串分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="pattern"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] Split(this string str, string pattern)
|
||||
{
|
||||
return Regex.Split(str, pattern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只按第一个匹配项分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] SplitFirst(this string str, char split)
|
||||
{
|
||||
var s = new List<string>();
|
||||
var index = str.IndexOf(split);
|
||||
if (index > 0)
|
||||
{
|
||||
s.Add(str.Substring(0, index).Trim());
|
||||
s.Add(str.Substring(index + 1, str.Length - index - 1).Trim());
|
||||
}
|
||||
|
||||
return s.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只按最后一个匹配项分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] SplitLast(this string str, char split)
|
||||
{
|
||||
var s = new List<string>();
|
||||
var index = str.LastIndexOf(split);
|
||||
if (index > 0)
|
||||
{
|
||||
s.Add(str.Substring(0, index).Trim());
|
||||
s.Add(str.Substring(index + 1, str.Length - index - 1).Trim());
|
||||
}
|
||||
|
||||
return s.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转换为SHA1。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ToSha1(this string value, Encoding encoding)
|
||||
{
|
||||
using (var sha1 = SHA1.Create())
|
||||
{
|
||||
return sha1.ComputeHash(encoding.GetBytes(value));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转换为UTF-8数据,效果等于<see cref="Encoding.UTF8"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ToUtf8Bytes(this string value)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(value);
|
||||
}
|
||||
|
||||
///<summary>
|
||||
@@ -210,193 +401,4 @@ public static class StringExtension
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断字符串compare 在 input字符串中出现的次数
|
||||
/// </summary>
|
||||
/// <param name="input">源字符串</param>
|
||||
/// <param name="compare">用于比较的字符串</param>
|
||||
/// <returns>字符串compare 在 input字符串中出现的次数</returns>
|
||||
public static int HitStringCount(this string input, string compare)
|
||||
{
|
||||
var index = input.IndexOf(compare);
|
||||
return index != -1 ? 1 + HitStringCount(input.Substring(index + compare.Length), compare) : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将字符转换为对应的基础类型类型。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="destinationType">目标类型必须为基础类型</param>
|
||||
/// <returns></returns>
|
||||
public static object ParseToType(this string value, Type destinationType)
|
||||
{
|
||||
if (TryParseToType(value, destinationType, out var returnValue))
|
||||
{
|
||||
return returnValue;
|
||||
}
|
||||
ThrowHelper.ThrowNotSupportedException(TouchSocketCoreResource.StringParseToTypeFail.Format(value, destinationType));
|
||||
return default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只按第一个匹配项分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] SplitFirst(this string str, char split)
|
||||
{
|
||||
var s = new List<string>();
|
||||
var index = str.IndexOf(split);
|
||||
if (index > 0)
|
||||
{
|
||||
s.Add(str.Substring(0, index).Trim());
|
||||
s.Add(str.Substring(index + 1, str.Length - index - 1).Trim());
|
||||
}
|
||||
|
||||
return s.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按字符串分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="pattern"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] Split(this string str, string pattern)
|
||||
{
|
||||
return Regex.Split(str, pattern);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 只按最后一个匹配项分割
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static string[] SplitLast(this string str, char split)
|
||||
{
|
||||
var s = new List<string>();
|
||||
var index = str.LastIndexOf(split);
|
||||
if (index > 0)
|
||||
{
|
||||
s.Add(str.Substring(0, index).Trim());
|
||||
s.Add(str.Substring(index + 1, str.Length - index - 1).Trim());
|
||||
}
|
||||
|
||||
return s.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 格式化字符串。
|
||||
/// </summary>
|
||||
/// <param name="str">要格式化的字符串。</param>
|
||||
/// <param name="ps">格式化参数。</param>
|
||||
/// <returns>格式化后的字符串。</returns>
|
||||
public static string Format(this string str, params object[] ps)
|
||||
{
|
||||
|
||||
return string.Format(str, ps);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 移除字符串末尾指定数量的字符。
|
||||
/// </summary>
|
||||
/// <param name="str">要处理的字符串。</param>
|
||||
/// <param name="count">要移除的字符数量。</param>
|
||||
/// <returns>移除末尾指定数量字符后的字符串。</returns>
|
||||
public static string RemoveLastChars(this string str, int count)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str) || count <= 0)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
|
||||
// 计算需要保留的字符长度
|
||||
|
||||
var lengthToKeep = str.Length - count;
|
||||
|
||||
// 如果需要保留的长度小于0,则返回空字符串
|
||||
|
||||
if (lengthToKeep < 0)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
// 返回去除末尾指定数量字符后的子串
|
||||
return str.Substring(0, lengthToKeep);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转换为SHA1。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="encoding"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ToSha1(this string value, Encoding encoding)
|
||||
{
|
||||
using (var sha1 = SHA1.Create())
|
||||
{
|
||||
return sha1.ComputeHash(encoding.GetBytes(value));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转换为UTF-8数据,效果等于<see cref="Encoding.UTF8"/>
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ToUTF8Bytes(this string value)
|
||||
{
|
||||
return Encoding.UTF8.GetBytes(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将16进制的字符转换为数组。
|
||||
/// </summary>
|
||||
/// <param name="hexString"></param>
|
||||
/// <param name="split"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ByHexStringToBytes(this string hexString, string split = default)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(split))
|
||||
{
|
||||
hexString = hexString.Replace(split, string.Empty);
|
||||
}
|
||||
|
||||
if ((hexString.Length % 2) != 0)
|
||||
{
|
||||
hexString += " ";
|
||||
}
|
||||
var returnBytes = new byte[hexString.Length / 2];
|
||||
for (var i = 0; i < returnBytes.Length; i++)
|
||||
{
|
||||
returnBytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16);
|
||||
}
|
||||
return returnBytes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将16进制的字符转换为int32。
|
||||
/// </summary>
|
||||
/// <param name="hexString"></param>
|
||||
/// <returns></returns>
|
||||
public static int ByHexStringToInt32(this string hexString)
|
||||
{
|
||||
return string.IsNullOrEmpty(hexString) ? default : int.Parse(hexString, System.Globalization.NumberStyles.HexNumber);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从Base64转到数组。
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static byte[] ByBase64ToBytes(this string value)
|
||||
{
|
||||
return Convert.FromBase64String(value);
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ public static class SystemExtension
|
||||
/// <returns><see cref="bool"/></returns>
|
||||
public static bool IsDictionary(this Type type)
|
||||
{
|
||||
return TouchSocketCoreUtility.dicType.IsAssignableFrom(type);
|
||||
return TouchSocketCoreUtility.DicType.IsAssignableFrom(type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -573,7 +573,7 @@ public static class SystemExtension
|
||||
{
|
||||
return (type.IsGenericType && type.
|
||||
GetGenericTypeDefinition().Equals
|
||||
(TouchSocketCoreUtility.nullableType));
|
||||
(TouchSocketCoreUtility.NullableType));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -24,27 +24,15 @@ namespace TouchSocket.Core;
|
||||
public static partial class FileUtility
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取不重复文件名。
|
||||
/// <para>例如:New.txt已存在时,会返回New(1).txt</para>
|
||||
/// 删除路径文件
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetDuplicateFileName(string fileName)
|
||||
/// <param name="path"></param>
|
||||
public static void Delete(string path)
|
||||
{
|
||||
if (!File.Exists(fileName))
|
||||
if (File.Exists(path))
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
while (true)
|
||||
{
|
||||
index++;
|
||||
var newPath = Path.Combine(Path.GetDirectoryName(fileName), $"{Path.GetFileNameWithoutExtension(fileName)}({index}){Path.GetExtension(fileName)}");
|
||||
if (!File.Exists(newPath))
|
||||
{
|
||||
return newPath;
|
||||
}
|
||||
File.SetAttributes(path, FileAttributes.Normal);
|
||||
File.Delete(path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,86 +62,28 @@ public static partial class FileUtility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转化为文件大小的字符串,类似10B,10Kb,10Mb,10Gb。
|
||||
/// 获取不重复文件名。
|
||||
/// <para>例如:New.txt已存在时,会返回New(1).txt</para>
|
||||
/// </summary>
|
||||
/// <param name="length"></param>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToFileLengthString(long length)
|
||||
public static string GetDuplicateFileName(string fileName)
|
||||
{
|
||||
return length < 1024
|
||||
? $"{length}B"
|
||||
: length < 1024 * 1024
|
||||
? $"{(length / 1024.0).ToString("0.00")}Kb"
|
||||
: length < 1024 * 1024 * 1024
|
||||
? $"{(length / (1024.0 * 1024)).ToString("0.00")}Mb"
|
||||
: $"{(length / (1024.0 * 1024 * 1024)).ToString("0.00")}Gb";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件MD5
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetFileMD5(string path)
|
||||
{
|
||||
using (var fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||
if (!File.Exists(fileName))
|
||||
{
|
||||
return GetStreamMD5(fileStream);
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取流MD5
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStreamMD5(Stream fileStream)
|
||||
{
|
||||
using (HashAlgorithm hash = System.Security.Cryptography.MD5.Create())
|
||||
var index = 0;
|
||||
while (true)
|
||||
{
|
||||
return GetStreamHash(fileStream, hash);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得文件Hash值
|
||||
/// </summary>
|
||||
/// <param name="filePath">文件路径</param>
|
||||
/// <returns></returns>
|
||||
public static string GetFileHash256(string filePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
HashAlgorithm hash = SHA256.Create();
|
||||
using (var fileStream = File.OpenRead(filePath))
|
||||
index++;
|
||||
var newPath = Path.Combine(Path.GetDirectoryName(fileName), $"{Path.GetFileNameWithoutExtension(fileName)}({index}){Path.GetExtension(fileName)}");
|
||||
if (!File.Exists(newPath))
|
||||
{
|
||||
var HashValue = hash.ComputeHash(fileStream);
|
||||
return BitConverter.ToString(HashValue).Replace("-", "");
|
||||
return newPath;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得流Hash值
|
||||
/// </summary>
|
||||
/// <param name="stream"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStreamHash256(Stream stream)
|
||||
{
|
||||
try
|
||||
{
|
||||
HashAlgorithm hash = SHA256.Create();
|
||||
var HashValue = hash.ComputeHash(stream);
|
||||
return BitConverter.ToString(HashValue).Replace("-", "");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -168,8 +98,8 @@ public static partial class FileUtility
|
||||
{
|
||||
using (var fileStream = File.OpenRead(filePath))
|
||||
{
|
||||
var HashValue = hash.ComputeHash(fileStream);
|
||||
return BitConverter.ToString(HashValue).Replace("-", "");
|
||||
var hashValue = hash.ComputeHash(fileStream);
|
||||
return BitConverter.ToString(hashValue).Replace("-", "");
|
||||
}
|
||||
}
|
||||
catch
|
||||
@@ -179,17 +109,20 @@ public static partial class FileUtility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得流Hash值
|
||||
/// 获得文件Hash值
|
||||
/// </summary>
|
||||
/// <param name="stream"></param>
|
||||
/// <param name="hash"></param>
|
||||
/// <param name="filePath">文件路径</param>
|
||||
/// <returns></returns>
|
||||
public static string GetStreamHash(Stream stream, HashAlgorithm hash)
|
||||
public static string GetFileHash256(string filePath)
|
||||
{
|
||||
try
|
||||
{
|
||||
var HashValue = hash.ComputeHash(stream);
|
||||
return BitConverter.ToString(HashValue).Replace("-", "");
|
||||
HashAlgorithm hash = SHA256.Create();
|
||||
using (var fileStream = File.OpenRead(filePath))
|
||||
{
|
||||
var hashValue = hash.ComputeHash(fileStream);
|
||||
return BitConverter.ToString(hashValue).Replace("-", "");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -197,6 +130,19 @@ public static partial class FileUtility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件MD5
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetFileMd5(string path)
|
||||
{
|
||||
using (var fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
return GetStreamMd5(fileStream);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取仅当前文件夹中包含的文件名称,不含全路径。
|
||||
/// </summary>
|
||||
@@ -248,31 +194,55 @@ public static partial class FileUtility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除路径文件
|
||||
/// 获得流Hash值
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
public static void Delete(string path)
|
||||
/// <param name="stream"></param>
|
||||
/// <param name="hash"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStreamHash(Stream stream, HashAlgorithm hash)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
try
|
||||
{
|
||||
File.SetAttributes(path, FileAttributes.Normal);
|
||||
File.Delete(path);
|
||||
var hashValue = hash.ComputeHash(stream);
|
||||
return BitConverter.ToString(hashValue).Replace("-", "");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径格式化。
|
||||
/// 获得流Hash值
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 此操作会把路径中的所有反斜杠替换为正斜杠。例如:C:\\a.txt替换为C:/a.txt
|
||||
/// </remarks>
|
||||
/// <param name="pathString"></param>
|
||||
/// <param name="stream"></param>
|
||||
/// <returns></returns>
|
||||
public static string PathFormat(string pathString)
|
||||
public static string GetStreamHash256(Stream stream)
|
||||
{
|
||||
return pathString.Replace('\\', Path.DirectorySeparatorChar);
|
||||
try
|
||||
{
|
||||
HashAlgorithm hash = SHA256.Create();
|
||||
var hashValue = hash.ComputeHash(stream);
|
||||
return BitConverter.ToString(hashValue).Replace("-", "");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取流MD5
|
||||
/// </summary>
|
||||
/// <param name="fileStream"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetStreamMd5(Stream fileStream)
|
||||
{
|
||||
using (HashAlgorithm hash = System.Security.Cryptography.MD5.Create())
|
||||
{
|
||||
return GetStreamHash(fileStream, hash);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断该路径是否为文件夹
|
||||
@@ -290,9 +260,57 @@ public static partial class FileUtility
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 路径格式化。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 此操作会把路径中的所有反斜杠替换为正斜杠。例如:C:\\a.txt替换为C:/a.txt
|
||||
/// </remarks>
|
||||
/// <param name="pathString"></param>
|
||||
/// <returns></returns>
|
||||
public static string PathFormat(string pathString)
|
||||
{
|
||||
return pathString.Replace('\\', Path.AltDirectorySeparatorChar);
|
||||
//return pathString.Replace('\\', Path.PathSeparator);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 转化为文件大小的字符串,类似10B,10Kb,10Mb,10Gb。
|
||||
/// </summary>
|
||||
/// <param name="length"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToFileLengthString(long length)
|
||||
{
|
||||
const decimal kb = 1024;
|
||||
const decimal mb = 1024 * kb;
|
||||
const decimal gb = 1024 * mb;
|
||||
const decimal tb = 1024 * gb;
|
||||
const decimal pb = 1024 * tb;
|
||||
|
||||
if (length < kb)
|
||||
{
|
||||
return $"{length}B";
|
||||
}
|
||||
if (length < mb)
|
||||
{
|
||||
return $"{(length / kb):F2}Kb";
|
||||
}
|
||||
if (length < gb)
|
||||
{
|
||||
return $"{(length / mb):F2}Mb";
|
||||
}
|
||||
if (length < tb)
|
||||
{
|
||||
return $"{(length / gb):F2}Gb";
|
||||
}
|
||||
if (length < pb)
|
||||
{
|
||||
return $"{(length / tb):F2}Tb";
|
||||
}
|
||||
return $"{(length / pb):F2}Pb";
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public static partial class Mapper
|
||||
return default;
|
||||
}
|
||||
var sourceType = source.GetType();
|
||||
if (sourceType.IsPrimitive || sourceType.IsEnum || sourceType == TouchSocketCoreUtility.stringType)
|
||||
if (sourceType.IsPrimitive || sourceType.IsEnum || sourceType == TouchSocketCoreUtility.StringType)
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TouchSocket.Resources {
|
||||
@@ -63,7 +61,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 此适配器已被其他终端使用,请重新创建对象。 的本地化字符串。
|
||||
/// 查找类似 This adapter is already in use by another terminal, please create a new object. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string AdapterAlreadyUsed {
|
||||
get {
|
||||
@@ -72,7 +70,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 参数‘{0}’为空。 的本地化字符串。
|
||||
/// 查找类似 The parameter '{0}' is empty. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ArgumentIsNull {
|
||||
get {
|
||||
@@ -81,7 +79,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 当前读取器不允许读取。 的本地化字符串。
|
||||
/// 查找类似 The current byteBlock does not allow reading. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string BlockReaderNotAllowReading {
|
||||
get {
|
||||
@@ -90,7 +88,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 配置文件为空。 的本地化字符串。
|
||||
/// 查找类似 The config is empty. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ConfigIsNull {
|
||||
get {
|
||||
@@ -99,7 +97,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 默认情况。 的本地化字符串。
|
||||
/// 查找类似 Default situation. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Default {
|
||||
get {
|
||||
@@ -108,7 +106,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 发生异常,信息:‘{0}’。 的本地化字符串。
|
||||
/// 查找类似 An exception occurred with the message '{0}'. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ExceptionOccurred {
|
||||
get {
|
||||
@@ -117,7 +115,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文件‘{0}’不存在。 的本地化字符串。
|
||||
/// 查找类似 The file '{0}' does not exist. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileNotExists {
|
||||
get {
|
||||
@@ -126,7 +124,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 该路径’{0}‘的文件已经被加载为仅写入模式。 的本地化字符串。
|
||||
/// 查找类似 The file at path '{0}' has been loaded in write only mode. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileOnlyWrittenTo {
|
||||
get {
|
||||
@@ -135,7 +133,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 该路径’{0}‘的文件已经被加载为仅读取模式。 的本地化字符串。
|
||||
/// 查找类似 The file at path '{0}' has been loaded in read only mode. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileReadOnly {
|
||||
get {
|
||||
@@ -144,7 +142,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 对于枚举类型:‘{0}’,设置了无效的枚举值‘{1}’。 的本地化字符串。
|
||||
/// 查找类似 For enumeration type: '{0}', an invalid enumeration value '{1}' was set. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string InvalidEnum {
|
||||
get {
|
||||
@@ -153,7 +151,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 参数‘{0}’的值是无效参数。 的本地化字符串。
|
||||
/// 查找类似 The value of parameter '{0}' is an invalid parameter. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string InvalidParameter {
|
||||
get {
|
||||
@@ -162,7 +160,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 应为由数组支持的缓冲区。 的本地化字符串。
|
||||
/// 查找类似 Buffer backed by array was expected. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MemoryGetArrayFail {
|
||||
get {
|
||||
@@ -171,7 +169,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Token消息为‘{0}’的未注册。 的本地化字符串。
|
||||
/// 查找类似 The token message with '{0}' is not registered. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MessageNotFound {
|
||||
get {
|
||||
@@ -180,7 +178,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 没有找到类型‘{0}’的公共构造函数。 的本地化字符串。
|
||||
/// 查找类似 No public constructor found for type '{0}'. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string NotFindPublicConstructor {
|
||||
get {
|
||||
@@ -189,7 +187,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 类型为’{0}‘,HashCode为’{1}‘的对象实例已被释放。 的本地化字符串。
|
||||
/// 查找类似 The object instance with type '{0}' and HashCode '{1}' has been released. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ObjectDisposed {
|
||||
get {
|
||||
@@ -198,7 +196,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 操作已被取消。 的本地化字符串。
|
||||
/// 查找类似 The operation has been canceled. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string OperationCanceled {
|
||||
get {
|
||||
@@ -207,7 +205,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 操作超时。 的本地化字符串。
|
||||
/// 查找类似 Operation timed out. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string OperationOvertime {
|
||||
get {
|
||||
@@ -216,7 +214,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 操作成功。 的本地化字符串。
|
||||
/// 查找类似 Operation successful. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string OperationSuccessful {
|
||||
get {
|
||||
@@ -225,7 +223,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 插件‘{0}’为null,它可能在容器中缺少注册信息。 的本地化字符串。
|
||||
/// 查找类似 Plugin '{0}' is null, it may be missing registration information in the container. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string PluginIsNull {
|
||||
get {
|
||||
@@ -234,7 +232,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 类型:{0},信息:{1} 的本地化字符串。
|
||||
/// 查找类似 Type: {0}, Information: {1} 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ResultToString {
|
||||
get {
|
||||
@@ -243,7 +241,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 没有找到路径‘{0}’对应的流文件。 的本地化字符串。
|
||||
/// 查找类似 No stream file corresponding to path '{0}' was found. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StreamNotFind {
|
||||
get {
|
||||
@@ -252,7 +250,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 路径‘{0}’对应的流文件,仍然被‘{1}’对象应用。 的本地化字符串。
|
||||
/// 查找类似 The stream file corresponding to path '{0}' is still being applied by the '{1}' object. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StreamReferencing {
|
||||
get {
|
||||
@@ -261,7 +259,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 无法将字符串’{0}‘转为类型’{1}‘。 的本地化字符串。
|
||||
/// 查找类似 Unable to convert string '{0}' to type '{1}'. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StringParseToTypeFail {
|
||||
get {
|
||||
@@ -270,7 +268,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Token消息为‘{0}’的已注册。 的本地化字符串。
|
||||
/// 查找类似 The token message with '{0}' has been registered. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TokenExisted {
|
||||
get {
|
||||
@@ -279,7 +277,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未知错误。 的本地化字符串。
|
||||
/// 查找类似 Unknown error. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UnknownError {
|
||||
get {
|
||||
@@ -288,7 +286,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 无法创建未被注册的类型‘{0}’的实例。 的本地化字符串。
|
||||
/// 查找类似 Unable to create an instance of unregistered type '{0}'. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UnregisteredType {
|
||||
get {
|
||||
@@ -297,7 +295,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 参数‘{0}’的值为’{1}‘,超出‘{2}’到‘{3}’的范围。 的本地化字符串。
|
||||
/// 查找类似 The value of parameter '{0}' is' {1} ', which is outside the range of' {2} 'to' {3} '. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ValueBetweenAnd {
|
||||
get {
|
||||
@@ -306,7 +304,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 参数‘{0}’的值为’{1}‘,小于‘{2}’。 的本地化字符串。
|
||||
/// 查找类似 The value of parameter '{0}' is' {1} ', which is less than' {2} '. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ValueLessThan {
|
||||
get {
|
||||
@@ -315,7 +313,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 参数‘{0}’的值为’{1}‘,大于‘{2}’。 的本地化字符串。
|
||||
/// 查找类似 The value of parameter '{0}' is' {1} ', which is greater than' {2} '. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ValueMoreThan {
|
||||
get {
|
||||
@@ -323,4 +321,4 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="UnknownError" xml:space="preserve">
|
||||
<value>Unknown error.</value>
|
||||
</data>
|
||||
<data name="OperationSuccessful" xml:space="preserve">
|
||||
<value>Operation successful.</value>
|
||||
</data>
|
||||
<data name="OperationOvertime" xml:space="preserve">
|
||||
<value>Operation timed out.</value>
|
||||
</data>
|
||||
<data name="OperationCanceled" xml:space="preserve">
|
||||
<value>The operation has been canceled.</value>
|
||||
</data>
|
||||
<data name="ExceptionOccurred" xml:space="preserve">
|
||||
<value>An exception occurred with the message '{0}'.</value>
|
||||
</data>
|
||||
<data name="TokenExisted" xml:space="preserve">
|
||||
<value>The token message with '{0}' has been registered.</value>
|
||||
</data>
|
||||
<data name="MessageNotFound" xml:space="preserve">
|
||||
<value>The token message with '{0}' is not registered.</value>
|
||||
</data>
|
||||
<data name="UnregisteredType" xml:space="preserve">
|
||||
<value>Unable to create an instance of unregistered type '{0}'.</value>
|
||||
</data>
|
||||
<data name="NotFindPublicConstructor" xml:space="preserve">
|
||||
<value>No public constructor found for type '{0}'.</value>
|
||||
</data>
|
||||
<data name="StreamReferencing" xml:space="preserve">
|
||||
<value>The stream file corresponding to path '{0}' is still being applied by the '{1}' object.</value>
|
||||
</data>
|
||||
<data name="StreamNotFind" xml:space="preserve">
|
||||
<value>No stream file corresponding to path '{0}' was found.</value>
|
||||
</data>
|
||||
<data name="FileNotExists" xml:space="preserve">
|
||||
<value>The file '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="Default" xml:space="preserve">
|
||||
<value>Default situation.</value>
|
||||
</data>
|
||||
<data name="ResultToString" xml:space="preserve">
|
||||
<value>Type: {0}, Information: {1}</value>
|
||||
</data>
|
||||
<data name="ArgumentIsNull" xml:space="preserve">
|
||||
<value>The parameter '{0}' is empty.</value>
|
||||
</data>
|
||||
<data name="MemoryGetArrayFail" xml:space="preserve">
|
||||
<value>Buffer backed by array was expected.</value>
|
||||
</data>
|
||||
<data name="ConfigIsNull" xml:space="preserve">
|
||||
<value>The config is empty.</value>
|
||||
</data>
|
||||
<data name="InvalidParameter" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is an invalid parameter.</value>
|
||||
</data>
|
||||
<data name="ValueLessThan" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is less than' {2} '.</value>
|
||||
</data>
|
||||
<data name="ValueBetweenAnd" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is outside the range of' {2} 'to' {3} '.</value>
|
||||
</data>
|
||||
<data name="AdapterAlreadyUsed" xml:space="preserve">
|
||||
<value>This adapter is already in use by another terminal, please create a new object.</value>
|
||||
</data>
|
||||
<data name="StringParseToTypeFail" xml:space="preserve">
|
||||
<value>Unable to convert string '{0}' to type '{1}'.</value>
|
||||
</data>
|
||||
<data name="FileOnlyWrittenTo" xml:space="preserve">
|
||||
<value>The file at path '{0}' has been loaded in write only mode.</value>
|
||||
</data>
|
||||
<data name="FileReadOnly" xml:space="preserve">
|
||||
<value>The file at path '{0}' has been loaded in read only mode.</value>
|
||||
</data>
|
||||
<data name="ObjectDisposed" xml:space="preserve">
|
||||
<value>The object instance with type '{0}' and HashCode '{1}' has been released.</value>
|
||||
</data>
|
||||
<data name="BlockReaderNotAllowReading" xml:space="preserve">
|
||||
<value>The current byteBlock does not allow reading.</value>
|
||||
</data>
|
||||
<data name="ValueMoreThan" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is greater than' {2} '.</value>
|
||||
</data>
|
||||
<data name="InvalidEnum" xml:space="preserve">
|
||||
<value>For enumeration type: '{0}', an invalid enumeration value '{1}' was set.</value>
|
||||
</data>
|
||||
<data name="PluginIsNull" xml:space="preserve">
|
||||
<value>Plugin '{0}' is null, it may be missing registration information in the container.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,96 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
Microsoft ResX Schema
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -109,128 +89,99 @@
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="UnknownError" xml:space="preserve">
|
||||
<value>未知错误。</value>
|
||||
<comment>未知错误。</comment>
|
||||
<value>Unknown error.</value>
|
||||
</data>
|
||||
<data name="OperationSuccessful" xml:space="preserve">
|
||||
<value>操作成功。</value>
|
||||
<comment>操作成功。</comment>
|
||||
<value>Operation successful.</value>
|
||||
</data>
|
||||
<data name="OperationOvertime" xml:space="preserve">
|
||||
<value>操作超时。</value>
|
||||
<comment>操作超时。</comment>
|
||||
<value>Operation timed out.</value>
|
||||
</data>
|
||||
<data name="OperationCanceled" xml:space="preserve">
|
||||
<value>操作已被取消。</value>
|
||||
<comment>操作已被取消。</comment>
|
||||
<value>The operation has been canceled.</value>
|
||||
</data>
|
||||
<data name="ExceptionOccurred" xml:space="preserve">
|
||||
<value>发生异常,信息:‘{0}’。</value>
|
||||
<comment>发生异常,信息:‘{0}’。</comment>
|
||||
<value>An exception occurred with the message '{0}'.</value>
|
||||
</data>
|
||||
<data name="TokenExisted" xml:space="preserve">
|
||||
<value>Token消息为‘{0}’的已注册。</value>
|
||||
<comment>Token消息为‘{0}’的已注册。</comment>
|
||||
<value>The token message with '{0}' has been registered.</value>
|
||||
</data>
|
||||
<data name="MessageNotFound" xml:space="preserve">
|
||||
<value>Token消息为‘{0}’的未注册。</value>
|
||||
<comment>Token消息为‘{0}’的未注册。</comment>
|
||||
<value>The token message with '{0}' is not registered.</value>
|
||||
</data>
|
||||
<data name="UnregisteredType" xml:space="preserve">
|
||||
<value>无法创建未被注册的类型‘{0}’的实例。</value>
|
||||
<comment>无法创建未被注册的类型‘{0}’的实例。</comment>
|
||||
<value>Unable to create an instance of unregistered type '{0}'.</value>
|
||||
</data>
|
||||
<data name="NotFindPublicConstructor" xml:space="preserve">
|
||||
<value>没有找到类型‘{0}’的公共构造函数。</value>
|
||||
<comment>没有找到类型‘{0}’的公共构造函数。</comment>
|
||||
<value>No public constructor found for type '{0}'.</value>
|
||||
</data>
|
||||
<data name="StreamReferencing" xml:space="preserve">
|
||||
<value>路径‘{0}’对应的流文件,仍然被‘{1}’对象应用。</value>
|
||||
<comment>路径‘{0}’对应的流文件,仍然被‘{1}’对象应用。</comment>
|
||||
<value>The stream file corresponding to path '{0}' is still being applied by the '{1}' object.</value>
|
||||
</data>
|
||||
<data name="StreamNotFind" xml:space="preserve">
|
||||
<value>没有找到路径‘{0}’对应的流文件。</value>
|
||||
<comment>没有找到路径‘{0}’对应的流文件。</comment>
|
||||
<value>No stream file corresponding to path '{0}' was found.</value>
|
||||
</data>
|
||||
<data name="FileNotExists" xml:space="preserve">
|
||||
<value>文件‘{0}’不存在。</value>
|
||||
<comment>文件‘{0}’不存在。</comment>
|
||||
<value>The file '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="Default" xml:space="preserve">
|
||||
<value>默认情况。</value>
|
||||
<comment>默认情况。</comment>
|
||||
<value>Default situation.</value>
|
||||
</data>
|
||||
<data name="ResultToString" xml:space="preserve">
|
||||
<value>类型:{0},信息:{1}</value>
|
||||
<comment>Result结果ToString</comment>
|
||||
<value>Type: {0}, Information: {1}</value>
|
||||
</data>
|
||||
<data name="ArgumentIsNull" xml:space="preserve">
|
||||
<value>参数‘{0}’为空。</value>
|
||||
<comment>参数‘{0}’为空。</comment>
|
||||
</data>
|
||||
<data name="ConfigIsNull" xml:space="preserve">
|
||||
<value>配置文件为空。</value>
|
||||
<comment>配置文件为空。</comment>
|
||||
</data>
|
||||
<data name="InvalidParameter" xml:space="preserve">
|
||||
<value>参数‘{0}’的值是无效参数。</value>
|
||||
<comment>参数‘{0}’的值是无效参数。</comment>
|
||||
</data>
|
||||
<data name="ValueLessThan" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,小于‘{2}’。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,小于‘{2}’。</comment>
|
||||
</data>
|
||||
<data name="ValueBetweenAnd" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,超出‘{2}’到‘{3}’的范围。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,超出‘{2}’到‘{3}’的范围。</comment>
|
||||
</data>
|
||||
<data name="ValueMoreThan" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,大于‘{2}’。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,大于‘{2}’。</comment>
|
||||
</data>
|
||||
<data name="AdapterAlreadyUsed" xml:space="preserve">
|
||||
<value>此适配器已被其他终端使用,请重新创建对象。</value>
|
||||
<comment>此适配器已被其他终端使用,请重新创建对象。</comment>
|
||||
</data>
|
||||
<data name="StringParseToTypeFail" xml:space="preserve">
|
||||
<value>无法将字符串’{0}‘转为类型’{1}‘。</value>
|
||||
<comment>无法将字符串’{0}‘转为类型’{1}‘。</comment>
|
||||
<value>The parameter '{0}' is empty.</value>
|
||||
</data>
|
||||
<data name="MemoryGetArrayFail" xml:space="preserve">
|
||||
<value>应为由数组支持的缓冲区。</value>
|
||||
<comment>应为由数组支持的缓冲区。</comment>
|
||||
<value>Buffer backed by array was expected.</value>
|
||||
</data>
|
||||
<data name="ConfigIsNull" xml:space="preserve">
|
||||
<value>The config is empty.</value>
|
||||
</data>
|
||||
<data name="InvalidParameter" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is an invalid parameter.</value>
|
||||
</data>
|
||||
<data name="ValueLessThan" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is less than' {2} '.</value>
|
||||
</data>
|
||||
<data name="ValueBetweenAnd" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is outside the range of' {2} 'to' {3} '.</value>
|
||||
</data>
|
||||
<data name="AdapterAlreadyUsed" xml:space="preserve">
|
||||
<value>This adapter is already in use by another terminal, please create a new object.</value>
|
||||
</data>
|
||||
<data name="StringParseToTypeFail" xml:space="preserve">
|
||||
<value>Unable to convert string '{0}' to type '{1}'.</value>
|
||||
</data>
|
||||
<data name="FileOnlyWrittenTo" xml:space="preserve">
|
||||
<value>该路径’{0}‘的文件已经被加载为仅写入模式。</value>
|
||||
<comment>该路径’{0}‘的文件已经被加载为仅写入模式。</comment>
|
||||
<value>The file at path '{0}' has been loaded in write only mode.</value>
|
||||
</data>
|
||||
<data name="FileReadOnly" xml:space="preserve">
|
||||
<value>该路径’{0}‘的文件已经被加载为仅读取模式。</value>
|
||||
<comment>该路径’{0}‘的文件已经被加载为仅读取模式。</comment>
|
||||
<value>The file at path '{0}' has been loaded in read only mode.</value>
|
||||
</data>
|
||||
<data name="ObjectDisposed" xml:space="preserve">
|
||||
<value>类型为’{0}‘,HashCode为’{1}‘的对象实例已被释放。</value>
|
||||
<comment>类型为’{0}‘,HashCode为’{1}‘的对象实例已被释放。</comment>
|
||||
<value>The object instance with type '{0}' and HashCode '{1}' has been released.</value>
|
||||
</data>
|
||||
<data name="BlockReaderNotAllowReading" xml:space="preserve">
|
||||
<value>当前读取器不允许读取。</value>
|
||||
<comment>当前读取器不允许读取。</comment>
|
||||
<value>The current byteBlock does not allow reading.</value>
|
||||
</data>
|
||||
<data name="ValueMoreThan" xml:space="preserve">
|
||||
<value>The value of parameter '{0}' is' {1} ', which is greater than' {2} '.</value>
|
||||
</data>
|
||||
<data name="InvalidEnum" xml:space="preserve">
|
||||
<value>对于枚举类型:‘{0}’,设置了无效的枚举值‘{1}’。</value>
|
||||
<comment>对于枚举类型:‘{0}’,设置了无效的枚举值‘{1}’。</comment>
|
||||
<value>For enumeration type: '{0}', an invalid enumeration value '{1}' was set.</value>
|
||||
</data>
|
||||
<data name="PluginIsNull" xml:space="preserve">
|
||||
<value>插件‘{0}’为null,它可能在容器中缺少注册信息。</value>
|
||||
<comment>插件‘{0}’为null,它可能在容器中缺少注册信息。</comment>
|
||||
<value>Plugin '{0}' is null, it may be missing registration information in the container.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,236 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="UnknownError" xml:space="preserve">
|
||||
<value>未知错误。</value>
|
||||
<comment>未知错误。</comment>
|
||||
</data>
|
||||
<data name="OperationSuccessful" xml:space="preserve">
|
||||
<value>操作成功。</value>
|
||||
<comment>操作成功。</comment>
|
||||
</data>
|
||||
<data name="OperationOvertime" xml:space="preserve">
|
||||
<value>操作超时。</value>
|
||||
<comment>操作超时。</comment>
|
||||
</data>
|
||||
<data name="OperationCanceled" xml:space="preserve">
|
||||
<value>操作已被取消。</value>
|
||||
<comment>操作已被取消。</comment>
|
||||
</data>
|
||||
<data name="ExceptionOccurred" xml:space="preserve">
|
||||
<value>发生异常,信息:‘{0}’。</value>
|
||||
<comment>发生异常,信息:‘{0}’。</comment>
|
||||
</data>
|
||||
<data name="TokenExisted" xml:space="preserve">
|
||||
<value>Token消息为‘{0}’的已注册。</value>
|
||||
<comment>Token消息为‘{0}’的已注册。</comment>
|
||||
</data>
|
||||
<data name="MessageNotFound" xml:space="preserve">
|
||||
<value>Token消息为‘{0}’的未注册。</value>
|
||||
<comment>Token消息为‘{0}’的未注册。</comment>
|
||||
</data>
|
||||
<data name="UnregisteredType" xml:space="preserve">
|
||||
<value>无法创建未被注册的类型‘{0}’的实例。</value>
|
||||
<comment>无法创建未被注册的类型‘{0}’的实例。</comment>
|
||||
</data>
|
||||
<data name="NotFindPublicConstructor" xml:space="preserve">
|
||||
<value>没有找到类型‘{0}’的公共构造函数。</value>
|
||||
<comment>没有找到类型‘{0}’的公共构造函数。</comment>
|
||||
</data>
|
||||
<data name="StreamReferencing" xml:space="preserve">
|
||||
<value>路径‘{0}’对应的流文件,仍然被‘{1}’对象应用。</value>
|
||||
<comment>路径‘{0}’对应的流文件,仍然被‘{1}’对象应用。</comment>
|
||||
</data>
|
||||
<data name="StreamNotFind" xml:space="preserve">
|
||||
<value>没有找到路径‘{0}’对应的流文件。</value>
|
||||
<comment>没有找到路径‘{0}’对应的流文件。</comment>
|
||||
</data>
|
||||
<data name="FileNotExists" xml:space="preserve">
|
||||
<value>文件‘{0}’不存在。</value>
|
||||
<comment>文件‘{0}’不存在。</comment>
|
||||
</data>
|
||||
<data name="Default" xml:space="preserve">
|
||||
<value>默认情况。</value>
|
||||
<comment>默认情况。</comment>
|
||||
</data>
|
||||
<data name="ResultToString" xml:space="preserve">
|
||||
<value>类型:{0},信息:{1}</value>
|
||||
<comment>Result结果ToString</comment>
|
||||
</data>
|
||||
<data name="ArgumentIsNull" xml:space="preserve">
|
||||
<value>参数‘{0}’为空。</value>
|
||||
<comment>参数‘{0}’为空。</comment>
|
||||
</data>
|
||||
<data name="ConfigIsNull" xml:space="preserve">
|
||||
<value>配置文件为空。</value>
|
||||
<comment>配置文件为空。</comment>
|
||||
</data>
|
||||
<data name="InvalidParameter" xml:space="preserve">
|
||||
<value>参数‘{0}’的值是无效参数。</value>
|
||||
<comment>参数‘{0}’的值是无效参数。</comment>
|
||||
</data>
|
||||
<data name="ValueLessThan" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,小于‘{2}’。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,小于‘{2}’。</comment>
|
||||
</data>
|
||||
<data name="ValueBetweenAnd" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,超出‘{2}’到‘{3}’的范围。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,超出‘{2}’到‘{3}’的范围。</comment>
|
||||
</data>
|
||||
<data name="ValueMoreThan" xml:space="preserve">
|
||||
<value>参数‘{0}’的值为’{1}‘,大于‘{2}’。</value>
|
||||
<comment>参数‘{0}’的值为’{1}‘,大于‘{2}’。</comment>
|
||||
</data>
|
||||
<data name="AdapterAlreadyUsed" xml:space="preserve">
|
||||
<value>此适配器已被其他终端使用,请重新创建对象。</value>
|
||||
<comment>此适配器已被其他终端使用,请重新创建对象。</comment>
|
||||
</data>
|
||||
<data name="StringParseToTypeFail" xml:space="preserve">
|
||||
<value>无法将字符串’{0}‘转为类型’{1}‘。</value>
|
||||
<comment>无法将字符串’{0}‘转为类型’{1}‘。</comment>
|
||||
</data>
|
||||
<data name="MemoryGetArrayFail" xml:space="preserve">
|
||||
<value>应为由数组支持的缓冲区。</value>
|
||||
<comment>应为由数组支持的缓冲区。</comment>
|
||||
</data>
|
||||
<data name="FileOnlyWrittenTo" xml:space="preserve">
|
||||
<value>该路径’{0}‘的文件已经被加载为仅写入模式。</value>
|
||||
<comment>该路径’{0}‘的文件已经被加载为仅写入模式。</comment>
|
||||
</data>
|
||||
<data name="FileReadOnly" xml:space="preserve">
|
||||
<value>该路径’{0}‘的文件已经被加载为仅读取模式。</value>
|
||||
<comment>该路径’{0}‘的文件已经被加载为仅读取模式。</comment>
|
||||
</data>
|
||||
<data name="ObjectDisposed" xml:space="preserve">
|
||||
<value>类型为’{0}‘,HashCode为’{1}‘的对象实例已被释放。</value>
|
||||
<comment>类型为’{0}‘,HashCode为’{1}‘的对象实例已被释放。</comment>
|
||||
</data>
|
||||
<data name="BlockReaderNotAllowReading" xml:space="preserve">
|
||||
<value>当前读取器不允许读取。</value>
|
||||
<comment>当前读取器不允许读取。</comment>
|
||||
</data>
|
||||
<data name="InvalidEnum" xml:space="preserve">
|
||||
<value>对于枚举类型:‘{0}’,设置了无效的枚举值‘{1}’。</value>
|
||||
<comment>对于枚举类型:‘{0}’,设置了无效的枚举值‘{1}’。</comment>
|
||||
</data>
|
||||
<data name="PluginIsNull" xml:space="preserve">
|
||||
<value>插件‘{0}’为null,它可能在容器中缺少注册信息。</value>
|
||||
<comment>插件‘{0}’为null,它可能在容器中缺少注册信息。</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -74,7 +74,7 @@ public sealed class SerializObject
|
||||
break;
|
||||
}
|
||||
genericType = genericType.BaseType;
|
||||
if (genericType == TouchSocketCoreUtility.objType)
|
||||
if (genericType == TouchSocketCoreUtility.ObjType)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public sealed class SerializObject
|
||||
break;
|
||||
}
|
||||
genericType = genericType.BaseType;
|
||||
if (genericType == TouchSocketCoreUtility.objType)
|
||||
if (genericType == TouchSocketCoreUtility.ObjType)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -442,7 +442,7 @@ public static partial class SerializeConvert
|
||||
/// <returns></returns>
|
||||
public static byte[] JsonSerializeToBytes(object obj)
|
||||
{
|
||||
return ToJsonString(obj).ToUTF8Bytes();
|
||||
return ToJsonString(obj).ToUtf8Bytes();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -54,7 +54,7 @@ public class JsonBytesToClassSerializerFormatter<TState> : ISerializerFormatter<
|
||||
{
|
||||
try
|
||||
{
|
||||
source = JsonConvert.SerializeObject(target, this.JsonSettings).ToUTF8Bytes();
|
||||
source = JsonConvert.SerializeObject(target, this.JsonSettings).ToUtf8Bytes();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -51,7 +51,7 @@ public class JsonMemoryToClassSerializerFormatter<TState> : ISerializerFormatter
|
||||
{
|
||||
try
|
||||
{
|
||||
source = JsonConvert.SerializeObject(target, this.JsonSettings).ToUTF8Bytes();
|
||||
source = JsonConvert.SerializeObject(target, this.JsonSettings).ToUtf8Bytes();
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\TouchSocketCoreResource.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>TouchSocketCoreResource.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Resources\TouchSocketCoreResource.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>TouchSocketCoreResource.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -764,7 +764,7 @@ public abstract class DmtpActor : DependencyObject, IDmtpActor
|
||||
#if SystemTextJson
|
||||
var bytes = System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(obj, typeof(T), TouchSokcetDmtpSourceGenerationContext.Default);
|
||||
#else
|
||||
var bytes = JsonConvert.SerializeObject(obj).ToUTF8Bytes();
|
||||
var bytes = JsonConvert.SerializeObject(obj).ToUtf8Bytes();
|
||||
#endif
|
||||
|
||||
return this.SendAsync(protocol, bytes);
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TouchSocket.Resources {
|
||||
@@ -63,7 +61,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Id为{0}的通道已存在。 的本地化字符串。
|
||||
/// 查找类似 The channel with ID {0} already exists. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ChannelExisted {
|
||||
get {
|
||||
@@ -72,7 +70,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 从‘{0}’创建写入流失败,信息:{1}。 的本地化字符串。
|
||||
/// 查找类似 Failed to create write stream from '{0}', information: {1}. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CreateWriteStreamFail {
|
||||
get {
|
||||
@@ -81,7 +79,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 目录‘{0}’已存在。 的本地化字符串。
|
||||
/// 查找类似 The directory '{0}' already exists. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DirectoryExisted {
|
||||
get {
|
||||
@@ -90,7 +88,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 目录‘{0}’不存在。 的本地化字符串。
|
||||
/// 查找类似 The directory '{0}' does not exist. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DirectoryNotExists {
|
||||
get {
|
||||
@@ -99,7 +97,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 DmtpFileTransferActor为空,可能需要启用DmtpFileTransfer插件。 的本地化字符串。
|
||||
/// 查找类似 DmtpFileTransferActor is empty, it may be necessary to enable the DmtpFileTransfer plugin. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DmtpFileTransferActorNull {
|
||||
get {
|
||||
@@ -108,7 +106,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 DmtpRpcActor为空,可能需要启用DmtpRpc插件。 的本地化字符串。
|
||||
/// 查找类似 DmtpRpcActor is empty, it may be necessary to enable the DmtpRpc plugin. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DmtpRpcActorArgumentNull {
|
||||
get {
|
||||
@@ -117,7 +115,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文件‘{0}’已存在。 的本地化字符串。
|
||||
/// 查找类似 The file '{0}' already exists. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileExisted {
|
||||
get {
|
||||
@@ -126,7 +124,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文件长度太长。 的本地化字符串。
|
||||
/// 查找类似 The file length is too long. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileLengthTooLong {
|
||||
get {
|
||||
@@ -135,7 +133,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 文件‘{0}’不存在。 的本地化字符串。
|
||||
/// 查找类似 The file '{0}' does not exist. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string FileNotExists {
|
||||
get {
|
||||
@@ -144,7 +142,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 事件操作器异常。 的本地化字符串。
|
||||
/// 查找类似 Event operator exception. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string GetEventArgsFail {
|
||||
get {
|
||||
@@ -153,7 +151,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 还有{0}个资源没有完成。 的本地化字符串。
|
||||
/// 查找类似 There are still {0} resources that have not been completed. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string HasUnFinished {
|
||||
get {
|
||||
@@ -162,7 +160,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 读取文件长度错误。 的本地化字符串。
|
||||
/// 查找类似 Error reading file length. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LengthErrorWhenRead {
|
||||
get {
|
||||
@@ -171,7 +169,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 RedisActor为空,可能需要启用RedisActor插件。 的本地化字符串。
|
||||
/// 查找类似 RedisActor is empty, it may be necessary to enable the RedisActor plugin. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RedisActorNull {
|
||||
get {
|
||||
@@ -180,7 +178,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 RemoteAccessActor为空,可能需要启用RemoteAccess插件。 的本地化字符串。
|
||||
/// 查找类似 The RemoteAccessActor is empty, and the RemoteAccess plugin may need to be enabled. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RemoteAccessActorNull {
|
||||
get {
|
||||
@@ -189,7 +187,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 远程终端拒绝该操作,反馈信息:{0}。 的本地化字符串。
|
||||
/// 查找类似 The remote terminal refused the operation and provided feedback message: {0}. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RemoteRefuse {
|
||||
get {
|
||||
@@ -198,7 +196,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 RemoteStreamActor为空,可能需要启用RemoteStream插件。 的本地化字符串。
|
||||
/// 查找类似 The RemoteStreamActor is empty, and the RemoteStream plugin may need to be enabled. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RemoteStreamActorNull {
|
||||
get {
|
||||
@@ -207,7 +205,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 资源句柄{0}对应的资源没有找到,可能操作已超时。 的本地化字符串。
|
||||
/// 查找类似 The resource corresponding to resource handle {0} could not be found, possibly the operation has timed out. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ResourceHandleNotFind {
|
||||
get {
|
||||
@@ -216,7 +214,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 不允许路由该包,信息:{0}。 的本地化字符串。
|
||||
/// 查找类似 Routing of this packet is not allowed, information: {0}. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RoutingNotAllowed {
|
||||
get {
|
||||
@@ -225,7 +223,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 函数执行异常,详细信息:{0}。 的本地化字符串。
|
||||
/// 查找类似 Function execution exception, details: {0}. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RpcInvokeException {
|
||||
get {
|
||||
@@ -234,7 +232,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 方法已被禁用。 的本地化字符串。
|
||||
/// 查找类似 The method has been disabled. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RpcMethodDisable {
|
||||
get {
|
||||
@@ -243,7 +241,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 未找到该公共方法,或该方法未标记为Rpc。 的本地化字符串。
|
||||
/// 查找类似 The public method was not found, or the method is not marked as Rpc. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RpcMethodNotFind {
|
||||
get {
|
||||
@@ -252,7 +250,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 通道设置失败。 的本地化字符串。
|
||||
/// 查找类似 Channel setting failed. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SetChannelFail {
|
||||
get {
|
||||
@@ -261,7 +259,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 流容器为空。 的本地化字符串。
|
||||
/// 查找类似 The flow container is empty. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StreamBucketNull {
|
||||
get {
|
||||
@@ -269,4 +267,4 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,95 +98,72 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="DmtpRpcActorArgumentNull" xml:space="preserve">
|
||||
<value>DmtpRpcActor为空,可能需要启用DmtpRpc插件。</value>
|
||||
<comment>DmtpRpcActor为空,可能需要启用DmtpRpc插件。</comment>
|
||||
<value>DmtpRpcActor is empty, it may be necessary to enable the DmtpRpc plugin.</value>
|
||||
</data>
|
||||
<data name="DmtpFileTransferActorNull" xml:space="preserve">
|
||||
<value>DmtpFileTransferActor为空,可能需要启用DmtpFileTransfer插件。</value>
|
||||
<comment>DmtpFileTransferActor为空,可能需要启用DmtpFileTransfer插件。</comment>
|
||||
<value>DmtpFileTransferActor is empty, it may be necessary to enable the DmtpFileTransfer plugin.</value>
|
||||
</data>
|
||||
<data name="RedisActorNull" xml:space="preserve">
|
||||
<value>RedisActor为空,可能需要启用RedisActor插件。</value>
|
||||
<comment>RedisActor为空,可能需要启用RedisActor插件。</comment>
|
||||
<value>RedisActor is empty, it may be necessary to enable the RedisActor plugin.</value>
|
||||
</data>
|
||||
<data name="RemoteAccessActorNull" xml:space="preserve">
|
||||
<value>RemoteAccessActor为空,可能需要启用RemoteAccess插件。</value>
|
||||
<comment>RemoteAccessActor为空,可能需要启用RemoteAccess插件。</comment>
|
||||
<value>The RemoteAccessActor is empty, and the RemoteAccess plugin may need to be enabled.</value>
|
||||
</data>
|
||||
<data name="RemoteStreamActorNull" xml:space="preserve">
|
||||
<value>RemoteStreamActor为空,可能需要启用RemoteStream插件。</value>
|
||||
<comment>RemoteStreamActor为空,可能需要启用RemoteStream插件。</comment>
|
||||
<value>The RemoteStreamActor is empty, and the RemoteStream plugin may need to be enabled.</value>
|
||||
</data>
|
||||
<data name="RoutingNotAllowed" xml:space="preserve">
|
||||
<value>不允许路由该包,信息:{0}。</value>
|
||||
<comment>不允许路由该包,信息:{0}。</comment>
|
||||
<value>Routing of this packet is not allowed, information: {0}.</value>
|
||||
</data>
|
||||
<data name="RpcMethodNotFind" xml:space="preserve">
|
||||
<value>未找到该公共方法,或该方法未标记为Rpc。</value>
|
||||
<comment>未找到该公共方法,或该方法未标记为Rpc。</comment>
|
||||
<value>The public method was not found, or the method is not marked as Rpc.</value>
|
||||
</data>
|
||||
<data name="RpcMethodDisable" xml:space="preserve">
|
||||
<value>方法已被禁用。</value>
|
||||
<comment>方法已被禁用。</comment>
|
||||
<value>The method has been disabled.</value>
|
||||
</data>
|
||||
<data name="RpcInvokeException" xml:space="preserve">
|
||||
<value>函数执行异常,详细信息:{0}。</value>
|
||||
<comment>函数执行异常,详细信息:{0}。</comment>
|
||||
<value>Function execution exception, details: {0}.</value>
|
||||
</data>
|
||||
<data name="GetEventArgsFail" xml:space="preserve">
|
||||
<value>事件操作器异常。</value>
|
||||
<comment>事件操作器异常。</comment>
|
||||
<value>Event operator exception.</value>
|
||||
</data>
|
||||
<data name="SetChannelFail" xml:space="preserve">
|
||||
<value>通道设置失败。</value>
|
||||
<comment>通道设置失败。</comment>
|
||||
<value>Channel setting failed.</value>
|
||||
</data>
|
||||
<data name="ChannelExisted" xml:space="preserve">
|
||||
<value>Id为{0}的通道已存在。</value>
|
||||
<comment>Id为{0}的通道已存在。</comment>
|
||||
<value>The channel with ID {0} already exists.</value>
|
||||
</data>
|
||||
<data name="RemoteRefuse" xml:space="preserve">
|
||||
<value>远程终端拒绝该操作,反馈信息:{0}。</value>
|
||||
<comment>远程终端拒绝该操作,反馈信息:{0}。</comment>
|
||||
<value>The remote terminal refused the operation and provided feedback message: {0}.</value>
|
||||
</data>
|
||||
<data name="CreateWriteStreamFail" xml:space="preserve">
|
||||
<value>从‘{0}’创建写入流失败,信息:{1}。</value>
|
||||
<comment>从‘{0}’创建写入流失败,信息:{1}。</comment>
|
||||
<value>Failed to create write stream from '{0}', information: {1}.</value>
|
||||
</data>
|
||||
<data name="StreamBucketNull" xml:space="preserve">
|
||||
<value>流容器为空。</value>
|
||||
<comment>流容器为空。</comment>
|
||||
<value>The flow container is empty.</value>
|
||||
</data>
|
||||
<data name="DirectoryExisted" xml:space="preserve">
|
||||
<value>目录‘{0}’已存在。</value>
|
||||
<comment>目录‘{0}’已存在。</comment>
|
||||
<value>The directory '{0}' already exists.</value>
|
||||
</data>
|
||||
<data name="FileExisted" xml:space="preserve">
|
||||
<value>文件‘{0}’已存在。</value>
|
||||
<comment>文件‘{0}’已存在。</comment>
|
||||
<value>The file '{0}' already exists.</value>
|
||||
</data>
|
||||
<data name="FileNotExists" xml:space="preserve">
|
||||
<value>文件‘{0}’不存在。</value>
|
||||
<comment>文件‘{0}’不存在。</comment>
|
||||
<value>The file '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="DirectoryNotExists" xml:space="preserve">
|
||||
<value>目录‘{0}’不存在。</value>
|
||||
<comment>目录‘{0}’不存在。</comment>
|
||||
<value>The directory '{0}' does not exist.</value>
|
||||
</data>
|
||||
<data name="ResourceHandleNotFind" xml:space="preserve">
|
||||
<value>资源句柄{0}对应的资源没有找到,可能操作已超时。</value>
|
||||
<comment>资源句柄{0}对应的资源没有找到,可能操作已超时。</comment>
|
||||
<value>The resource corresponding to resource handle {0} could not be found, possibly the operation has timed out.</value>
|
||||
</data>
|
||||
<data name="HasUnFinished" xml:space="preserve">
|
||||
<value>还有{0}个资源没有完成。</value>
|
||||
<comment>还有{0}个资源没有完成。</comment>
|
||||
<value>There are still {0} resources that have not been completed.</value>
|
||||
</data>
|
||||
<data name="FileLengthTooLong" xml:space="preserve">
|
||||
<value>文件长度太长。</value>
|
||||
<comment>文件长度太长。</comment>
|
||||
<value>The file length is too long.</value>
|
||||
</data>
|
||||
<data name="LengthErrorWhenRead" xml:space="preserve">
|
||||
<value>读取文件长度错误。</value>
|
||||
<comment>读取文件长度错误。</comment>
|
||||
<value>Error reading file length.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -98,72 +98,95 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="DmtpRpcActorArgumentNull" xml:space="preserve">
|
||||
<value>DmtpRpcActor is empty, it may be necessary to enable the DmtpRpc plugin.</value>
|
||||
<value>DmtpRpcActor为空,可能需要启用DmtpRpc插件。</value>
|
||||
<comment>DmtpRpcActor为空,可能需要启用DmtpRpc插件。</comment>
|
||||
</data>
|
||||
<data name="DmtpFileTransferActorNull" xml:space="preserve">
|
||||
<value>DmtpFileTransferActor is empty, it may be necessary to enable the DmtpFileTransfer plugin.</value>
|
||||
<value>DmtpFileTransferActor为空,可能需要启用DmtpFileTransfer插件。</value>
|
||||
<comment>DmtpFileTransferActor为空,可能需要启用DmtpFileTransfer插件。</comment>
|
||||
</data>
|
||||
<data name="RedisActorNull" xml:space="preserve">
|
||||
<value>RedisActor is empty, it may be necessary to enable the RedisActor plugin.</value>
|
||||
<value>RedisActor为空,可能需要启用RedisActor插件。</value>
|
||||
<comment>RedisActor为空,可能需要启用RedisActor插件。</comment>
|
||||
</data>
|
||||
<data name="RemoteAccessActorNull" xml:space="preserve">
|
||||
<value>The RemoteAccessActor is empty, and the RemoteAccess plugin may need to be enabled.</value>
|
||||
<value>RemoteAccessActor为空,可能需要启用RemoteAccess插件。</value>
|
||||
<comment>RemoteAccessActor为空,可能需要启用RemoteAccess插件。</comment>
|
||||
</data>
|
||||
<data name="RemoteStreamActorNull" xml:space="preserve">
|
||||
<value>The RemoteStreamActor is empty, and the RemoteStream plugin may need to be enabled.</value>
|
||||
<value>RemoteStreamActor为空,可能需要启用RemoteStream插件。</value>
|
||||
<comment>RemoteStreamActor为空,可能需要启用RemoteStream插件。</comment>
|
||||
</data>
|
||||
<data name="RoutingNotAllowed" xml:space="preserve">
|
||||
<value>Routing of this packet is not allowed, information: {0}.</value>
|
||||
<value>不允许路由该包,信息:{0}。</value>
|
||||
<comment>不允许路由该包,信息:{0}。</comment>
|
||||
</data>
|
||||
<data name="RpcMethodNotFind" xml:space="preserve">
|
||||
<value>The public method was not found, or the method is not marked as Rpc.</value>
|
||||
<value>未找到该公共方法,或该方法未标记为Rpc。</value>
|
||||
<comment>未找到该公共方法,或该方法未标记为Rpc。</comment>
|
||||
</data>
|
||||
<data name="RpcMethodDisable" xml:space="preserve">
|
||||
<value>The method has been disabled.</value>
|
||||
<value>方法已被禁用。</value>
|
||||
<comment>方法已被禁用。</comment>
|
||||
</data>
|
||||
<data name="RpcInvokeException" xml:space="preserve">
|
||||
<value>Function execution exception, details: {0}.</value>
|
||||
<value>函数执行异常,详细信息:{0}。</value>
|
||||
<comment>函数执行异常,详细信息:{0}。</comment>
|
||||
</data>
|
||||
<data name="GetEventArgsFail" xml:space="preserve">
|
||||
<value>Event operator exception.</value>
|
||||
<value>事件操作器异常。</value>
|
||||
<comment>事件操作器异常。</comment>
|
||||
</data>
|
||||
<data name="SetChannelFail" xml:space="preserve">
|
||||
<value>Channel setting failed.</value>
|
||||
<value>通道设置失败。</value>
|
||||
<comment>通道设置失败。</comment>
|
||||
</data>
|
||||
<data name="ChannelExisted" xml:space="preserve">
|
||||
<value>The channel with ID {0} already exists.</value>
|
||||
<value>Id为{0}的通道已存在。</value>
|
||||
<comment>Id为{0}的通道已存在。</comment>
|
||||
</data>
|
||||
<data name="RemoteRefuse" xml:space="preserve">
|
||||
<value>The remote terminal refused the operation and provided feedback message: {0}.</value>
|
||||
<value>远程终端拒绝该操作,反馈信息:{0}。</value>
|
||||
<comment>远程终端拒绝该操作,反馈信息:{0}。</comment>
|
||||
</data>
|
||||
<data name="CreateWriteStreamFail" xml:space="preserve">
|
||||
<value>Failed to create write stream from '{0}', information: {1}.</value>
|
||||
<value>从‘{0}’创建写入流失败,信息:{1}。</value>
|
||||
<comment>从‘{0}’创建写入流失败,信息:{1}。</comment>
|
||||
</data>
|
||||
<data name="StreamBucketNull" xml:space="preserve">
|
||||
<value>The flow container is empty.</value>
|
||||
<value>流容器为空。</value>
|
||||
<comment>流容器为空。</comment>
|
||||
</data>
|
||||
<data name="DirectoryExisted" xml:space="preserve">
|
||||
<value>The directory '{0}' already exists.</value>
|
||||
<value>目录‘{0}’已存在。</value>
|
||||
<comment>目录‘{0}’已存在。</comment>
|
||||
</data>
|
||||
<data name="FileExisted" xml:space="preserve">
|
||||
<value>The file '{0}' already exists.</value>
|
||||
<value>文件‘{0}’已存在。</value>
|
||||
<comment>文件‘{0}’已存在。</comment>
|
||||
</data>
|
||||
<data name="FileNotExists" xml:space="preserve">
|
||||
<value>The file '{0}' does not exist.</value>
|
||||
<value>文件‘{0}’不存在。</value>
|
||||
<comment>文件‘{0}’不存在。</comment>
|
||||
</data>
|
||||
<data name="DirectoryNotExists" xml:space="preserve">
|
||||
<value>The directory '{0}' does not exist.</value>
|
||||
<value>目录‘{0}’不存在。</value>
|
||||
<comment>目录‘{0}’不存在。</comment>
|
||||
</data>
|
||||
<data name="ResourceHandleNotFind" xml:space="preserve">
|
||||
<value>The resource corresponding to resource handle {0} could not be found, possibly the operation has timed out.</value>
|
||||
<value>资源句柄{0}对应的资源没有找到,可能操作已超时。</value>
|
||||
<comment>资源句柄{0}对应的资源没有找到,可能操作已超时。</comment>
|
||||
</data>
|
||||
<data name="HasUnFinished" xml:space="preserve">
|
||||
<value>There are still {0} resources that have not been completed.</value>
|
||||
<value>还有{0}个资源没有完成。</value>
|
||||
<comment>还有{0}个资源没有完成。</comment>
|
||||
</data>
|
||||
<data name="FileLengthTooLong" xml:space="preserve">
|
||||
<value>The file length is too long.</value>
|
||||
<value>文件长度太长。</value>
|
||||
<comment>文件长度太长。</comment>
|
||||
</data>
|
||||
<data name="LengthErrorWhenRead" xml:space="preserve">
|
||||
<value>Error reading file length.</value>
|
||||
<value>读取文件长度错误。</value>
|
||||
<comment>读取文件长度错误。</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,13 +1,11 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TouchSocket.Resources {
|
||||
@@ -63,7 +61,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 服务器已启动。 的本地化字符串。
|
||||
/// 查找类似 The server has started. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string HostServerStarted {
|
||||
get {
|
||||
@@ -71,4 +69,4 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,103 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="HostServerStarted" xml:space="preserve">
|
||||
<value>The server has started.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,96 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
Microsoft ResX Schema
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -109,16 +89,15 @@
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="HostServerStarted" xml:space="preserve">
|
||||
<value>服务器已启动。</value>
|
||||
<comment>服务已启动。</comment>
|
||||
<value>The server has started.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="HostServerStarted" xml:space="preserve">
|
||||
<value>服务器已启动。</value>
|
||||
<comment>服务已启动。</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -387,7 +387,7 @@ public class HttpRequest : HttpBase
|
||||
|
||||
private static void AppendSpace<TByteBlock>(ref TByteBlock byteBlock) where TByteBlock : IByteBlock
|
||||
{
|
||||
byteBlock.Write(" "u8);
|
||||
byteBlock.Write(StringExtension.DefaultSpaceUtf8Span);
|
||||
}
|
||||
|
||||
private static void AppendSlash<TByteBlock>(ref TByteBlock byteBlock) where TByteBlock : IByteBlock
|
||||
|
||||
@@ -347,7 +347,7 @@ public class HttpResponse : HttpBase
|
||||
var msg = string.Empty;
|
||||
for (var i = 2; i < first.Length; i++)
|
||||
{
|
||||
msg += first[i] + " ";
|
||||
msg += first[i] + StringExtension.DefaultSpaceString;
|
||||
}
|
||||
this.StatusMessage = msg;
|
||||
|
||||
|
||||
@@ -76,6 +76,30 @@ internal class InternalFormCollection : Dictionary<string, string>, IFormCollect
|
||||
{
|
||||
}
|
||||
|
||||
//public InternalFormCollection(ReadOnlyMemory<byte> context, Encoding encoding)
|
||||
//{
|
||||
// var row = context.Span.ToString(encoding);
|
||||
// if (string.IsNullOrEmpty(row))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var kvs = row.Split('&');
|
||||
// if (kvs == null || kvs.Length == 0)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// foreach (var item in kvs)
|
||||
// {
|
||||
// var kv = item.SplitFirst('=');
|
||||
// if (kv.Length == 2)
|
||||
// {
|
||||
// this.AddOrUpdate(kv[0], kv[1]);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
public InternalFormCollection(ReadOnlyMemory<byte> context, Encoding encoding)
|
||||
{
|
||||
var row = context.Span.ToString(encoding);
|
||||
@@ -85,17 +109,23 @@ internal class InternalFormCollection : Dictionary<string, string>, IFormCollect
|
||||
}
|
||||
|
||||
var kvs = row.Split('&');
|
||||
if (kvs == null || kvs.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var item in kvs)
|
||||
{
|
||||
if (string.IsNullOrEmpty(item))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var kv = item.SplitFirst('=');
|
||||
var key = Uri.UnescapeDataString(kv[0].Replace("+", StringExtension.DefaultSpaceString));
|
||||
if (kv.Length == 2)
|
||||
{
|
||||
this.AddOrUpdate(kv[0], kv[1]);
|
||||
var value = Uri.UnescapeDataString(kv[1].Replace("+", StringExtension.DefaultSpaceString));
|
||||
this.AddOrUpdate(key, value);
|
||||
}
|
||||
else if (kv.Length == 1)
|
||||
{
|
||||
this.AddOrUpdate(key, string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,13 +294,16 @@ public static partial class HttpExtensions
|
||||
var contentType = request.ContentType;
|
||||
if (CheckFormBody(contentType, out var encoding))
|
||||
{
|
||||
return new InternalFormCollection(await request.GetContentAsync().ConfigureAwait(EasyTask.ContinueOnCapturedContext), encoding);
|
||||
return new InternalFormCollection(
|
||||
await request.GetContentAsync().ConfigureAwait(EasyTask.ContinueOnCapturedContext), encoding);
|
||||
}
|
||||
|
||||
return new InternalFormCollection();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var boundary = $"--{boundaryString}".ToUTF8Bytes();
|
||||
var boundary = $"--{boundaryString}".ToUtf8Bytes();
|
||||
|
||||
return new InternalFormCollection(await request.GetContentAsync().ConfigureAwait(EasyTask.ContinueOnCapturedContext), boundary);
|
||||
}
|
||||
@@ -324,31 +327,33 @@ public static partial class HttpExtensions
|
||||
}
|
||||
|
||||
// 查找 charset 参数的起始位置
|
||||
int charsetIndex = contentType.IndexOf("charset=", StringComparison.OrdinalIgnoreCase);
|
||||
if (charsetIndex >= 0)
|
||||
var charsetIndex = contentType.IndexOf("charset=", StringComparison.OrdinalIgnoreCase);
|
||||
if (charsetIndex < 0)
|
||||
{
|
||||
// 定位到 charset 参数值的起始位置
|
||||
charsetIndex += "charset=".Length;
|
||||
// 查找 charset 参数值的结束位置
|
||||
int endIndex = contentType.IndexOf(';', charsetIndex);
|
||||
if (endIndex < 0)
|
||||
{
|
||||
// 如果没有后续的分号,说明到字符串末尾都是 charset 值
|
||||
endIndex = contentType.Length;
|
||||
}
|
||||
// 提取 charset 参数的值
|
||||
var charsetValue = contentType.Substring(charsetIndex, endIndex - charsetIndex).Trim();
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
// 根据提取的 charset 值获取对应的编码
|
||||
encoding = Encoding.GetEncoding(charsetValue);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
// 如果提取的 charset 值无效,使用默认的 UTF-8 编码
|
||||
encoding = Encoding.UTF8;
|
||||
}
|
||||
// 定位到 charset 参数值的起始位置
|
||||
charsetIndex += "charset=".Length;
|
||||
// 查找 charset 参数值的结束位置
|
||||
var endIndex = contentType.IndexOf(';', charsetIndex);
|
||||
if (endIndex < 0)
|
||||
{
|
||||
// 如果没有后续的分号,说明到字符串末尾都是 charset 值
|
||||
endIndex = contentType.Length;
|
||||
}
|
||||
// 提取 charset 参数的值
|
||||
var charsetValue = contentType.Substring(charsetIndex, endIndex - charsetIndex).Trim();
|
||||
|
||||
try
|
||||
{
|
||||
// 根据提取的 charset 值获取对应的编码
|
||||
encoding = Encoding.GetEncoding(charsetValue);
|
||||
}
|
||||
catch (ArgumentException)
|
||||
{
|
||||
// 如果提取的 charset 值无效,使用默认的 UTF-8 编码
|
||||
encoding = Encoding.UTF8;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -397,8 +402,12 @@ public static partial class HttpExtensions
|
||||
public static void SetFormUrlEncodedContent<TRequest>(this TRequest request, IEnumerable<KeyValuePair<string, string>> nameValueCollection)
|
||||
where TRequest : HttpRequest
|
||||
{
|
||||
// 将键值对集合转换为查询字符串格式,并设置为请求的内容
|
||||
request.SetContent(string.Join("&", nameValueCollection.Select(a => $"{a.Key}={a.Value}")));
|
||||
var encodedPairs = nameValueCollection.Select(p =>
|
||||
$"{Uri.EscapeDataString(p.Key)}={Uri.EscapeDataString(p.Value ?? "")}"
|
||||
.Replace("%20", "+")); // 手动处理空格为+
|
||||
|
||||
request.SetContent(string.Join("&", encodedPairs));
|
||||
|
||||
// 设置请求的内容类型为application/x-www-form-urlencoded
|
||||
request.ContentType = "application/x-www-form-urlencoded";
|
||||
}
|
||||
@@ -688,8 +697,21 @@ public static partial class HttpExtensions
|
||||
/// <returns>设置后的HTTP响应对象</returns>
|
||||
public static TResponse UrlNotFind<TResponse>(this TResponse response) where TResponse : HttpResponse
|
||||
{
|
||||
response.SetContent("<html><body><h1>404 -Not Found</h1></body></html>");
|
||||
response.FromHtml("<html><body><h1>404 -Not Found</h1></body></html>");
|
||||
response.SetStatus(404, "Not Found");
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置HTML内容。
|
||||
/// </summary>
|
||||
/// <typeparam name="TResponse">响应类型,必须继承自HttpResponse。</typeparam>
|
||||
/// <param name="response">响应对象,用于设置HTML内容。</param>
|
||||
/// <param name="htmlString">HTML字符串,表示要设置的内容。</param>
|
||||
/// <returns>返回设置了HTML内容的响应对象。</returns>
|
||||
public static TResponse FromHtml<TResponse>(this TResponse response, string htmlString) where TResponse : HttpResponse
|
||||
{
|
||||
response.SetContent(htmlString, Encoding.UTF8);
|
||||
response.ContentType = "text/html;charset=utf-8";
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TouchSocket.Resources {
|
||||
@@ -63,7 +61,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 当AllowAsyncRead为false时,不支持该操作。 的本地化字符串。
|
||||
/// 查找类似 When AllowAsynchronous Read is false, this operation is not supported. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string NotAllowAsyncRead {
|
||||
get {
|
||||
@@ -72,7 +70,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 主动拒绝WebSocket连接,信息:{0} 的本地化字符串。
|
||||
/// 查找类似 Proactively reject WebSocket connection, information: {0} 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RefuseWebSocketConnection {
|
||||
get {
|
||||
@@ -81,7 +79,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 WebSocket连接协议不正确,这可能并不是一个WebSocket连接。 的本地化字符串。
|
||||
/// 查找类似 The WebSocket connection protocol is incorrect, this may not be a WebSocket connection. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string WebSocketConnectionProtocolIsIncorrect {
|
||||
get {
|
||||
@@ -89,4 +87,4 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,15 +98,12 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NotAllowAsyncRead" xml:space="preserve">
|
||||
<value>当AllowAsyncRead为false时,不支持该操作。</value>
|
||||
<comment>当AllowAsyncRead为false时,不支持该操作。</comment>
|
||||
<value>When AllowAsynchronous Read is false, this operation is not supported.</value>
|
||||
</data>
|
||||
<data name="RefuseWebSocketConnection" xml:space="preserve">
|
||||
<value>主动拒绝WebSocket连接,信息:{0}</value>
|
||||
<comment>主动拒绝WebSocket连接,信息:{0}</comment>
|
||||
<value>Proactively reject WebSocket connection, information: {0}</value>
|
||||
</data>
|
||||
<data name="WebSocketConnectionProtocolIsIncorrect" xml:space="preserve">
|
||||
<value>WebSocket连接协议不正确,这可能并不是一个WebSocket连接。</value>
|
||||
<comment>WebSocket连接协议不正确,这可能并不是一个WebSocket连接。</comment>
|
||||
<value>The WebSocket connection protocol is incorrect, this may not be a WebSocket connection.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -98,12 +98,15 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="NotAllowAsyncRead" xml:space="preserve">
|
||||
<value>When AllowAsynchronous Read is false, this operation is not supported.</value>
|
||||
<value>当AllowAsyncRead为false时,不支持该操作。</value>
|
||||
<comment>当AllowAsyncRead为false时,不支持该操作。</comment>
|
||||
</data>
|
||||
<data name="RefuseWebSocketConnection" xml:space="preserve">
|
||||
<value>Proactively reject WebSocket connection, information: {0}</value>
|
||||
<value>主动拒绝WebSocket连接,信息:{0}</value>
|
||||
<comment>主动拒绝WebSocket连接,信息:{0}</comment>
|
||||
</data>
|
||||
<data name="WebSocketConnectionProtocolIsIncorrect" xml:space="preserve">
|
||||
<value>The WebSocket connection protocol is incorrect, this may not be a WebSocket connection.</value>
|
||||
<value>WebSocket连接协议不正确,这可能并不是一个WebSocket连接。</value>
|
||||
<comment>WebSocket连接协议不正确,这可能并不是一个WebSocket连接。</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -41,10 +41,10 @@ internal class ModbusRtuAdapter : CustomDataHandlingAdapter<ModbusRtuResponse>
|
||||
}
|
||||
|
||||
ModbusErrorCode errorCode;
|
||||
|
||||
var bodyLength = 0;
|
||||
byte[] data;
|
||||
ushort startingAddress;
|
||||
|
||||
int bodyLength;
|
||||
if (isError)
|
||||
{
|
||||
errorCode = (ModbusErrorCode)byteBlock.ReadByte();
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ModbusRequest : IModbusRequest
|
||||
public ushort ReadQuantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设置<see cref="Data"/>的值为一个bool。
|
||||
/// 设置<see cref="Data"/>的值为一个 bool。
|
||||
/// </summary>
|
||||
/// <param name="value">要设置的布尔值。</param>
|
||||
public void SetValue(bool value)
|
||||
@@ -117,34 +117,34 @@ public class ModbusRequest : IModbusRequest
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置<see cref="Data"/>的值为short。
|
||||
/// 设置<see cref="Data"/>的值为 short。
|
||||
/// </summary>
|
||||
/// <param name="value">要设置的值</param>
|
||||
public void SetValue(short value)
|
||||
{
|
||||
// 将传入的short类型值转换为字节数组,并根据BigEndian规则进行存储
|
||||
// 将传入的 short类型值转换为字节数组,并根据BigEndian规则进行存储
|
||||
this.Data = TouchSocketBitConverter.BigEndian.GetBytes(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置<see cref="Data"/>的值为ushort。
|
||||
/// 设置<see cref="Data"/>的值为 ushort。
|
||||
/// </summary>
|
||||
/// <param name="value">要设置的值</param>
|
||||
public void SetValue(ushort value)
|
||||
{
|
||||
// 将传入的ushort值转换为字节数组,并根据BigEndian规则进行存储
|
||||
// 将传入的 ushort值转换为字节数组,并根据BigEndian规则进行存储
|
||||
this.Data = TouchSocketBitConverter.BigEndian.GetBytes(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置<see cref="Data"/>的值为bool数组,同时设置<see cref="Quantity"/>的数量(即数组长度)。
|
||||
/// 设置<see cref="Data"/>的值为 bool数组,同时设置<see cref="Quantity"/>的数量(即数组长度)。
|
||||
/// </summary>
|
||||
/// <param name="values">要设置的bool数组</param>
|
||||
/// <param name="values">要设置的 bool数组</param>
|
||||
public void SetValue(bool[] values)
|
||||
{
|
||||
// 将bool数组转换为字节,并赋值给Data属性
|
||||
this.Data = TouchSocketBitConverter.Default.GetBytes(values);
|
||||
// 设置Quantity属性为数组的长度,以记录bool值的数量
|
||||
// 将 bool数组转换为字节,并赋值给Data属性
|
||||
this.Data = TouchSocketBitConverter.BigEndian.GetBytes(values);
|
||||
// 设置Quantity属性为数组的长度,以记录 bool值的数量
|
||||
this.Quantity = (ushort)values.Length;
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ public class ModbusRtuMaster : SerialPortClientBase, IModbusRtuMaster
|
||||
{
|
||||
this.Protocol = TouchSocketModbusUtility.ModbusRtu;
|
||||
}
|
||||
|
||||
private ModbusRequest m_modbusRequest;
|
||||
/// <inheritdoc/>
|
||||
public async Task<IModbusResponse> SendModbusRequestAsync(ModbusRequest request, int millisecondsTimeout, CancellationToken token)
|
||||
{
|
||||
@@ -38,6 +38,7 @@ public class ModbusRtuMaster : SerialPortClientBase, IModbusRtuMaster
|
||||
|
||||
try
|
||||
{
|
||||
this.m_modbusRequest = request;
|
||||
var modbusRequest = new ModbusRtuRequest(request);
|
||||
var byteBlock = new ValueByteBlock(modbusRequest.MaxLength);
|
||||
try
|
||||
@@ -54,13 +55,15 @@ public class ModbusRtuMaster : SerialPortClientBase, IModbusRtuMaster
|
||||
var waitDataStatus = await this.m_waitDataAsync.WaitAsync(millisecondsTimeout).ConfigureAwait(EasyTask.ContinueOnCapturedContext);
|
||||
waitDataStatus.ThrowIfNotRunning();
|
||||
|
||||
var response = this.m_waitData.WaitResult;
|
||||
var response = this.m_waitDataAsync.WaitResult;
|
||||
TouchSocketModbusThrowHelper.ThrowIfNotSuccess(response.ErrorCode);
|
||||
|
||||
response.Request = request;
|
||||
return response;
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.m_modbusRequest = default;
|
||||
this.m_semaphoreSlimForRequest.Release();
|
||||
}
|
||||
}
|
||||
@@ -75,7 +78,6 @@ public class ModbusRtuMaster : SerialPortClientBase, IModbusRtuMaster
|
||||
#region 字段
|
||||
|
||||
private readonly SemaphoreSlim m_semaphoreSlimForRequest = new SemaphoreSlim(1, 1);
|
||||
private readonly WaitData<ModbusRtuResponse> m_waitData = new WaitData<ModbusRtuResponse>();
|
||||
private readonly WaitDataAsync<ModbusRtuResponse> m_waitDataAsync = new WaitDataAsync<ModbusRtuResponse>();
|
||||
|
||||
#endregion 字段
|
||||
@@ -85,14 +87,33 @@ public class ModbusRtuMaster : SerialPortClientBase, IModbusRtuMaster
|
||||
{
|
||||
if (e.RequestInfo is ModbusRtuResponse response)
|
||||
{
|
||||
this.SetRun(response);
|
||||
var result = this.SetRun(this.m_modbusRequest, response);
|
||||
if (result)
|
||||
{
|
||||
this.m_waitDataAsync.Set(response);
|
||||
}
|
||||
}
|
||||
await base.OnSerialReceived(e).ConfigureAwait(EasyTask.ContinueOnCapturedContext);
|
||||
}
|
||||
|
||||
private void SetRun(ModbusRtuResponse response)
|
||||
|
||||
/// <summary>
|
||||
/// 验证Modbus请求和响应是否匹配
|
||||
/// </summary>
|
||||
/// <param name="modbusRequest">Modbus请求</param>
|
||||
/// <param name="response">Modbus响应</param>
|
||||
/// <returns>如果请求和响应匹配则返回true,否则返回false</returns>
|
||||
protected virtual bool SetRun(IModbusRequest modbusRequest, IModbusResponse response)
|
||||
{
|
||||
this.m_waitData.Set(response);
|
||||
this.m_waitDataAsync.Set(response);
|
||||
if (modbusRequest.SlaveId != response.SlaveId)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (modbusRequest.FunctionCode != response.FunctionCode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using TouchSocket.Core;
|
||||
|
||||
namespace TouchSocket.Modbus;
|
||||
|
||||
/// <summary>
|
||||
@@ -17,6 +19,11 @@ namespace TouchSocket.Modbus;
|
||||
/// </summary>
|
||||
public interface IModbusResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 站点号
|
||||
/// </summary>
|
||||
public byte SlaveId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TouchSocket.Rpc;
|
||||
public interface IRpcCallContextAccessor
|
||||
{
|
||||
ICallContext CallContext { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
#if AsyncLocal
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace TouchSocket.Rpc;
|
||||
|
||||
[DebuggerDisplay("CallContext = {CallContext}")]
|
||||
internal class RpcCallContextAccessor:IRpcCallContextAccessor
|
||||
{
|
||||
private static readonly AsyncLocal<RpcCallContextHolder> s_rpcCallContextCurrent = new AsyncLocal<RpcCallContextHolder>();
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ICallContext CallContext
|
||||
{
|
||||
get
|
||||
{
|
||||
return s_rpcCallContextCurrent.Value?.Context;
|
||||
}
|
||||
set
|
||||
{
|
||||
var holder = s_rpcCallContextCurrent.Value;
|
||||
if (holder != null)
|
||||
{
|
||||
holder.Context = null;
|
||||
}
|
||||
|
||||
if (value != null)
|
||||
{
|
||||
s_rpcCallContextCurrent.Value = new RpcCallContextHolder { Context = value };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class RpcCallContextHolder
|
||||
{
|
||||
public ICallContext Context;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -58,11 +58,11 @@ public sealed class RpcStore
|
||||
/// 本地获取代理
|
||||
/// </summary>
|
||||
/// <param name="namespace"></param>
|
||||
/// <param name="attrbuteTypes"></param>
|
||||
/// <param name="attributeTypes"></param>
|
||||
/// <returns></returns>
|
||||
public string GetProxyCodes(string @namespace, params Type[] attrbuteTypes)
|
||||
public string GetProxyCodes(string @namespace, params Type[] attributeTypes)
|
||||
{
|
||||
var cellCodes = this.GetProxyInfo(attrbuteTypes);
|
||||
var cellCodes = this.GetProxyInfo(attributeTypes);
|
||||
return CodeGenerator.ConvertToCode(@namespace, cellCodes);
|
||||
}
|
||||
|
||||
@@ -81,17 +81,17 @@ public sealed class RpcStore
|
||||
/// <summary>
|
||||
/// 从本地获取代理
|
||||
/// </summary>
|
||||
/// <param name="attrbuteType"></param>
|
||||
/// <param name="attributeType"></param>
|
||||
/// <returns></returns>
|
||||
public ServerCellCode[] GetProxyInfo(Type[] attrbuteType)
|
||||
public ServerCellCode[] GetProxyInfo(Type[] attributeType)
|
||||
{
|
||||
var codes = new List<ServerCellCode>();
|
||||
|
||||
foreach (var attrbute in attrbuteType)
|
||||
foreach (var attribute in attributeType)
|
||||
{
|
||||
foreach (var item in this.m_serverTypes.Keys)
|
||||
{
|
||||
var serverCellCode = CodeGenerator.Generator(item, attrbute);
|
||||
var serverCellCode = CodeGenerator.Generator(item, attribute);
|
||||
codes.Add(serverCellCode);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public abstract class ScopedRpcServer<TCallContext> : RpcServer, IScopedRpcServe
|
||||
/// <summary>
|
||||
/// 调用上下文。
|
||||
/// </summary>
|
||||
protected TCallContext CallContext => (((IScopedRpcServer)this).CallContext is TCallContext Transient) ? Transient : default;
|
||||
protected TCallContext CallContext => (((IScopedRpcServer)this).CallContext is TCallContext transient) ? transient : default;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
using System;
|
||||
using TouchSocket.Core;
|
||||
using static System.Collections.Specialized.BitVector32;
|
||||
|
||||
#if NET6_0_OR_GREATER
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -22,7 +23,7 @@ namespace TouchSocket.Rpc;
|
||||
/// <summary>
|
||||
/// ContainerExtension
|
||||
/// </summary>
|
||||
public static class RpcContainerExtension
|
||||
public static partial class RpcContainerExtension
|
||||
{
|
||||
/// <summary>
|
||||
/// 向容器中添加<see cref="RpcStore"/>。
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
#if AsyncLocal
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TouchSocket.Core;
|
||||
|
||||
namespace TouchSocket.Rpc;
|
||||
public static partial class RpcContainerExtension
|
||||
{
|
||||
#region RpcCallContextAccessor
|
||||
public static IRegistrator AddRpcCallContextAccessor<TRpcCallContextAccessor>(this IRegistrator registrator)
|
||||
where TRpcCallContextAccessor : class, IRpcCallContextAccessor
|
||||
{
|
||||
registrator.RegisterSingleton<IRpcCallContextAccessor, TRpcCallContextAccessor>();
|
||||
return registrator;
|
||||
}
|
||||
|
||||
public static IRegistrator AddRpcCallContextAccessor(this IRegistrator registrator)
|
||||
{
|
||||
return AddRpcCallContextAccessor<RpcCallContextAccessor>(registrator);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -30,6 +30,11 @@ internal sealed class InternalRpcServerProvider : IRpcServerProvider
|
||||
|
||||
public async Task<InvokeResult> ExecuteAsync(ICallContext callContext, InvokeResult invokeResult)
|
||||
{
|
||||
var rpcCallContextAccessor=callContext.Resolver.Resolve<IRpcCallContextAccessor>();
|
||||
if (rpcCallContextAccessor is not null)
|
||||
{
|
||||
rpcCallContextAccessor.CallContext = callContext;
|
||||
}
|
||||
var ps = callContext.Parameters;
|
||||
var rpcMethod = callContext.RpcMethod;
|
||||
if (rpcMethod is null)
|
||||
@@ -103,6 +108,11 @@ internal sealed class InternalRpcServerProvider : IRpcServerProvider
|
||||
invokeResult = await filters[i].ExecutedAsync(callContext, ps, invokeResult, invokeResult.Exception)
|
||||
.ConfigureAwait(EasyTask.ContinueOnCapturedContext);
|
||||
}
|
||||
|
||||
if (rpcCallContextAccessor is not null)
|
||||
{
|
||||
rpcCallContextAccessor.CallContext = default;
|
||||
}
|
||||
}
|
||||
|
||||
return invokeResult;
|
||||
|
||||
@@ -265,7 +265,7 @@ public sealed class SwaggerPlugin : PluginBase, IServerStartedPlugin, IHttpPlugi
|
||||
openApiRoot.Components = this.GetComponents(schemaTypeList);
|
||||
|
||||
var jsonSetting = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore };
|
||||
return JsonConvert.SerializeObject(openApiRoot, Formatting.Indented, jsonSetting).ToUTF8Bytes();
|
||||
return JsonConvert.SerializeObject(openApiRoot, Formatting.Indented, jsonSetting).ToUtf8Bytes();
|
||||
}
|
||||
|
||||
private void BuildHttpMethod(string url, HttpMethod httpMethod, RpcMethod rpcMethod, in List<Type> schemaTypeList, in Dictionary<string, OpenApiPath> paths)
|
||||
|
||||
@@ -9,31 +9,11 @@
|
||||
<Title>TouchSocket.WebApi.Swagger</Title>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="api\favicon-16x16.png" />
|
||||
<None Remove="api\favicon-32x32.png" />
|
||||
<None Remove="api\index.html" />
|
||||
<None Remove="api\oauth2-redirect.html" />
|
||||
<None Remove="api\openapi.json" />
|
||||
<None Remove="api\swagger-ui-bundle.js" />
|
||||
<None Remove="api\swagger-ui-es-bundle-core.js" />
|
||||
<None Remove="api\swagger-ui-es-bundle.js" />
|
||||
<None Remove="api\swagger-ui-standalone-preset.js" />
|
||||
<None Remove="api\swagger-ui.css" />
|
||||
<None Remove="api\swagger-ui.js" />
|
||||
<None Remove="api\*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="api\favicon-16x16.png" />
|
||||
<EmbeddedResource Include="api\favicon-32x32.png" />
|
||||
<EmbeddedResource Include="api\index.html" />
|
||||
<EmbeddedResource Include="api\oauth2-redirect.html" />
|
||||
<EmbeddedResource Include="api\openapi.json" />
|
||||
<EmbeddedResource Include="api\swagger-ui-bundle.js" />
|
||||
<EmbeddedResource Include="api\swagger-ui-es-bundle-core.js" />
|
||||
<EmbeddedResource Include="api\swagger-ui-es-bundle.js" />
|
||||
<EmbeddedResource Include="api\swagger-ui-standalone-preset.js" />
|
||||
<EmbeddedResource Include="api\swagger-ui.css" />
|
||||
<EmbeddedResource Include="api\swagger-ui.js" />
|
||||
<EmbeddedResource Include="api\*.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
16
src/TouchSocket.WebApi.Swagger/api/index.css
Normal file
16
src/TouchSocket.WebApi.Swagger/api/index.css
Normal file
@@ -0,0 +1,16 @@
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fafafa;
|
||||
}
|
||||
@@ -1,61 +1,19 @@
|
||||
<!-- HTML for static distribution bundle build -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Swagger UI</title>
|
||||
<link rel="stylesheet" type="text/css" href="./swagger-ui.css">
|
||||
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
|
||||
<link rel="stylesheet" type="text/css" href="index.css" />
|
||||
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
|
||||
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
|
||||
<style>
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
overflow: -moz-scrollbars-vertical;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</head>
|
||||
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
background: #fafafa;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body>
|
||||
<div id="swagger-ui"></div>
|
||||
|
||||
<script src="./swagger-ui-bundle.js" charset="UTF-8"></script>
|
||||
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"></script>
|
||||
<script>
|
||||
window.onload = function ()
|
||||
{
|
||||
// Begin Swagger UI call region
|
||||
const ui = SwaggerUIBundle({
|
||||
url: "openapi.json",
|
||||
"urls": [{ "url": "openapi.json", "name": "WebApiSwagger" }],
|
||||
defaultModelsExpandDepth: 0,
|
||||
displayRequestDuration: true,
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
})
|
||||
// End Swagger UI call region
|
||||
|
||||
window.ui = ui
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
|
||||
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
|
||||
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
<title>Swagger UI: OAuth2 Redirect</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
'use strict';
|
||||
function run () {
|
||||
@@ -15,20 +13,20 @@
|
||||
var isValid, qp, arr;
|
||||
|
||||
if (/code|token|error/.test(window.location.hash)) {
|
||||
qp = window.location.hash.substring(1);
|
||||
qp = window.location.hash.substring(1).replace('?', '&');
|
||||
} else {
|
||||
qp = location.search.substring(1);
|
||||
}
|
||||
|
||||
arr = qp.split("&")
|
||||
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
|
||||
arr = qp.split("&");
|
||||
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
|
||||
qp = qp ? JSON.parse('{' + arr.join() + '}',
|
||||
function (key, value) {
|
||||
return key === "" ? value : decodeURIComponent(value)
|
||||
return key === "" ? value : decodeURIComponent(value);
|
||||
}
|
||||
) : {}
|
||||
) : {};
|
||||
|
||||
isValid = qp.state === sentState
|
||||
isValid = qp.state === sentState;
|
||||
|
||||
if ((
|
||||
oauth2.auth.schema.get("flow") === "accessCode" ||
|
||||
@@ -40,7 +38,7 @@
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "warning",
|
||||
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
|
||||
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
|
||||
});
|
||||
}
|
||||
|
||||
@@ -49,7 +47,7 @@
|
||||
oauth2.auth.code = qp.code;
|
||||
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
|
||||
} else {
|
||||
let oauthErrorMsg
|
||||
let oauthErrorMsg;
|
||||
if (qp.error) {
|
||||
oauthErrorMsg = "["+qp.error+"]: " +
|
||||
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
|
||||
@@ -60,7 +58,7 @@
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "error",
|
||||
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
|
||||
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
|
||||
});
|
||||
}
|
||||
} else {
|
||||
@@ -69,7 +67,13 @@
|
||||
window.close();
|
||||
}
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
run();
|
||||
});
|
||||
</script>
|
||||
if (document.readyState !== 'loading') {
|
||||
run();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
run();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
20
src/TouchSocket.WebApi.Swagger/api/swagger-initializer.js
Normal file
20
src/TouchSocket.WebApi.Swagger/api/swagger-initializer.js
Normal file
@@ -0,0 +1,20 @@
|
||||
window.onload = function() {
|
||||
//<editor-fold desc="Changeable Configuration Block">
|
||||
|
||||
// the following lines will be replaced by docker/configurator, when it runs in a docker-container
|
||||
window.ui = SwaggerUIBundle({
|
||||
url: "openapi.json",
|
||||
dom_id: '#swagger-ui',
|
||||
deepLinking: true,
|
||||
presets: [
|
||||
SwaggerUIBundle.presets.apis,
|
||||
SwaggerUIStandalonePreset
|
||||
],
|
||||
plugins: [
|
||||
SwaggerUIBundle.plugins.DownloadUrl
|
||||
],
|
||||
layout: "StandaloneLayout"
|
||||
});
|
||||
|
||||
//</editor-fold>
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
src/TouchSocket.WebApi.Swagger/api/swagger-ui.css.map
Normal file
1
src/TouchSocket.WebApi.Swagger/api/swagger-ui.css.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
src/TouchSocket.WebApi.Swagger/api/swagger-ui.js.map
Normal file
1
src/TouchSocket.WebApi.Swagger/api/swagger-ui.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -119,7 +119,7 @@ public sealed class WebApiParserPlugin : PluginBase, IHttpPlugin
|
||||
|
||||
private static object PrimitiveParse(string source, Type targetType)
|
||||
{
|
||||
if (targetType.IsPrimitive || targetType == TouchSocketCoreUtility.stringType)
|
||||
if (targetType.IsPrimitive || targetType == TouchSocketCoreUtility.StringType)
|
||||
{
|
||||
StringExtension.TryParseToType(source, targetType, out var target);
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public class IPHost : Uri
|
||||
private static int GetPortFromUrl(string url)
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
//解决mono下的问题
|
||||
//解决 Mono 下的问题
|
||||
//https://gitee.com/RRQM_Home/TouchSocket/issues/IBAG51
|
||||
var span = new ReadOnlySpan<char>(url.ToArray());
|
||||
#else
|
||||
@@ -203,6 +203,6 @@ public class IPHost : Uri
|
||||
|
||||
private static string VerifyUri(string uriString)
|
||||
{
|
||||
return TouchSocketCoreUtility.IsURL(uriString) ? uriString : $"tcp://{uriString}";
|
||||
return TouchSocketCoreUtility.IsUrl(uriString) ? uriString : $"tcp://{uriString}";
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,11 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// 此代码版权(除特别声明或在XREF结尾的命名空间的代码)归作者本人若汝棋茗所有
|
||||
// 源代码使用协议遵循本仓库的开源协议及附加协议,若本仓库没有设置,则按MIT开源协议授权
|
||||
// CSDN博客:https://blog.csdn.net/qq_40374647
|
||||
// 哔哩哔哩视频:https://space.bilibili.com/94253567
|
||||
// Gitee源代码仓库:https://gitee.com/RRQM_Home
|
||||
// Github源代码仓库:https://github.com/RRQM
|
||||
// API首页:https://touchsocket.net/
|
||||
// 交流QQ群:234762506
|
||||
// 感谢您的下载和使用
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace TouchSocket.Resources {
|
||||
@@ -63,7 +61,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 当前适配器为空或者不支持对象(IRequestInfo)发送。 的本地化字符串。
|
||||
/// 查找类似 The current adapter is empty or does not support sending objects (IRequestInfo). 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string CannotSendRequestInfo {
|
||||
get {
|
||||
@@ -72,7 +70,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 客户端没有连接。 的本地化字符串。
|
||||
/// 查找类似 The client is not connected. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ClientNotConnected {
|
||||
get {
|
||||
@@ -81,7 +79,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 没有找到Id为‘{0}’的客户端。 的本地化字符串。
|
||||
/// 查找类似 No client with Id '{0}' was found. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ClientNotFind {
|
||||
get {
|
||||
@@ -90,7 +88,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 已连接的客户端数量已达到设定({0})最大值。 的本地化字符串。
|
||||
/// 查找类似 The number of connected clients has reached the maximum set value ({0}). 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string ConnectedMaximum {
|
||||
get {
|
||||
@@ -99,7 +97,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 调用Dispose主动断开。 的本地化字符串。
|
||||
/// 查找类似 Call Dispose to actively disconnect. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string DisposeClose {
|
||||
get {
|
||||
@@ -108,7 +106,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Id为‘{0}’的客户端已存在。 的本地化字符串。
|
||||
/// 查找类似 The client with ID '{0}' already exists. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string IdAlreadyExists {
|
||||
get {
|
||||
@@ -117,7 +115,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 发送数据不完全。 的本地化字符串。
|
||||
/// 查找类似 Incomplete data transmission. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string IncompleteDataTransmission {
|
||||
get {
|
||||
@@ -126,7 +124,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 远程终端主动断开。 的本地化字符串。
|
||||
/// 查找类似 The remote terminal actively disconnects. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RemoteDisconnects {
|
||||
get {
|
||||
@@ -135,7 +133,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 新的Socket必须在连接状态。 的本地化字符串。
|
||||
/// 查找类似 The new socket must be in a connected state. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SocketHaveToConnected {
|
||||
get {
|
||||
@@ -144,7 +142,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 超时无数据交互,主动断开连接。 的本地化字符串。
|
||||
/// 查找类似 No data interaction due to timeout, actively disconnect. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TimedoutWithoutAll {
|
||||
get {
|
||||
@@ -153,7 +151,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 超时无数据Receive交互,主动断开连接。 的本地化字符串。
|
||||
/// 查找类似 No data received interaction due to timeout, actively disconnected. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TimedoutWithoutReceiving {
|
||||
get {
|
||||
@@ -162,7 +160,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 超时无数据Send交互,主动断开连接。 的本地化字符串。
|
||||
/// 查找类似 Send interaction with no data due to timeout, actively disconnect. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TimedoutWithoutSending {
|
||||
get {
|
||||
@@ -171,7 +169,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Udp不在运行状态。 的本地化字符串。
|
||||
/// 查找类似 Udp is not running. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UdpStopped {
|
||||
get {
|
||||
@@ -180,7 +178,7 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 无法获取终结点。 的本地化字符串。
|
||||
/// 查找类似 Unable to obtain endpoint. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UnableToObtainEndpoint {
|
||||
get {
|
||||
@@ -188,4 +186,4 @@ namespace TouchSocket.Resources {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClientNotFind" xml:space="preserve">
|
||||
<value>No client with Id '{0}' was found.</value>
|
||||
</data>
|
||||
<data name="ClientNotConnected" xml:space="preserve">
|
||||
<value>The client is not connected.</value>
|
||||
</data>
|
||||
<data name="UnableToObtainEndpoint" xml:space="preserve">
|
||||
<value>Unable to obtain endpoint.</value>
|
||||
</data>
|
||||
<data name="SocketHaveToConnected" xml:space="preserve">
|
||||
<value>The new socket must be in a connected state.</value>
|
||||
</data>
|
||||
<data name="IncompleteDataTransmission" xml:space="preserve">
|
||||
<value>Incomplete data transmission.</value>
|
||||
</data>
|
||||
<data name="DisposeClose" xml:space="preserve">
|
||||
<value>Call Dispose to actively disconnect.</value>
|
||||
</data>
|
||||
<data name="RemoteDisconnects" xml:space="preserve">
|
||||
<value>The remote terminal actively disconnects.</value>
|
||||
</data>
|
||||
<data name="CannotSendRequestInfo" xml:space="preserve">
|
||||
<value>The current adapter is empty or does not support sending objects (IRequestInfo).</value>
|
||||
</data>
|
||||
<data name="ConnectedMaximum" xml:space="preserve">
|
||||
<value>The number of connected clients has reached the maximum set value ({0}).</value>
|
||||
</data>
|
||||
<data name="IdAlreadyExists" xml:space="preserve">
|
||||
<value>The client with ID '{0}' already exists.</value>
|
||||
</data>
|
||||
<data name="UdpStopped" xml:space="preserve">
|
||||
<value>Udp is not running.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutReceiving" xml:space="preserve">
|
||||
<value>No data received interaction due to timeout, actively disconnected.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutSending" xml:space="preserve">
|
||||
<value>Send interaction with no data due to timeout, actively disconnect.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutAll" xml:space="preserve">
|
||||
<value>No data interaction due to timeout, actively disconnect.</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,96 +1,76 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
Microsoft ResX Schema
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -109,68 +89,54 @@
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClientNotFind" xml:space="preserve">
|
||||
<value>没有找到Id为‘{0}’的客户端。</value>
|
||||
<comment>没有找到Id为‘{0}’的客户端。</comment>
|
||||
<value>No client with Id '{0}' was found.</value>
|
||||
</data>
|
||||
<data name="ClientNotConnected" xml:space="preserve">
|
||||
<value>客户端没有连接。</value>
|
||||
<comment>客户端没有连接。</comment>
|
||||
<value>The client is not connected.</value>
|
||||
</data>
|
||||
<data name="UnableToObtainEndpoint" xml:space="preserve">
|
||||
<value>无法获取终结点。</value>
|
||||
<comment>无法获取终结点。</comment>
|
||||
<value>Unable to obtain endpoint.</value>
|
||||
</data>
|
||||
<data name="SocketHaveToConnected" xml:space="preserve">
|
||||
<value>新的Socket必须在连接状态。</value>
|
||||
<comment>新的Socket必须在连接状态。</comment>
|
||||
<value>The new socket must be in a connected state.</value>
|
||||
</data>
|
||||
<data name="IncompleteDataTransmission" xml:space="preserve">
|
||||
<value>发送数据不完全。</value>
|
||||
<comment>发送数据不完全。</comment>
|
||||
<value>Incomplete data transmission.</value>
|
||||
</data>
|
||||
<data name="DisposeClose" xml:space="preserve">
|
||||
<value>调用Dispose主动断开。</value>
|
||||
<comment>调用Dispose主动断开。</comment>
|
||||
<value>Call Dispose to actively disconnect.</value>
|
||||
</data>
|
||||
<data name="RemoteDisconnects" xml:space="preserve">
|
||||
<value>远程终端主动断开。</value>
|
||||
<comment>远程终端主动断开。</comment>
|
||||
<value>The remote terminal actively disconnects.</value>
|
||||
</data>
|
||||
<data name="CannotSendRequestInfo" xml:space="preserve">
|
||||
<value>当前适配器为空或者不支持对象(IRequestInfo)发送。</value>
|
||||
<comment>当前适配器为空或者不支持对象(IRequestInfo)发送。</comment>
|
||||
<value>The current adapter is empty or does not support sending objects (IRequestInfo).</value>
|
||||
</data>
|
||||
<data name="ConnectedMaximum" xml:space="preserve">
|
||||
<value>已连接的客户端数量已达到设定({0})最大值。</value>
|
||||
<comment>已连接的客户端数量已达到设定({0})最大值。</comment>
|
||||
<value>The number of connected clients has reached the maximum set value ({0}).</value>
|
||||
</data>
|
||||
<data name="IdAlreadyExists" xml:space="preserve">
|
||||
<value>Id为‘{0}’的客户端已存在。</value>
|
||||
<comment>Id为‘{0}’的客户端已存在。</comment>
|
||||
<value>The client with ID '{0}' already exists.</value>
|
||||
</data>
|
||||
<data name="UdpStopped" xml:space="preserve">
|
||||
<value>Udp不在运行状态。</value>
|
||||
<comment>Udp不在运行状态。</comment>
|
||||
<value>Udp is not running.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutReceiving" xml:space="preserve">
|
||||
<value>超时无数据Receive交互,主动断开连接。</value>
|
||||
<comment>超时无数据Receive交互,主动断开连接。</comment>
|
||||
<value>No data received interaction due to timeout, actively disconnected.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutSending" xml:space="preserve">
|
||||
<value>超时无数据Send交互,主动断开连接。</value>
|
||||
<comment>超时无数据Send交互,主动断开连接。</comment>
|
||||
<value>Send interaction with no data due to timeout, actively disconnect.</value>
|
||||
</data>
|
||||
<data name="TimedoutWithoutAll" xml:space="preserve">
|
||||
<value>超时无数据交互,主动断开连接。</value>
|
||||
<comment>超时无数据交互,主动断开连接。</comment>
|
||||
<value>No data interaction due to timeout, actively disconnect.</value>
|
||||
</data>
|
||||
</root>
|
||||
176
src/TouchSocket/Resources/TouchSocketResource.zh-CN.resx
Normal file
176
src/TouchSocket/Resources/TouchSocketResource.zh-CN.resx
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the byteBlock can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ClientNotFind" xml:space="preserve">
|
||||
<value>没有找到Id为‘{0}’的客户端。</value>
|
||||
<comment>没有找到Id为‘{0}’的客户端。</comment>
|
||||
</data>
|
||||
<data name="ClientNotConnected" xml:space="preserve">
|
||||
<value>客户端没有连接。</value>
|
||||
<comment>客户端没有连接。</comment>
|
||||
</data>
|
||||
<data name="UnableToObtainEndpoint" xml:space="preserve">
|
||||
<value>无法获取终结点。</value>
|
||||
<comment>无法获取终结点。</comment>
|
||||
</data>
|
||||
<data name="SocketHaveToConnected" xml:space="preserve">
|
||||
<value>新的Socket必须在连接状态。</value>
|
||||
<comment>新的Socket必须在连接状态。</comment>
|
||||
</data>
|
||||
<data name="IncompleteDataTransmission" xml:space="preserve">
|
||||
<value>发送数据不完全。</value>
|
||||
<comment>发送数据不完全。</comment>
|
||||
</data>
|
||||
<data name="DisposeClose" xml:space="preserve">
|
||||
<value>调用Dispose主动断开。</value>
|
||||
<comment>调用Dispose主动断开。</comment>
|
||||
</data>
|
||||
<data name="RemoteDisconnects" xml:space="preserve">
|
||||
<value>远程终端主动断开。</value>
|
||||
<comment>远程终端主动断开。</comment>
|
||||
</data>
|
||||
<data name="CannotSendRequestInfo" xml:space="preserve">
|
||||
<value>当前适配器为空或者不支持对象(IRequestInfo)发送。</value>
|
||||
<comment>当前适配器为空或者不支持对象(IRequestInfo)发送。</comment>
|
||||
</data>
|
||||
<data name="ConnectedMaximum" xml:space="preserve">
|
||||
<value>已连接的客户端数量已达到设定({0})最大值。</value>
|
||||
<comment>已连接的客户端数量已达到设定({0})最大值。</comment>
|
||||
</data>
|
||||
<data name="IdAlreadyExists" xml:space="preserve">
|
||||
<value>Id为‘{0}’的客户端已存在。</value>
|
||||
<comment>Id为‘{0}’的客户端已存在。</comment>
|
||||
</data>
|
||||
<data name="UdpStopped" xml:space="preserve">
|
||||
<value>Udp不在运行状态。</value>
|
||||
<comment>Udp不在运行状态。</comment>
|
||||
</data>
|
||||
<data name="TimedoutWithoutReceiving" xml:space="preserve">
|
||||
<value>超时无数据Receive交互,主动断开连接。</value>
|
||||
<comment>超时无数据Receive交互,主动断开连接。</comment>
|
||||
</data>
|
||||
<data name="TimedoutWithoutSending" xml:space="preserve">
|
||||
<value>超时无数据Send交互,主动断开连接。</value>
|
||||
<comment>超时无数据Send交互,主动断开连接。</comment>
|
||||
</data>
|
||||
<data name="TimedoutWithoutAll" xml:space="preserve">
|
||||
<value>超时无数据交互,主动断开连接。</value>
|
||||
<comment>超时无数据交互,主动断开连接。</comment>
|
||||
</data>
|
||||
</root>
|
||||
@@ -23,9 +23,9 @@ TouchSocket is Net (including C #, VB An integrated socket network communication
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\TouchSocketResource.Designer.cs">
|
||||
<DependentUpon>TouchSocketResource.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>TouchSocketResource.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user