初始化
This commit is contained in:
Binary file not shown.
BIN
.vs/Telephone/v16/.suo
Normal file
BIN
.vs/Telephone/v16/.suo
Normal file
Binary file not shown.
BIN
.vs/Telephone/v17/.suo
Normal file
BIN
.vs/Telephone/v17/.suo
Normal file
Binary file not shown.
36
.vs/Telephone/v17/DocumentLayout.backup.json
Normal file
36
.vs/Telephone/v17/DocumentLayout.backup.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"Version": 1,
|
||||||
|
"WorkspaceRootPath": "E:\\Sync\\Telephone\\Telephone\\",
|
||||||
|
"Documents": [
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|e:\\sync\\telephone\\telephone\\telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}|Form",
|
||||||
|
"RelativeMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|solutionrelative:telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}|Form"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"DocumentGroupContainers": [
|
||||||
|
{
|
||||||
|
"Orientation": 0,
|
||||||
|
"VerticalTabListWidth": 256,
|
||||||
|
"DocumentGroups": [
|
||||||
|
{
|
||||||
|
"DockedWidth": 200,
|
||||||
|
"SelectedChildIndex": 0,
|
||||||
|
"Children": [
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 0,
|
||||||
|
"Title": "Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"DocumentMoniker": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb",
|
||||||
|
"RelativeDocumentMoniker": "Telephone.vb",
|
||||||
|
"ToolTip": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"RelativeToolTip": "Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003361|",
|
||||||
|
"WhenOpened": "2025-09-22T01:58:05.175Z",
|
||||||
|
"EditorCaption": " [\u8BBE\u8BA1]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
53
.vs/Telephone/v17/DocumentLayout.json
Normal file
53
.vs/Telephone/v17/DocumentLayout.json
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"Version": 1,
|
||||||
|
"WorkspaceRootPath": "E:\\Sync\\Telephone\\Telephone\\",
|
||||||
|
"Documents": [
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|e:\\sync\\telephone\\telephone\\telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}",
|
||||||
|
"RelativeMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|solutionrelative:telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"AbsoluteMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|e:\\sync\\telephone\\telephone\\telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}|Form",
|
||||||
|
"RelativeMoniker": "D:0:0:{30E18FAE-69CD-4243-BEB0-BBE9994E6138}|Telephone.vbproj|solutionrelative:telephone.vb||{2C015C70-C72C-11D0-88C3-00A0C9110049}|Form"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"DocumentGroupContainers": [
|
||||||
|
{
|
||||||
|
"Orientation": 0,
|
||||||
|
"VerticalTabListWidth": 256,
|
||||||
|
"DocumentGroups": [
|
||||||
|
{
|
||||||
|
"DockedWidth": 200,
|
||||||
|
"SelectedChildIndex": 0,
|
||||||
|
"Children": [
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 0,
|
||||||
|
"Title": "Telephone.vb",
|
||||||
|
"DocumentMoniker": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb",
|
||||||
|
"RelativeDocumentMoniker": "Telephone.vb",
|
||||||
|
"ToolTip": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb",
|
||||||
|
"RelativeToolTip": "Telephone.vb",
|
||||||
|
"ViewState": "AgIAAAACAAAAAAAAAAAuwBUCAABRAAAAAAAAAA==",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003361|",
|
||||||
|
"WhenOpened": "2025-09-22T02:12:53.264Z",
|
||||||
|
"EditorCaption": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$type": "Document",
|
||||||
|
"DocumentIndex": 1,
|
||||||
|
"Title": "Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"DocumentMoniker": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb",
|
||||||
|
"RelativeDocumentMoniker": "Telephone.vb",
|
||||||
|
"ToolTip": "E:\\Sync\\Telephone\\Telephone\\Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"RelativeToolTip": "Telephone.vb [\u8BBE\u8BA1]",
|
||||||
|
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003361|",
|
||||||
|
"WhenOpened": "2025-09-22T01:58:05.175Z",
|
||||||
|
"EditorCaption": " [\u8BBE\u8BA1]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
52
App.config
Normal file
52
App.config
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="Telephone.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.2" newVersion="5.0.0.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<userSettings>
|
||||||
|
<Telephone.My.MySettings>
|
||||||
|
<setting name="SerialPortName" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="BaudRate" serializeAs="String">
|
||||||
|
<value>9600</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="GTable" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="TWide" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="THigh" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="G_Subscribe" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="G_Publish" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</Telephone.My.MySettings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
176
ApplicationLog.vb
Normal file
176
ApplicationLog.vb
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace AdminLog
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 应用程序日志
|
||||||
|
''' </summary>
|
||||||
|
Public NotInheritable Class ApplicationLog
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志类型
|
||||||
|
''' </summary>
|
||||||
|
Public Enum LogType
|
||||||
|
''' <summary> 堆栈跟踪信息 </summary>
|
||||||
|
Trace
|
||||||
|
''' <summary> 警告信息 </summary>
|
||||||
|
Warning
|
||||||
|
''' <summary> 错误信息应该包含对象名、发生错误点所在的方法名称、具体错误信息 </summary>
|
||||||
|
[Error]
|
||||||
|
''' <summary> 与数据库相关的信息 </summary>
|
||||||
|
Database
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志文件所在父文件夹路径
|
||||||
|
''' </summary>
|
||||||
|
Private Shared _logPath As String = My.Application.Info.DirectoryPath
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志文件名前缀
|
||||||
|
''' </summary>
|
||||||
|
Private Shared _logFilePrefix As String = "Log"
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志文件所在路径
|
||||||
|
''' </summary>
|
||||||
|
Private Shared _logFilePath As String = $"{LogDirPath}{Path.DirectorySeparatorChar}{LogFilePrefix}_{Date.Now:yyyyMMdd}.Log"
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 保存日志的文件夹完整路径
|
||||||
|
''' </summary>
|
||||||
|
Public Shared Property LogDirPath As String
|
||||||
|
Get
|
||||||
|
If Equals(_logPath, String.Empty) Then
|
||||||
|
_logPath = My.Application.Info.DirectoryPath
|
||||||
|
End If
|
||||||
|
Return _logPath
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
_logPath = value
|
||||||
|
|
||||||
|
_logFilePath = $"{LogDirPath}{Path.DirectorySeparatorChar}{LogFilePrefix}_{Date.Now:yyyyMMdd}.Log"
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志文件前缀
|
||||||
|
''' </summary>
|
||||||
|
Public Shared Property LogFilePrefix As String
|
||||||
|
Get
|
||||||
|
Return _logFilePrefix
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
_logFilePrefix = value
|
||||||
|
_logFilePath = $"{LogDirPath}{Path.DirectorySeparatorChar}{LogFilePrefix}_{Date.Now:yyyyMMdd}.Log"
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志文件路径
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Shared ReadOnly Property LogFilePath() As String
|
||||||
|
Get
|
||||||
|
Return _logFilePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入错误信息记录日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="ex"></param>
|
||||||
|
Public Shared Sub WriteErrorLog(ex As Exception)
|
||||||
|
Dim msg As New StringBuilder
|
||||||
|
msg.Append($"ErrorMessage:{ex.Message}{vbNewLine}")
|
||||||
|
msg.Append($"ErrorTime:{Now}{vbNewLine}")
|
||||||
|
msg.Append($"ErrorSource:{ex.Source}{vbNewLine}")
|
||||||
|
msg.Append($"ErrorType:{ex.GetType}{vbNewLine}")
|
||||||
|
msg.Append($"ErrorTargetSite:{ex.TargetSite}{vbNewLine}")
|
||||||
|
msg.Append($"ErrorStackTrace:{ex.StackTrace}{vbNewLine}")
|
||||||
|
WriteLog(LogType.Error, msg.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入错误信息记录日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="msg"></param>
|
||||||
|
Public Shared Sub WriteErrorLog(msg As String)
|
||||||
|
WriteLog(LogType.Error, msg.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入流程信息记录日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="msg"></param>
|
||||||
|
Public Shared Sub WriteTraceLog(msg As String)
|
||||||
|
WriteLog(LogType.Trace, msg.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入警告信息记录日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="msg"></param>
|
||||||
|
Public Shared Sub WriteWarningLog(msg As String)
|
||||||
|
WriteLog(LogType.Warning, msg.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入数据库信息记录日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="msg"></param>
|
||||||
|
Public Shared Sub WriteDatabaseLog(msg As String)
|
||||||
|
WriteLog(LogType.Database, msg.ToString())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 日志锁,防止多线程同时写日志导致冲突
|
||||||
|
''' </summary>
|
||||||
|
Private Shared ReadOnly LogLock As New Object()
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 将信息入到日志
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="logType">日志类型</param>
|
||||||
|
''' <param name="msg">日志内容</param>
|
||||||
|
Public Shared Sub WriteLog(logType As String, msg As String)
|
||||||
|
'写入记录入日志文件
|
||||||
|
SyncLock LogLock
|
||||||
|
Try
|
||||||
|
Dim logString As New StringBuilder
|
||||||
|
logString.Append($"[{Date.Now.ToString("yyyy-MM-dd HH:mm:ss:fff ")}]")
|
||||||
|
logString.Append($"[{logType.PadRight(8)}]")
|
||||||
|
logString.Append(msg)
|
||||||
|
|
||||||
|
Using sw As StreamWriter = File.AppendText($"{LogDirPath}{Path.DirectorySeparatorChar}{LogFilePrefix}_{Date.Now:yyyyMMdd}.Log")
|
||||||
|
sw.WriteLine(logString.ToString())
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
Console.WriteLine($"Uts WriteLog Error:{ex.Message}")
|
||||||
|
End Try
|
||||||
|
End SyncLock
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 写入日志到本地
|
||||||
|
''' </summary>
|
||||||
|
Public Shared Sub WriteLog(type As LogType, ByVal msg As String)
|
||||||
|
WriteLog(type.ToString(), msg)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
33
CallInfoNode.vb
Normal file
33
CallInfoNode.vb
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Public Class CallInfoNode
|
||||||
|
''' <summary>
|
||||||
|
''' 电话号码
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property PhoneNumber As String
|
||||||
|
''' <summary>
|
||||||
|
''' 呼叫者
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property CallerName As String
|
||||||
|
''' <summary>
|
||||||
|
''' 内容
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Content As String
|
||||||
|
''' <summary>
|
||||||
|
''' 起始时间
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property StartingPoint As Long
|
||||||
|
''' <summary>
|
||||||
|
''' 结束时间 UTC
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DeadLine As Long
|
||||||
|
''' <summary>
|
||||||
|
''' 呼叫类型 2短信 1电话
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Type As String
|
||||||
|
|
||||||
|
End Class
|
||||||
15
Database/Base/ColumnSchema.vb
Normal file
15
Database/Base/ColumnSchema.vb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
''' <summary>
|
||||||
|
''' Contains the schema of a single DB column.
|
||||||
|
''' </summary>
|
||||||
|
Public Class ColumnSchema
|
||||||
|
Public ColumnName As String
|
||||||
|
Public ColumnType As String
|
||||||
|
Public Length As Integer
|
||||||
|
Public IsNullable As Boolean
|
||||||
|
Public DefaultValue As String
|
||||||
|
Public IsIdentity As Boolean
|
||||||
|
Public IsCaseSensitivity As Boolean? = Nothing
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
297
Database/Base/CommandHelpers.vb
Normal file
297
Database/Base/CommandHelpers.vb
Normal file
@@ -0,0 +1,297 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
|
||||||
|
Public MustInherit Class CommandHelpers
|
||||||
|
Public Overridable Function Search(param As SearchParams) As String
|
||||||
|
Dim searchString As New StringBuilder
|
||||||
|
|
||||||
|
'基础查询
|
||||||
|
searchString.Append("Select")
|
||||||
|
searchString.Append(" ")
|
||||||
|
searchString.Append($"{String.Join(",", param.SearchColNames)}")
|
||||||
|
searchString.Append(" ")
|
||||||
|
searchString.Append("From")
|
||||||
|
searchString.Append(" ")
|
||||||
|
searchString.Append($"`{param.TableName}`")
|
||||||
|
|
||||||
|
'筛选条件
|
||||||
|
If param.SearchCondition IsNot Nothing Then
|
||||||
|
If param.SearchCondition.Count > 0 Then
|
||||||
|
searchString.Append(" ")
|
||||||
|
searchString.Append("Where")
|
||||||
|
For i As Integer = 0 To param.SearchCondition.Count - 1
|
||||||
|
If i > 0 Then
|
||||||
|
searchString.Append(" ")
|
||||||
|
searchString.Append(param.SearchCondition(i).LogicPrevious.ToString())
|
||||||
|
End If
|
||||||
|
searchString.Append(param.SearchCondition(i).ToString())
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'排序与排序方式
|
||||||
|
If param.OrderType <> SearchParams.OrderTypeEnum.None Then
|
||||||
|
searchString.Append($" Order By {param.OrderColName} {param.OrderType}")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'返回结果行数
|
||||||
|
If param.Limit > -1 Then
|
||||||
|
searchString.Append($" Limit {param.Limit}")
|
||||||
|
End If
|
||||||
|
|
||||||
|
searchString.Append(";")
|
||||||
|
Return searchString.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function SearchAll(tableName As String) As String
|
||||||
|
Return $"Select * FROM `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchAll(tableName As String, condition As String) As String
|
||||||
|
Return $"Select * FROM `{tableName}` WHERE {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Search(columnName As List(Of String), tableName As String) As String
|
||||||
|
Dim colNameString As New StringBuilder
|
||||||
|
For i As Integer = 0 To columnName.Count - 1
|
||||||
|
If i = 0 Then
|
||||||
|
colNameString.Append($"`{columnName(i)}`")
|
||||||
|
Else
|
||||||
|
colNameString.Append($",`{columnName(i)}`")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return $"Select {colNameString} FROM `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Search(columnName As String, tableName As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Search(columnName As String, tableName As String, condition As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` WHERE {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Search(columnName As String, tableName As String, condition As String, limit As Integer) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` WHERE {condition} Limit {limit};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDistinct(columnName As String, tableName As String) As String
|
||||||
|
Return $"Select Distinct {columnName} FROM `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDistinct(columnName As String, tableName As String, condition As String) As String
|
||||||
|
Return $"Select Distinct {columnName} FROM `{tableName}` WHERE {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDescOrder(columnName As String, tableName As String, orderCol As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` Order By {orderCol} Desc;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDescOrder(columnName As String, tableName As String, orderCol As String, limit As Integer) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` Order By {orderCol} Desc Limit {limit};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDescOrder(columnName As String, ByVal tableName As String, ByVal condition As String, ByVal orderCol As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` WHERE {condition} Order By `{orderCol}` Desc;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchDescOrder(columnName As String, ByVal tableName As String, ByVal condition As String, ByVal orderCol As String, limit As Integer) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` WHERE {condition} Order By `{orderCol}` Desc Limit {limit};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchAscOrder(ByVal columnName As String, ByVal tableName As String, ByVal orderCol As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` Order By {orderCol} Asc;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function SearchAscOrder(ByVal columnName As String, ByVal tableName As String, ByVal condition As String, ByVal orderCol As String) As String
|
||||||
|
Return $"Select {columnName} FROM `{tableName}` WHERE {condition} Order By {orderCol} Asc;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchNullTable(tableName As String) As String
|
||||||
|
Return $"Select * FROM `{tableName}` Where Limit 0;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function Insert(ByVal tableName As String, ByVal values As String) As String
|
||||||
|
Return $"Insert into `{tableName}` Values ( {values} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Insert(ByVal tableName As String, ByVal colNames As String, ByVal values As String) As String
|
||||||
|
Return $"Insert into `{tableName}` ({colNames}) Values ( {values} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Insert(tableName As String, dicNameValues As Dictionary(Of String, String)) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"`{keyValuePair.Key}`")
|
||||||
|
values.Append($"'{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
colNames.Append($",`{keyValuePair.Key}`")
|
||||||
|
values.Append($",'{keyValuePair.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Insert(tableName, colNames.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function InsertByParameters(tableName As String, dicNameValues As Dictionary(Of String, String)) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"`{keyValuePair.Key}`")
|
||||||
|
values.Append($"{keyValuePair.Value}")
|
||||||
|
Else
|
||||||
|
colNames.Append($",`{keyValuePair.Key}`")
|
||||||
|
values.Append($",{keyValuePair.Value}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Insert(tableName, colNames.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function AddCol(ByVal tableName As String, ByVal colName As String, ByVal colType As String, Optional isNull As Boolean = True) As String
|
||||||
|
Return $"Alter Table `{tableName}` Add `{colName}` {colType} {IIf(isNull, "Default Null", "Not Null")};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function AddCol(ByVal tableName As String, colParam As DatabaseData) As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"Alter Table `{tableName}` ")
|
||||||
|
sb.Append("Add ")
|
||||||
|
sb.Append(colParam.ToAddColString())
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function AddCols(tableName As String, colList As List(Of DatabaseData)) As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"Alter Table `{tableName}` ")
|
||||||
|
sb.Append("Add ")
|
||||||
|
sb.Append("( ")
|
||||||
|
|
||||||
|
sb.Append(colList(0).ToAddColString())
|
||||||
|
For i As Integer = 1 To colList.Count - 1
|
||||||
|
sb.Append($",{colList(i).ToAddColString()}")
|
||||||
|
Next
|
||||||
|
|
||||||
|
sb.Append(");")
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function Update(ByVal tableName As String, ByVal destStr As String, ByVal condition As String) As String
|
||||||
|
Return $"Update `{tableName}` Set {destStr} Where {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Update(ByVal tableName As String, dicNameValues As Dictionary(Of String, String), ByVal condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If destStr.Length = 0 Then
|
||||||
|
destStr.Append($"`{keyValuePair.Key}` = '{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
destStr.Append($",`{keyValuePair.Key}` = '{keyValuePair.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Update(tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function Update(ByVal tableName As String, names() As String, values() As String, condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
If names.Length <> values.Length Then
|
||||||
|
Throw New Exception("DBHelpers_Update:names.Length <> values.Length")
|
||||||
|
End If
|
||||||
|
|
||||||
|
For i As Integer = 0 To names.Length - 1
|
||||||
|
If i = 0 Then
|
||||||
|
destStr.Append($"{names(i)} = '{values(i)}'")
|
||||||
|
Else
|
||||||
|
destStr.Append($",{names(i)} = '{values(i)}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return Update(tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function DeleteRows(ByVal tableName As String, ByVal condition As String) As String
|
||||||
|
Return $"Delete From `{tableName}` Where {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 清空数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DeleteTable(ByVal tableName As String) As String
|
||||||
|
Return $"Delete From `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function DropCol(ByVal tableName As String, ByVal colName As String) As String
|
||||||
|
Return $"Alter Table `{tableName}` Drop Column `{colName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 删除数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DropTable(ByVal tableName As String) As String
|
||||||
|
Return $"Drop Table `{tableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function CreateTable(ByVal tableName As String, ByVal createStr As String) As String
|
||||||
|
Return $"Create Table `{tableName}` ( {createStr} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function CreateTableWhenNotExists(tableName As String, createStr As String) As String
|
||||||
|
Return $"Create Table if not exists `{tableName}` ( {createStr} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Overridable Function CreateLikeTable(tableName As String, baseTableName As String) As String
|
||||||
|
Return $"create table `{tableName}` like `{baseTableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function CreateLikeTableNotExists(tableName As String, baseTableName As String) As String
|
||||||
|
Return $"create table if not exists `{tableName}` like `{baseTableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 创建表,同时复制基础表数据(不包含原表索引与主键)
|
||||||
|
''' 若想复制表结构加数据,则先复制表结构创建表,再拷贝数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="baseTableName">基础表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function CreateCopyTable(tableName As String, baseTableName As String) As String
|
||||||
|
Return $"create table `{tableName}` as select * from `{baseTableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 不存在表时即创建表,同时复制基础表数据(不包含原表索引与主键)
|
||||||
|
''' 若想复制表结构加数据,则先复制表结构创建表,再拷贝数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="baseTableName">基础表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function CreateCopyTableNotExists(tableName As String, baseTableName As String) As String
|
||||||
|
Return $"create table if not exists `{tableName}` as select * from `{baseTableName}`;"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 复制基础表数据到新表中
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="baseTableName">基础表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function InsertCopyTable(tableName As String, baseTableName As String) As String
|
||||||
|
Return $"insert into `{tableName}` select * from `{baseTableName}`;"
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
94
Database/Base/DatabaseData.vb
Normal file
94
Database/Base/DatabaseData.vb
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
Public Class DatabaseData
|
||||||
|
Enum TypeEnum
|
||||||
|
[Bit]
|
||||||
|
[Char]
|
||||||
|
[Date]
|
||||||
|
[DateTime]
|
||||||
|
[Double]
|
||||||
|
[Enum]
|
||||||
|
[Float]
|
||||||
|
[Int]
|
||||||
|
[IntUnsigned]
|
||||||
|
[Json]
|
||||||
|
[Text]
|
||||||
|
[Time]
|
||||||
|
Varchar
|
||||||
|
[Year]
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColumnName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Value() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 默认值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DefaultValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataType() As TypeEnum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型长度
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataTypeLength() As Integer
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否允许为空
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsNull() As Boolean = True
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否自动增长
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsAutoIncrement() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为主键
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsPrimaryKey() As Boolean
|
||||||
|
|
||||||
|
Public Function ToAddColString() As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"`{ColumnName}`")
|
||||||
|
|
||||||
|
Select Case DataType
|
||||||
|
Case TypeEnum.Char, TypeEnum.Varchar
|
||||||
|
sb.Append($" {DataType}({DataTypeLength}) ")
|
||||||
|
Case TypeEnum.Int
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
If IsAutoIncrement Then sb.Append($" AUTO_INCREMENT")
|
||||||
|
Case Else
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
sb.Append(IIf(IsNull, " Default Null", " Not Null"))
|
||||||
|
|
||||||
|
If IsPrimaryKey Then
|
||||||
|
sb.Append($" PRIMARY KEY")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
12
Database/Base/DatabaseSchema.vb
Normal file
12
Database/Base/DatabaseSchema.vb
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Contains the entire database schema
|
||||||
|
''' </summary>
|
||||||
|
Public Class DatabaseSchema
|
||||||
|
Public Tables As List(Of TableSchema) = New List(Of TableSchema)()
|
||||||
|
Public Views As List(Of ViewSchema) = New List(Of ViewSchema)()
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
11
Database/Base/ForeignKeySchema.vb
Normal file
11
Database/Base/ForeignKeySchema.vb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
Public Class ForeignKeySchema
|
||||||
|
Public TableName As String
|
||||||
|
Public ColumnName As String
|
||||||
|
Public ForeignTableName As String
|
||||||
|
Public ForeignColumnName As String
|
||||||
|
Public CascadeOnDelete As Boolean
|
||||||
|
Public IsNullable As Boolean
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
16
Database/Base/IndexSchema.vb
Normal file
16
Database/Base/IndexSchema.vb
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
|
||||||
|
|
||||||
|
Public Class IndexSchema
|
||||||
|
Public IndexName As String
|
||||||
|
Public IsUnique As Boolean
|
||||||
|
Public Columns As List(Of IndexColumn)
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class IndexColumn
|
||||||
|
Public ColumnName As String
|
||||||
|
Public IsAscending As Boolean
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
7
Database/Base/InsertParams.vb
Normal file
7
Database/Base/InsertParams.vb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Namespace Database.Base
|
||||||
|
Public Class InsertParams
|
||||||
|
Public Property TableName() As String
|
||||||
|
|
||||||
|
Public Property InsertKeyValue As Dictionary(Of String, String)
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
71
Database/Base/SearchCondition.vb
Normal file
71
Database/Base/SearchCondition.vb
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
Public Class SearchCondition
|
||||||
|
Enum ConditionType
|
||||||
|
LessThan
|
||||||
|
GreaterThen
|
||||||
|
EqualTo
|
||||||
|
LessThanOrEqualTo
|
||||||
|
GreaterThenOrEqualTo
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Enum LogicType
|
||||||
|
[And]
|
||||||
|
[Or]
|
||||||
|
[Not]
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 判断列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 判断条件
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Condition() As ConditionType = ConditionType.EqualTo
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 判断值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前条件与上一个条件的逻辑关系
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property LogicPrevious() As LogicType = LogicType.And
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 将当前条件转换为字符串,不支持将条件逻辑关系同时转换
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overrides Function ToString() As String
|
||||||
|
Dim stringBuilder As New StringBuilder
|
||||||
|
stringBuilder.Append(" ")
|
||||||
|
stringBuilder.Append(ColName)
|
||||||
|
|
||||||
|
Select Case Condition
|
||||||
|
Case ConditionType.EqualTo
|
||||||
|
stringBuilder.Append("=")
|
||||||
|
Case ConditionType.LessThan
|
||||||
|
stringBuilder.Append("<")
|
||||||
|
Case ConditionType.LessThanOrEqualTo
|
||||||
|
stringBuilder.Append("<=")
|
||||||
|
Case ConditionType.GreaterThen
|
||||||
|
stringBuilder.Append(">")
|
||||||
|
Case ConditionType.GreaterThenOrEqualTo
|
||||||
|
stringBuilder.Append(">=")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
stringBuilder.Append($"'{ColValue}'")
|
||||||
|
|
||||||
|
Return stringBuilder.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
46
Database/Base/SearchParams.vb
Normal file
46
Database/Base/SearchParams.vb
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
Namespace Database.Base
|
||||||
|
Public Class SearchParams
|
||||||
|
Enum OrderTypeEnum
|
||||||
|
None
|
||||||
|
Desc
|
||||||
|
Asc
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询条件的表名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property TableName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当IsSearchAllCols = False时,查询返回列名集合
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property SearchColNames() As String()
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询的条件
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property SearchCondition() As List(Of SearchCondition)
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 排序方式
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property OrderType As OrderTypeEnum = OrderTypeEnum.None
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 但需要排序时排序列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property OrderColName() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 从返回结果提取指定行的内容
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Limit() As Integer = 0
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
14
Database/Base/TableSchema.vb
Normal file
14
Database/Base/TableSchema.vb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Imports System.Collections.Generic
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
|
||||||
|
|
||||||
|
Public Class TableSchema
|
||||||
|
Public TableName As String
|
||||||
|
Public TableSchemaName As String
|
||||||
|
Public Columns As List(Of ColumnSchema)
|
||||||
|
Public PrimaryKey As List(Of String)
|
||||||
|
Public ForeignKeys As List(Of ForeignKeySchema)
|
||||||
|
Public Indexes As List(Of IndexSchema)
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
71
Database/Base/TriggerBuilder.vb
Normal file
71
Database/Base/TriggerBuilder.vb
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
Imports System.Collections.Generic
|
||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
|
||||||
|
Public Module TriggerBuilder
|
||||||
|
Public Function GetForeignKeyTriggers(ByVal dt As TableSchema) As IList(Of TriggerSchema)
|
||||||
|
Dim result As IList(Of TriggerSchema) = New List(Of TriggerSchema)()
|
||||||
|
For Each fks As ForeignKeySchema In dt.ForeignKeys
|
||||||
|
result.Add(GenerateInsertTrigger(fks))
|
||||||
|
result.Add(GenerateUpdateTrigger(fks))
|
||||||
|
result.Add(GenerateDeleteTrigger(fks))
|
||||||
|
Next
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function MakeTriggerName(ByVal fks As ForeignKeySchema, ByVal prefix As String) As String
|
||||||
|
Return prefix & "_" & fks.TableName & "_" & fks.ColumnName & "_" & fks.ForeignTableName & "_" & fks.ForeignColumnName
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GenerateInsertTrigger(ByVal fks As ForeignKeySchema) As TriggerSchema
|
||||||
|
Dim trigger As TriggerSchema = New TriggerSchema()
|
||||||
|
trigger.Name = MakeTriggerName(fks, "fki")
|
||||||
|
trigger.Type = TriggerType.Before
|
||||||
|
trigger.Event = TriggerEvent.Insert
|
||||||
|
trigger.Table = fks.TableName
|
||||||
|
Dim nullString As String = ""
|
||||||
|
|
||||||
|
If fks.IsNullable Then
|
||||||
|
nullString = " NEW." & fks.ColumnName & " IS NOT NULL AND"
|
||||||
|
End If
|
||||||
|
|
||||||
|
trigger.Body = "SELECT RAISE(ROLLBACK, 'insert on table " & fks.TableName & " violates foreign key constraint " & trigger.Name & "')" & " WHERE" & nullString & " (SELECT " & fks.ForeignColumnName & " FROM " & fks.ForeignTableName & " WHERE " & fks.ForeignColumnName & " = NEW." & fks.ColumnName & ") IS NULL; "
|
||||||
|
Return trigger
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GenerateUpdateTrigger(ByVal fks As ForeignKeySchema) As TriggerSchema
|
||||||
|
Dim trigger As TriggerSchema = New TriggerSchema()
|
||||||
|
trigger.Name = MakeTriggerName(fks, "fku")
|
||||||
|
trigger.Type = TriggerType.Before
|
||||||
|
trigger.Event = TriggerEvent.Update
|
||||||
|
trigger.Table = fks.TableName
|
||||||
|
Dim triggerName As String = trigger.Name
|
||||||
|
Dim nullString As String = ""
|
||||||
|
|
||||||
|
If fks.IsNullable Then
|
||||||
|
nullString = " NEW." & fks.ColumnName & " IS NOT NULL AND"
|
||||||
|
End If
|
||||||
|
|
||||||
|
trigger.Body = "SELECT RAISE(ROLLBACK, 'update on table " & fks.TableName & " violates foreign key constraint " & triggerName & "')" & " WHERE" & nullString & " (SELECT " & fks.ForeignColumnName & " FROM " & fks.ForeignTableName & " WHERE " & fks.ForeignColumnName & " = NEW." & fks.ColumnName & ") IS NULL; "
|
||||||
|
Return trigger
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GenerateDeleteTrigger(ByVal fks As ForeignKeySchema) As TriggerSchema
|
||||||
|
Dim trigger As TriggerSchema = New TriggerSchema()
|
||||||
|
trigger.Name = MakeTriggerName(fks, "fkd")
|
||||||
|
trigger.Type = TriggerType.Before
|
||||||
|
trigger.Event = TriggerEvent.Delete
|
||||||
|
trigger.Table = fks.ForeignTableName
|
||||||
|
Dim triggerName as String = trigger.Name
|
||||||
|
|
||||||
|
If Not fks.CascadeOnDelete Then
|
||||||
|
trigger.Body = "SELECT RAISE(ROLLBACK, 'delete on table " & fks.ForeignTableName & " violates foreign key constraint " & triggerName & "')" & " WHERE (SELECT " & fks.ColumnName & " FROM " & fks.TableName & " WHERE " & fks.ColumnName & " = OLD." & fks.ForeignColumnName & ") IS NOT NULL; "
|
||||||
|
Else
|
||||||
|
trigger.Body = "DELETE FROM [" & fks.TableName & "] WHERE " & fks.ColumnName & " = OLD." & fks.ForeignColumnName & "; "
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return trigger
|
||||||
|
End Function
|
||||||
|
End Module
|
||||||
|
End NameSpace
|
||||||
20
Database/Base/TriggerSchema.vb
Normal file
20
Database/Base/TriggerSchema.vb
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Namespace Database.Base
|
||||||
|
Public Enum TriggerEvent
|
||||||
|
Delete
|
||||||
|
Update
|
||||||
|
Insert
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Enum TriggerType
|
||||||
|
After
|
||||||
|
Before
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Public Class TriggerSchema
|
||||||
|
Public Name As String
|
||||||
|
Public [Event] As TriggerEvent
|
||||||
|
Public Type As TriggerType
|
||||||
|
Public Body As String
|
||||||
|
Public Table As String
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
17
Database/Base/ViewSchema.vb
Normal file
17
Database/Base/ViewSchema.vb
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
Namespace Database.Base
|
||||||
|
''' <summary>
|
||||||
|
''' Describes a single view schema
|
||||||
|
''' </summary>
|
||||||
|
Public Class ViewSchema
|
||||||
|
''' <summary>
|
||||||
|
''' Contains the view name
|
||||||
|
''' </summary>
|
||||||
|
Public ViewName As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Contains the view SQL statement
|
||||||
|
''' </summary>
|
||||||
|
Public ViewSql As String
|
||||||
|
End Class
|
||||||
|
End NameSpace
|
||||||
756
Database/DbCmdHelper.vb
Normal file
756
Database/DbCmdHelper.vb
Normal file
@@ -0,0 +1,756 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据库语句助手
|
||||||
|
''' 时间:2020-12-21
|
||||||
|
''' 作者:ML
|
||||||
|
''' 版本:1.0
|
||||||
|
'''
|
||||||
|
''' 注意:添加一条数据库帮助语句时,需要考虑Mysql/Sqlite/Mssql等数据库是否支持命令,不支持则需要在对应帮助类中重写该帮助语句
|
||||||
|
''' 注意:Sqlite数据库与大多数据库不相同,DB开头数据库语句大多不适用
|
||||||
|
'''
|
||||||
|
''' </summary>
|
||||||
|
Public MustInherit Class DbCmdHelper
|
||||||
|
Protected FiledSuffix As Char
|
||||||
|
Protected FiledPrefix As Char
|
||||||
|
|
||||||
|
Public Shared Function CreateCmdHelper(type As DbExecutor.DbTypeEnum) As DbCmdHelper
|
||||||
|
Select Case type
|
||||||
|
Case DbExecutor.DbTypeEnum.Mysql
|
||||||
|
Return New MysqlCmdHelper()
|
||||||
|
Case DbExecutor.DbTypeEnum.Mssql
|
||||||
|
Return New MssqlCmdHelper()
|
||||||
|
Case DbExecutor.DbTypeEnum.Sqlite
|
||||||
|
Return New SqliteCmdHelper()
|
||||||
|
Case Else
|
||||||
|
Throw New Exception($"CreateCmdHelper :Unknown Type {type}")
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
#Region "访问单数据库连接"
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表符合条件的所有数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="condition">查询条件,</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function SearchAll(tableName As String, Optional condition As String = "") As String
|
||||||
|
If String.IsNullOrWhiteSpace(condition) Then
|
||||||
|
Return $"Select * FROM {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
Else
|
||||||
|
Return $"Select * FROM {FiledSuffix}{tableName}{FiledPrefix} WHERE {condition};"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询表符合条件的所有指定列的数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="columnName">列名集合,需要返回多列时用','符号分隔列名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="condition">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Search(columnName As String, tableName As String, Optional condition As String = "") As String
|
||||||
|
If String.IsNullOrWhiteSpace(condition) Then
|
||||||
|
Return $"Select {columnName} FROM {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
Else
|
||||||
|
Return $"Select {columnName} FROM {FiledSuffix}{tableName}{FiledPrefix} WHERE {condition};"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询表符合条件的所有指定列的数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="columnName">表名</param>
|
||||||
|
''' <param name="tableName">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Search(columnName As List(Of String), tableName As String, Optional condition As String = "") As String
|
||||||
|
Dim colNameString As New StringBuilder
|
||||||
|
For i As Integer = 0 To columnName.Count - 1
|
||||||
|
If i = 0 Then
|
||||||
|
colNameString.Append($"{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
Else
|
||||||
|
colNameString.Append($",{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If String.IsNullOrWhiteSpace(condition) Then
|
||||||
|
Return $"Select {colNameString} FROM {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
Else
|
||||||
|
Return $"Select {colNameString} FROM {FiledSuffix}{tableName}{FiledPrefix} Where {condition};"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function SearchOrder(columnName As List(Of String), tableName As String, Optional orderString As String = "") As String
|
||||||
|
Dim colNameString As New StringBuilder
|
||||||
|
For i As Integer = 0 To columnName.Count - 1
|
||||||
|
If i = 0 Then
|
||||||
|
colNameString.Append($"{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
Else
|
||||||
|
colNameString.Append($",{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If String.IsNullOrWhiteSpace(orderString) Then
|
||||||
|
Return $"Select {colNameString} FROM {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
Else
|
||||||
|
Return $"Select {colNameString} FROM {FiledSuffix}{tableName}{FiledPrefix} {orderString};"
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定表包含的内容行数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <param name="condition">查询条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function SearchCount(tableName As String, Optional condition As String = "") As String
|
||||||
|
Return Search("count(*)", tableName, condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表的信息
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function SearchTableInfo(tableName As String) As String
|
||||||
|
Return $"Select * from information_schema.tables where table_name = '{tableName}';"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表是否存在的信息,返回查询当前表在数据库中存在的数量
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function SearchTableExists(tableName As String) As String
|
||||||
|
Return $"Select count(*) from information_schema.tables where table_name = '{tableName}';"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据表插入一行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colNames">列名字符串</param>
|
||||||
|
''' <param name="values">列值字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Insert(tableName As String, colNames As String, values As String) As String
|
||||||
|
'将返回输出到C盘 log.txt中
|
||||||
|
'判断文件是否存在,如果不存在则创建
|
||||||
|
|
||||||
|
Return $"Insert into {FiledSuffix}{tableName}{FiledPrefix} ({colNames}) Values ( {values} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据表插入一行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="dicNameValues">列名与列值键值对</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Insert(tableName As String, dicNameValues As Dictionary(Of String, String)) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($"'{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
colNames.Append($",{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($",'{keyValuePair.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return Insert(tableName, colNames.ToString(), values.ToString())
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Overridable Function Insert2(tableName As String, dicNameValues As Dictionary(Of String, Object )) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, Object) In dicNameValues
|
||||||
|
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($"'{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
colNames.Append($",{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($",'{keyValuePair.Value}'")
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Insert(tableName, colNames.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据表插入一行,通过命令参数方式执行时使用
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName"></param>
|
||||||
|
''' <param name="dicNameValues"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function InsertParam(tableName As String, dicNameValues As Dictionary(Of String, String)) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($"{keyValuePair.Value}")
|
||||||
|
Else
|
||||||
|
colNames.Append($",{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($",{keyValuePair.Value}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Insert(tableName, colNames.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据表插入一行,通过命令参数方式执行时使用,参数名由@{ColName}
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colNames">字段列表</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function InsertParam(tableName As String, colNames As List(Of String)) As String
|
||||||
|
Dim colNameString As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each colName As String In colNames
|
||||||
|
If colNameString.Length = 0 Then
|
||||||
|
colNameString.Append($"{FiledSuffix}{colName}{FiledPrefix}")
|
||||||
|
values.Append($"@{colName}")
|
||||||
|
Else
|
||||||
|
colNameString.Append($",{FiledSuffix}{colName}{FiledPrefix}")
|
||||||
|
values.Append($",@{colName}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Insert(tableName, colNameString.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定表数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="destStr">更新字符串</param>
|
||||||
|
''' <param name="condition"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Update(tableName As String, destStr As String, condition As String) As String
|
||||||
|
Return $"Update {FiledSuffix}{tableName}{FiledPrefix} Set {destStr} Where {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定表数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="dicNameValues">更新列名与列值键值对</param>
|
||||||
|
''' <param name="condition">更新列索引条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function Update(tableName As String, dicNameValues As Dictionary(Of String, String), condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If destStr.Length = 0 Then
|
||||||
|
destStr.Append($"{FiledSuffix}{keyValuePair.Key}{FiledPrefix} = '{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
destStr.Append($",{FiledSuffix}{keyValuePair.Key}{FiledPrefix} = '{keyValuePair.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Update(tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定数据库中指定表数据,参数名由@{ColName}
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="colNames">更新列名的集合</param>
|
||||||
|
''' <param name="condition">更新列索引条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function UpdateParam(tableName As String, colNames As List(Of String), condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
For Each colName As String In colNames
|
||||||
|
If destStr.Length = 0 Then
|
||||||
|
destStr.Append($"{FiledSuffix}{colName}{FiledPrefix} = @{colName}")
|
||||||
|
Else
|
||||||
|
destStr.Append($",{FiledSuffix}{colName}{FiledPrefix} = @{colName}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return Update(tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据表增加一列数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colName">列名</param>
|
||||||
|
''' <param name="colType">列类型</param>
|
||||||
|
''' <param name="isNull">是否允许为空</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function AddCol(tableName As String, colName As String, colType As String, Optional isNull As Boolean = True) As String
|
||||||
|
Return $"Alter Table {FiledSuffix}{tableName}{FiledPrefix} Add {FiledSuffix}{colName}{FiledPrefix} {colType} {IIf(isNull, "Default Null", "Not Null")};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据表删除一列数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colName">需要删除的列名,仅一列</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DropCol(tableName As String, colName As String) As String
|
||||||
|
Return $"Alter Table {FiledSuffix}{tableName}{FiledPrefix} Drop Column {FiledSuffix}{colName}{FiledPrefix};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 删除指定表多行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="condition">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DeleteRows(tableName As String, condition As String) As String
|
||||||
|
Return $"Delete From {FiledSuffix}{tableName}{FiledPrefix} Where {condition};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 创建数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="createStr">创建表的列信息字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function CreateTable(tableName As String, createStr As String) As String
|
||||||
|
Return $"Create Table {FiledSuffix}{tableName}{FiledPrefix} ( {createStr} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 创建数据表,如果存在则不创建
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="createStr">创建表的列信息字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function CreateTableWhenNotExists(tableName As String, createStr As String) As String
|
||||||
|
Return $"Create Table if not exists {FiledSuffix}{tableName}{FiledPrefix} ( {createStr} );"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 清空数据表,表依旧存在
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DeleteTable(tableName As String) As String
|
||||||
|
Return $"Delete From {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 删除数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DropTable(tableName As String) As String
|
||||||
|
Return $"Drop Table {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 删除数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DropTableWhenExists(tableName As String) As String
|
||||||
|
Return $"Drop Table If Exists {FiledSuffix}{tableName}{FiledPrefix};"
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "访问多数据库连接"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据库中指定数据表符合条件的所有指定列的数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="ColsName">列名集合,需要返回多列时用','符号分隔列名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="condition">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearch(dbName As String, colsName As String, tableName As String, Optional condition As String = "") As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Select {colsName} From ")
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
|
||||||
|
If String.IsNullOrWhiteSpace(condition) = False Then
|
||||||
|
cmdText.Append($" WHERE {condition}")
|
||||||
|
End If
|
||||||
|
|
||||||
|
cmdText.Append($";")
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据库中指定数据表符合条件的所有指定列的去重数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="ColsName">列名集合,需要返回多列时用','符号分隔列名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="condition">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbDistinctSearch(dbName As String, colsName As String, tableName As String, Optional condition As String = "") As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Select Distinct {colsName} From ")
|
||||||
|
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
|
||||||
|
If String.IsNullOrWhiteSpace(condition) = False Then
|
||||||
|
cmdText.Append($" WHERE {condition}")
|
||||||
|
End If
|
||||||
|
|
||||||
|
cmdText.Append($";")
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据库中指定数据表符合条件的所有指定列的数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="columnName">表名</param>
|
||||||
|
''' <param name="tableName">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearch(dbName As String, columnName As List(Of String), tableName As String, Optional condition As String = "") As String
|
||||||
|
Dim colNameString As New StringBuilder
|
||||||
|
For i As Integer = 0 To columnName.Count - 1
|
||||||
|
If i = 0 Then
|
||||||
|
colNameString.Append($"{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
Else
|
||||||
|
colNameString.Append($",{FiledSuffix}{columnName(i)}{FiledPrefix}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return DbSearch(dbName, colNameString.ToString(), tableName, condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定表包含的内容行数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <param name="condition">查询条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearchCount(dbName As String, tableName As String, Optional condition As String = "") As String
|
||||||
|
Return DbSearch(dbName, "count(*)", tableName, condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据库中指定数据表符合条件的所有数据
|
||||||
|
'''
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <param name="condition">查询条件(可选)</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearchAll(dbName As String, tableName As String, Optional condition As String = "") As String
|
||||||
|
Return DbSearch(dbName, "*", tableName, condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据库中指定数据表的信息
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearchTableInfo(dbName As String, tableName As String) As String
|
||||||
|
Return DbSearch("", "*", "information_schema.tables", "table_schema = '{dbName}' and table_name = '{tableName}'")
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表是否存在的信息,返回查询当前表在指定数据库中存在的数量
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbSearchTableExists(dbName As String, tableName As String) As String
|
||||||
|
Return DbSearch("", "count(*)", "information_schema.tables", "table_schema = '{dbName}' and table_name = '{tableName}'")
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中数据表插入一行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colNames">列名字符串</param>
|
||||||
|
''' <param name="values">列值字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbInsert(dbName As String, tableName As String, colNames As String, values As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Insert into ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" ({colNames}) Values ( {values} );")
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中数据表插入一行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="dicNameValues">列名与列值键值对</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbInsert(dbName As String, tableName As String, dicNameValues As Dictionary(Of String, String)) As String
|
||||||
|
Dim colNames As New StringBuilder
|
||||||
|
Dim values As New StringBuilder
|
||||||
|
For Each keyValuePair As KeyValuePair(Of String, String) In dicNameValues
|
||||||
|
If colNames.Length = 0 Then
|
||||||
|
colNames.Append($"{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($"'{keyValuePair.Value}'")
|
||||||
|
Else
|
||||||
|
colNames.Append($",{FiledSuffix}{keyValuePair.Key}{FiledPrefix}")
|
||||||
|
values.Append($",'{keyValuePair.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return DbInsert(dbName, tableName, colNames.ToString(), values.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中数据表插入一行,通过命令参数方式执行时使用,参数名由@{ColName}
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName"></param>
|
||||||
|
''' <param name="colNames">需要插入列名的集合</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbInsertParam(dbName As String, tableName As String, colNames As List(Of String)) As String
|
||||||
|
Dim colNameBuilder As New StringBuilder
|
||||||
|
Dim valueBuilder As New StringBuilder
|
||||||
|
For Each colName As String In colNames
|
||||||
|
If colNameBuilder.Length = 0 Then
|
||||||
|
colNameBuilder.Append($"{FiledSuffix}{colName}{FiledPrefix}")
|
||||||
|
valueBuilder.Append($"@{colName}")
|
||||||
|
Else
|
||||||
|
colNameBuilder.Append($",{FiledSuffix}{colName}{FiledPrefix}")
|
||||||
|
valueBuilder.Append($",@{colName}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'insert into dbName.tablename (1,2,3) value (@1,@2,@3)
|
||||||
|
Return DbInsert(dbName, tableName, colNameBuilder.ToString(), valueBuilder.ToString())
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定数据库中指定表数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="destStr">更新字符串</param>
|
||||||
|
''' <param name="condition"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbUpdate(dbName As String, tableName As String, destStr As String, condition As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
Dim tmpStrCmdText As String = ""
|
||||||
|
|
||||||
|
cmdText.Append($"Update ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" Set {destStr} Where {condition};")
|
||||||
|
tmpStrCmdText = cmdText.ToString()
|
||||||
|
Console.WriteLine("SQL_CMD = " & tmpStrCmdText)
|
||||||
|
'If Not System.IO.File.Exists("C:\log.txt") Then
|
||||||
|
' System.IO.File.Create("C:\log.txt").Dispose()
|
||||||
|
'End If
|
||||||
|
''将返回写入 Log.txt中
|
||||||
|
'System.IO.File.AppendAllText("C:\log.txt", $"{tmpStrCmdText}")
|
||||||
|
Return tmpStrCmdText
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定数据库中指定表数据,参数名由@{ColName}
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="colNames">更新列名的集合</param>
|
||||||
|
''' <param name="condition">更新列索引条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbUpdateParam(dbName As String, tableName As String, colNames As List(Of String), condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
For Each colName As String In colNames
|
||||||
|
If destStr.Length = 0 Then
|
||||||
|
destStr.Append($"{FiledSuffix}{colName}{FiledPrefix} = @{colName}")
|
||||||
|
Else
|
||||||
|
destStr.Append($",{FiledSuffix}{colName}{FiledPrefix} = @{colName}")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return DbUpdate(dbName, tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 更新指定数据库中指定表数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">指定表名</param>
|
||||||
|
''' <param name="filedDictionary">更新列名与列值键值对</param>
|
||||||
|
''' <param name="condition">更新列索引条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbUpdate(dbName As String, tableName As String, filedDictionary As Dictionary(Of String, String), condition As String) As String
|
||||||
|
Dim destStr As New StringBuilder
|
||||||
|
For Each filed As KeyValuePair(Of String, String) In filedDictionary
|
||||||
|
If destStr.Length = 0 Then
|
||||||
|
destStr.Append($"{FiledSuffix}{filed.Key}{FiledPrefix} = '{filed.Value}'")
|
||||||
|
Else
|
||||||
|
destStr.Append($",{FiledSuffix}{filed.Key}{FiledPrefix} = '{filed.Value}'")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return DbUpdate(dbName, tableName, destStr.ToString(), condition)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中指定数据表增加一列数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colName">列名</param>
|
||||||
|
''' <param name="colType">列类型</param>
|
||||||
|
''' <param name="isNull">是否允许为空</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbAddCol(dbName As String, tableName As String, colName As String, colType As String, Optional isNull As Boolean = True) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Alter Table ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" Add {FiledSuffix}{colName}{FiledPrefix} {colType} {IIf(isNull, "Default Null", "Not Null")};")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中数据表删除一列数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="colName">需要删除的列名,仅一列</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbDropCol(dbName As String, tableName As String, colName As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Alter Table ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" Drop Column {FiledSuffix}{colName}{FiledPrefix};")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中指定表删除多行数据
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="condition">条件</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbDeleteRows(dbName As String, tableName As String, condition As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Delete From ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" Where {condition};")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中创建数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="createStr">创建表的列信息字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbCreateTable(dbName As String, tableName As String, createStr As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Create Table ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" ( {createStr} );")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 指定数据库中创建数据表,如果存在则不创建
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">表名</param>
|
||||||
|
''' <param name="createStr">创建表的列信息字符串</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbCreateTableWhenNotExists(dbName As String, tableName As String, createStr As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Create Table if not exists ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($" ( {createStr} );")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 清空指定数据库中数据表,表依旧存在
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbDeleteTable(dbName As String, tableName As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Delete From ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($";")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 删除指定数据库中数据表
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="dbName">数据库名</param>
|
||||||
|
''' <param name="tableName">数据表名</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overridable Function DbDropTable(dbName As String, tableName As String) As String
|
||||||
|
Dim cmdText As New StringBuilder
|
||||||
|
cmdText.Append($"Drop Table ")
|
||||||
|
If String.IsNullOrEmpty(dbName) = False Then
|
||||||
|
cmdText.Append($"{FiledSuffix}{dbName}{FiledPrefix}.")
|
||||||
|
End If
|
||||||
|
cmdText.Append($"{FiledSuffix}{tableName}{FiledPrefix}")
|
||||||
|
cmdText.Append($";")
|
||||||
|
|
||||||
|
Return cmdText.ToString()
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
End Class
|
||||||
377
Database/DbExecutor.vb
Normal file
377
Database/DbExecutor.vb
Normal file
@@ -0,0 +1,377 @@
|
|||||||
|
Imports System.Data.Common
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.Data.SQLite
|
||||||
|
Imports MySql.Data.MySqlClient
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据库通用命令执行器
|
||||||
|
''' 时间:2020-12-21
|
||||||
|
''' 作者:ML
|
||||||
|
''' 版本:1.0
|
||||||
|
''' </summary>
|
||||||
|
Public Class DbExecutor
|
||||||
|
Implements IDisposable
|
||||||
|
''' <summary>
|
||||||
|
''' 数据库类型,目前支持Mysql与Sqlite
|
||||||
|
''' </summary>
|
||||||
|
Enum DbTypeEnum
|
||||||
|
Mysql
|
||||||
|
Sqlite
|
||||||
|
Mssql
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
|
Private ReadOnly _connectionString As String '数据库连接语句
|
||||||
|
|
||||||
|
Private ReadOnly _dbType As DbTypeEnum '数据库类型
|
||||||
|
|
||||||
|
Private _connection As DbConnection '数据库连接句柄
|
||||||
|
|
||||||
|
Private _command As DbCommand '数据库命令句柄
|
||||||
|
|
||||||
|
Private _dataAdapter As DbDataAdapter '数据库查询填充器句柄
|
||||||
|
|
||||||
|
Private _transaction As DbTransaction '数据库事务句柄
|
||||||
|
|
||||||
|
Private _commandHelper As DbCmdHelper '数据库语句填充助手
|
||||||
|
|
||||||
|
Sub New(type As DbTypeEnum, connectionString As String)
|
||||||
|
_dbType = type
|
||||||
|
_connectionString = connectionString
|
||||||
|
InitByDbType(_dbType)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub InitByDbType(type As DbTypeEnum)
|
||||||
|
Select Case type
|
||||||
|
Case DbTypeEnum.Mysql
|
||||||
|
_connection = New MySqlConnection()
|
||||||
|
_command = _connection.CreateCommand()
|
||||||
|
_dataAdapter = New MySqlDataAdapter() With {.MissingSchemaAction = MissingSchemaAction.AddWithKey}
|
||||||
|
|
||||||
|
_commandHelper = New MysqlCmdHelper()
|
||||||
|
Case DbTypeEnum.Sqlite
|
||||||
|
_connection = New SqliteConnection()
|
||||||
|
_command = _connection.CreateCommand()
|
||||||
|
_dataAdapter = New SQLiteDataAdapter() With {.MissingSchemaAction = MissingSchemaAction.AddWithKey}
|
||||||
|
|
||||||
|
_commandHelper = New SqliteCmdHelper()
|
||||||
|
Case DbTypeEnum.Mssql
|
||||||
|
_connection = New SqlConnection()
|
||||||
|
_command = _connection.CreateCommand()
|
||||||
|
_dataAdapter = New SqlDataAdapter() With {.MissingSchemaAction = MissingSchemaAction.AddWithKey}
|
||||||
|
|
||||||
|
_commandHelper = New MssqlCmdHelper()
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public ReadOnly Property DatabaseType() As DbTypeEnum
|
||||||
|
Get
|
||||||
|
Return _dbType
|
||||||
|
End Get
|
||||||
|
'Set(value As DbTypeEnum)
|
||||||
|
' _dbType = value
|
||||||
|
' '执行上一个数据库的关闭操作
|
||||||
|
' InitByDbType(_dbType)
|
||||||
|
'End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Connection() As DbConnection
|
||||||
|
Get
|
||||||
|
Return _connection
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Public ReadOnly Property Command() As DbCommand
|
||||||
|
Get
|
||||||
|
Return _command
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property CmdHelper() As DbCmdHelper
|
||||||
|
Get
|
||||||
|
Return _commandHelper
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 打开数据库连接
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function Open() As Boolean
|
||||||
|
If _connection Is Nothing Then Return False
|
||||||
|
If String.IsNullOrWhiteSpace(_connectionString) Then Return False
|
||||||
|
Try
|
||||||
|
_connection.ConnectionString = _connectionString
|
||||||
|
_connection.Open()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 关闭数据库连接
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Close()
|
||||||
|
If _connection Is Nothing Then Return
|
||||||
|
If _connection.State = ConnectionState.Closed Then Return
|
||||||
|
_connection.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 创建当前连接的命令执行句柄
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function CreateCommand() As DbCommand
|
||||||
|
Return _connection.CreateCommand()
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 运行非查询语句,返回执行该语句受到影响的行数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteNonQuery(commandText As String) As Integer
|
||||||
|
Dim result As Integer
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
result = _command.ExecuteNonQuery()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 使用命令参数模式执行非查询语句,返回执行该语句受到影响的行数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <param name="commandParams">执行的数据库命令参数</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteNonQuery(commandText As String, commandParams As DbParameterCollection) As Integer
|
||||||
|
Dim result As Integer
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
_command.Parameters.Clear()
|
||||||
|
For Each param As DbParameter In commandParams
|
||||||
|
_command.Parameters.Add(param)
|
||||||
|
Next
|
||||||
|
result = _command.ExecuteNonQuery()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 执行数据库语句,返回数据库读取流的句柄
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteReader(commandText As String) As DbDataReader
|
||||||
|
Dim result As DbDataReader
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
result = _command.ExecuteReader()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 使用命令参数模式执行数据库语句,返回数据库读取流的句柄
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <param name="commandParams">执行的数据库命令参数</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteReader(commandText As String, commandParams As DbParameterCollection) As DbDataReader
|
||||||
|
Dim result As DbDataReader
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
_command.Parameters.Clear()
|
||||||
|
For Each param As DbParameter In commandParams
|
||||||
|
_command.Parameters.Add(param)
|
||||||
|
Next
|
||||||
|
result = _command.ExecuteReader()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 执行数据库语句,返回查询结果的第一行第一列的内容
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteScalar(commandText As String) As Object
|
||||||
|
Dim result As Object
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
result = _command.ExecuteScalar()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 使用命令参数模式执行数据库语句,返回查询结果的第一行第一列的内容
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <param name="commandParams">执行的数据库命令参数</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteScalar(commandText As String, commandParams As DbParameterCollection) As Object
|
||||||
|
Dim result As Object
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
_command.Parameters.Clear()
|
||||||
|
For Each param As DbParameter In commandParams
|
||||||
|
_command.Parameters.Add(param)
|
||||||
|
Next
|
||||||
|
result = _command.ExecuteScalar()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 执行数据库语句,返回执行结果返回的数据表,常用于查询命令
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteDataTable(commandText As String, Optional withKey As Boolean = True) As DataTable
|
||||||
|
Dim dataTable As New DataTable
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
If withKey Then
|
||||||
|
_dataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
|
||||||
|
Else
|
||||||
|
_dataAdapter.MissingSchemaAction = MissingSchemaAction.Add
|
||||||
|
End If
|
||||||
|
_dataAdapter.SelectCommand = _command
|
||||||
|
_dataAdapter.Fill(dataTable)
|
||||||
|
Catch ex As Exception
|
||||||
|
Return Nothing
|
||||||
|
End Try
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 执行数据库语句,返回执行结果返回的数据表,常用于查询命令
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="commandText">执行的数据库命令文本</param>
|
||||||
|
''' <param name="commandParams">执行的数据库命令参数</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function ExecuteDataTable(commandText As String, commandParams As DbParameterCollection) As DataTable
|
||||||
|
Dim dataTable As New DataTable
|
||||||
|
Try
|
||||||
|
_command.CommandText = commandText
|
||||||
|
_command.Parameters.Clear()
|
||||||
|
For Each param As DbParameter In commandParams
|
||||||
|
_command.Parameters.Add(param)
|
||||||
|
Next
|
||||||
|
_dataAdapter.SelectCommand = _command
|
||||||
|
_dataAdapter.Fill(dataTable)
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
Return dataTable
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 开启事务
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function BeginTransaction() As DbTransaction
|
||||||
|
_transaction = _connection.BeginTransaction()
|
||||||
|
Return _transaction
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 提交事务
|
||||||
|
''' </summary>
|
||||||
|
Public Sub CommitTransaction()
|
||||||
|
Try
|
||||||
|
_transaction.Commit()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 回滚事务
|
||||||
|
''' </summary>
|
||||||
|
Public Sub RollbackTransaction()
|
||||||
|
Try
|
||||||
|
_transaction.Rollback()
|
||||||
|
Catch ex As Exception
|
||||||
|
Throw
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 创建数据参数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="type">参数数据类型</param>
|
||||||
|
''' <param name="ParameterName">参数名称</param>
|
||||||
|
''' <param name="value">参数值</param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function CreateDbParameter(type As DbType, parameterName As String, value As Object) As DbParameter
|
||||||
|
Dim dbParam As DbParameter = _command.CreateParameter()
|
||||||
|
dbParam.DbType = type
|
||||||
|
dbParam.ParameterName = parameterName
|
||||||
|
dbParam.Value = value
|
||||||
|
Return dbParam
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 添加数据参数
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="type"></param>
|
||||||
|
''' <param name="parameterName"></param>
|
||||||
|
''' <param name="value"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Function AddDbParameter(type As DbType, parameterName As String, value As Object) As DbParameter
|
||||||
|
Dim dbParam As DbParameter = _command.CreateParameter()
|
||||||
|
dbParam.DbType = type
|
||||||
|
dbParam.ParameterName = parameterName
|
||||||
|
dbParam.Value = value
|
||||||
|
_command.Parameters.Add(dbParam)
|
||||||
|
Return dbParam
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 清空数据
|
||||||
|
''' </summary>
|
||||||
|
Public Sub ClearDbParameter()
|
||||||
|
_command.Parameters.Clear()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 回收资源
|
||||||
|
''' </summary>
|
||||||
|
Public Sub Dispose() Implements IDisposable.Dispose
|
||||||
|
If _connection IsNot Nothing Then
|
||||||
|
If _connection.State = ConnectionState.Open Then
|
||||||
|
_connection.Close()
|
||||||
|
End If
|
||||||
|
_connection.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If _command IsNot Nothing Then _command.Dispose()
|
||||||
|
If _dataAdapter IsNot Nothing Then _dataAdapter.Dispose()
|
||||||
|
|
||||||
|
GC.Collect() '对所有缓存垃圾进行回收
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
10
Database/Mssql/MssqlCmdHelper.vb
Normal file
10
Database/Mssql/MssqlCmdHelper.vb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Namespace Database.Mssql
|
||||||
|
Public Class MssqlCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
FiledSuffix = "["c
|
||||||
|
FiledPrefix = "]"c
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
8
Database/MssqlCmdHelper.vb
Normal file
8
Database/MssqlCmdHelper.vb
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Public Class MssqlCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
FiledSuffix = "["c
|
||||||
|
FiledPrefix = "]"c
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
222
Database/Mysql/DataParam.vb
Normal file
222
Database/Mysql/DataParam.vb
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Mysql
|
||||||
|
Public Class DataParam
|
||||||
|
Enum DataTypeEnum
|
||||||
|
'###############################数值类型#############################
|
||||||
|
''' <summary>
|
||||||
|
''' 1 byte,小整数值
|
||||||
|
''' </summary>
|
||||||
|
Tinyint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 2 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Smallint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Mediumint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Int
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
[Integer]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,极大整数值
|
||||||
|
''' </summary>
|
||||||
|
Bigint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,单精度浮点数值
|
||||||
|
''' </summary>
|
||||||
|
Float
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,双精度浮点数值
|
||||||
|
''' </summary>
|
||||||
|
[Double]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'####################日期类型###############################
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 对DECIMAL(M,D) ,如果M>D,为M+2否则为D+2.小数值
|
||||||
|
''' </summary>
|
||||||
|
[Decimal]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,日期值,YYYY-MM-DD
|
||||||
|
''' </summary>
|
||||||
|
[Date]
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,时间值或持续时间,HH:MM:SS
|
||||||
|
''' </summary>
|
||||||
|
Time
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 1 bytes,年份值,YYYY
|
||||||
|
''' </summary>
|
||||||
|
Year
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,混合日期和时间值,YYYY-MM-DD HH:MM:SS
|
||||||
|
''' </summary>
|
||||||
|
Datetime
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,混合日期和时间值,时间戳,YYYYMMDD HHMMSS
|
||||||
|
''' </summary>
|
||||||
|
Timestamp
|
||||||
|
|
||||||
|
|
||||||
|
'####################字符类型###############################
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,定长字符串
|
||||||
|
''' </summary>
|
||||||
|
[Char]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65535 bytes,变长字符串
|
||||||
|
''' </summary>
|
||||||
|
Varchar
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,不超过 255 个字符的二进制字符串
|
||||||
|
''' </summary>
|
||||||
|
Tinyblob
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,短文本字符串
|
||||||
|
''' </summary>
|
||||||
|
Tinytext
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65 535 bytes,二进制形式的长文本数据
|
||||||
|
''' </summary>
|
||||||
|
Blob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65 535 bytes,长文本数据
|
||||||
|
''' </summary>
|
||||||
|
Text
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-16 777 215 bytes,二进制形式的中等长度文本数据
|
||||||
|
''' </summary>
|
||||||
|
Mediumblob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-16 777 215 bytes,中等长度文本数据
|
||||||
|
''' </summary>
|
||||||
|
Mediumtext
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-4 294 967 295 bytes,二进制形式的极大文本数据
|
||||||
|
''' </summary>
|
||||||
|
Longblob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-4 294 967 295 bytes,极大文本数据
|
||||||
|
''' </summary>
|
||||||
|
Longtext
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColumnName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Value() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 默认值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DefaultValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataType() As DataTypeEnum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型长度
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataTypeLength() As Integer
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型是否带符号
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsUnsigned() As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否允许为空
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsNull() As Boolean = True
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否自动增长
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsAutoIncrement() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为主键
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsPrimaryKey() As Boolean
|
||||||
|
|
||||||
|
Public Function ToAddColString() As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"`{ColumnName}`")
|
||||||
|
|
||||||
|
Select Case DataType
|
||||||
|
Case DataTypeEnum.Varchar,DataTypeEnum.[Char]
|
||||||
|
sb.Append($" {DataType}({DataTypeLength}) ")
|
||||||
|
Case DataTypeEnum.Int
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
if IsUnsigned Then sb.Append($" Unsigned")
|
||||||
|
If IsAutoIncrement Then sb.Append($" AUTO_INCREMENT")
|
||||||
|
Case Else
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
sb.Append(IIf(IsNull, " Default Null", " Not Null"))
|
||||||
|
|
||||||
|
If IsPrimaryKey Then
|
||||||
|
sb.Append($" PRIMARY KEY")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
13
Database/Mysql/MysqlCmdHelper.vb
Normal file
13
Database/Mysql/MysqlCmdHelper.vb
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Mysql
|
||||||
|
Public Class MysqlCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New
|
||||||
|
FiledSuffix = "`"c
|
||||||
|
FiledPrefix = "`"c
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
9
Database/MysqlCmdHelper.vb
Normal file
9
Database/MysqlCmdHelper.vb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Public Class MysqlCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
FiledSuffix = "`"c
|
||||||
|
FiledPrefix = "`"c
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
220
Database/MysqlDataParam.vb
Normal file
220
Database/MysqlDataParam.vb
Normal file
@@ -0,0 +1,220 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Public Class MysqlDataParam
|
||||||
|
Enum DataTypeEnum
|
||||||
|
'###############################数值类型#############################
|
||||||
|
''' <summary>
|
||||||
|
''' 1 byte,小整数值
|
||||||
|
''' </summary>
|
||||||
|
Tinyint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 2 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Smallint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Mediumint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
Int
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,大整数值
|
||||||
|
''' </summary>
|
||||||
|
[Integer]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,极大整数值
|
||||||
|
''' </summary>
|
||||||
|
Bigint
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,单精度浮点数值
|
||||||
|
''' </summary>
|
||||||
|
Float
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,双精度浮点数值
|
||||||
|
''' </summary>
|
||||||
|
[Double]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'####################日期类型###############################
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 对DECIMAL(M,D) ,如果M>D,为M+2否则为D+2.小数值
|
||||||
|
''' </summary>
|
||||||
|
[Decimal]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,日期值,YYYY-MM-DD
|
||||||
|
''' </summary>
|
||||||
|
[Date]
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 3 bytes,时间值或持续时间,HH:MM:SS
|
||||||
|
''' </summary>
|
||||||
|
Time
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 1 bytes,年份值,YYYY
|
||||||
|
''' </summary>
|
||||||
|
Year
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 8 bytes,混合日期和时间值,YYYY-MM-DD HH:MM:SS
|
||||||
|
''' </summary>
|
||||||
|
Datetime
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 4 bytes,混合日期和时间值,时间戳,YYYYMMDD HHMMSS
|
||||||
|
''' </summary>
|
||||||
|
Timestamp
|
||||||
|
|
||||||
|
|
||||||
|
'####################字符类型###############################
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,定长字符串
|
||||||
|
''' </summary>
|
||||||
|
[Char]
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65535 bytes,变长字符串
|
||||||
|
''' </summary>
|
||||||
|
Varchar
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,不超过 255 个字符的二进制字符串
|
||||||
|
''' </summary>
|
||||||
|
Tinyblob
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-255 bytes,短文本字符串
|
||||||
|
''' </summary>
|
||||||
|
Tinytext
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65 535 bytes,二进制形式的长文本数据
|
||||||
|
''' </summary>
|
||||||
|
Blob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-65 535 bytes,长文本数据
|
||||||
|
''' </summary>
|
||||||
|
Text
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-16 777 215 bytes,二进制形式的中等长度文本数据
|
||||||
|
''' </summary>
|
||||||
|
Mediumblob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-16 777 215 bytes,中等长度文本数据
|
||||||
|
''' </summary>
|
||||||
|
Mediumtext
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-4 294 967 295 bytes,二进制形式的极大文本数据
|
||||||
|
''' </summary>
|
||||||
|
Longblob
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 0-4 294 967 295 bytes,极大文本数据
|
||||||
|
''' </summary>
|
||||||
|
Longtext
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColumnName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Value() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 默认值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DefaultValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataType() As DataTypeEnum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型长度
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataTypeLength() As Integer
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型是否带符号
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsUnsigned() As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否允许为空
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsNull() As Boolean = True
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否自动增长
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsAutoIncrement() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为主键
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsPrimaryKey() As Boolean
|
||||||
|
|
||||||
|
Public Function ToAddColString() As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"`{ColumnName}`")
|
||||||
|
|
||||||
|
Select Case DataType
|
||||||
|
Case DataTypeEnum.Varchar, DataTypeEnum.[Char]
|
||||||
|
sb.Append($" {DataType}({DataTypeLength}) ")
|
||||||
|
Case DataTypeEnum.Int
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
If IsUnsigned Then sb.Append($" Unsigned")
|
||||||
|
If IsAutoIncrement Then sb.Append($" AUTO_INCREMENT")
|
||||||
|
Case Else
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
sb.Append(IIf(IsNull, " Default Null", " Not Null"))
|
||||||
|
|
||||||
|
If IsPrimaryKey Then
|
||||||
|
sb.Append($" PRIMARY KEY")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
106
Database/Sqlite/DataParam.vb
Normal file
106
Database/Sqlite/DataParam.vb
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
Namespace Database.Sqlite
|
||||||
|
Public Class DataParam
|
||||||
|
Enum DataTypeEnum
|
||||||
|
Varchar
|
||||||
|
Nchar
|
||||||
|
Blob
|
||||||
|
Bit
|
||||||
|
Datetime
|
||||||
|
[Decimal]
|
||||||
|
Real
|
||||||
|
UniqueIdentifier
|
||||||
|
Int
|
||||||
|
[Integer]
|
||||||
|
TinyInt
|
||||||
|
[Single]
|
||||||
|
Nvarchar
|
||||||
|
SmallInt
|
||||||
|
SmallUint
|
||||||
|
Uint
|
||||||
|
UnsignedInteger
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColumnName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Value() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 默认值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DefaultValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataType() As DataTypeEnum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型长度
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataTypeLength() As Integer
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否允许为空
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsNull() As Boolean = True
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否自动增长
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsAutoIncrement() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为主键
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsPrimaryKey() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为唯一值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsUnique() As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ToAddColString() As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"`{ColumnName}`")
|
||||||
|
|
||||||
|
Select Case DataType
|
||||||
|
Case DataTypeEnum.Varchar, DataTypeEnum.Nchar, DataTypeEnum.Nvarchar
|
||||||
|
sb.Append($" {DataType}({DataTypeLength}) ")
|
||||||
|
Case DataTypeEnum.Int,DataTypeEnum.Integer
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
Case Else
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If IsAutoIncrement Then sb.Append($" AUTOINCREMENT")
|
||||||
|
|
||||||
|
sb.Append(IIf(IsNull, " Default Null", " Not Null"))
|
||||||
|
|
||||||
|
If IsPrimaryKey Then
|
||||||
|
sb.Append($" PRIMARY KEY")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
20
Database/Sqlite/SqliteCmdHelper.vb
Normal file
20
Database/Sqlite/SqliteCmdHelper.vb
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
Namespace Database.Sqlite
|
||||||
|
Public Class SqliteCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
FiledSuffix = "["c
|
||||||
|
FiledPrefix = "]"c
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表的信息
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overrides Function SearchTableInfo(tableName As String) As String
|
||||||
|
Return $"select * from sqlite_master where tbl_name = '{tableName}';"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
19
Database/SqliteCmdHelper.vb
Normal file
19
Database/SqliteCmdHelper.vb
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
Public Class SqliteCmdHelper
|
||||||
|
Inherits DbCmdHelper
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
FiledSuffix = "["c
|
||||||
|
FiledPrefix = "]"c
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 查询指定数据表的信息
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="tableName"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Overrides Function SearchTableInfo(tableName As String) As String
|
||||||
|
Return $"select * from sqlite_master where tbl_name = '{tableName}';"
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
105
Database/SqliteDataParam.vb
Normal file
105
Database/SqliteDataParam.vb
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
Imports System.Text
|
||||||
|
|
||||||
|
|
||||||
|
Public Class SqliteDataParam
|
||||||
|
Enum DataTypeEnum
|
||||||
|
Varchar
|
||||||
|
Nchar
|
||||||
|
Blob
|
||||||
|
Bit
|
||||||
|
Datetime
|
||||||
|
[Decimal]
|
||||||
|
Real
|
||||||
|
UniqueIdentifier
|
||||||
|
Int
|
||||||
|
[Integer]
|
||||||
|
TinyInt
|
||||||
|
[Single]
|
||||||
|
Nvarchar
|
||||||
|
SmallInt
|
||||||
|
SmallUint
|
||||||
|
Uint
|
||||||
|
UnsignedInteger
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 列名
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ColumnName() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 当前值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property Value() As String
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 默认值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DefaultValue() As String
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataType() As DataTypeEnum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 数据类型长度
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property DataTypeLength() As Integer
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否允许为空
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsNull() As Boolean = True
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否自动增长
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsAutoIncrement() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为主键
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsPrimaryKey() As Boolean
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 是否为唯一值
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property IsUnique() As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ToAddColString() As String
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
sb.Append($"`{ColumnName}`")
|
||||||
|
|
||||||
|
Select Case DataType
|
||||||
|
Case DataTypeEnum.Varchar, DataTypeEnum.Nchar, DataTypeEnum.Nvarchar
|
||||||
|
sb.Append($" {DataType}({DataTypeLength}) ")
|
||||||
|
Case DataTypeEnum.Int, DataTypeEnum.Integer
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
Case Else
|
||||||
|
sb.Append($" {DataType}")
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If IsAutoIncrement Then sb.Append($" AUTOINCREMENT")
|
||||||
|
|
||||||
|
sb.Append(IIf(IsNull, " Default Null", " Not Null"))
|
||||||
|
|
||||||
|
If IsPrimaryKey Then
|
||||||
|
sb.Append($" PRIMARY KEY")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sb.ToString()
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
38
My Project/Application.Designer.vb
generated
Normal file
38
My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||||
|
' or if you encounter build errors in this file, go to the Project Designer
|
||||||
|
' (go to Project Properties or double-click the My Project node in
|
||||||
|
' Solution Explorer), and make changes on the Application tab.
|
||||||
|
'
|
||||||
|
Partial Friend Class MyApplication
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Public Sub New()
|
||||||
|
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||||
|
Me.IsSingleInstance = false
|
||||||
|
Me.EnableVisualStyles = true
|
||||||
|
Me.SaveMySettingsOnExit = true
|
||||||
|
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
|
Protected Overrides Sub OnCreateMainForm()
|
||||||
|
Me.MainForm = Global.Telephone.Telephone
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
11
My Project/Application.myapp
Normal file
11
My Project/Application.myapp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<MySubMain>true</MySubMain>
|
||||||
|
<MainForm>Form1</MainForm>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<ApplicationType>0</ApplicationType>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
35
My Project/AssemblyInfo.vb
Normal file
35
My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' 有关程序集的一般信息由以下
|
||||||
|
' 控制。更改这些特性值可修改
|
||||||
|
' 与程序集关联的信息。
|
||||||
|
|
||||||
|
'查看程序集特性的值
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("Telephone")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("")>
|
||||||
|
<Assembly: AssemblyProduct("Telephone")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2025")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||||
|
<Assembly: Guid("79aa05d0-98d0-4ac5-8d00-ad5d73fed46b")>
|
||||||
|
|
||||||
|
' 程序集的版本信息由下列四个值组成:
|
||||||
|
'
|
||||||
|
' 主版本
|
||||||
|
' 次版本
|
||||||
|
' 生成号
|
||||||
|
' 修订号
|
||||||
|
'
|
||||||
|
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||||
|
'通过使用 "*",如下所示:
|
||||||
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.0.0.3")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.3")>
|
||||||
62
My Project/Resources.Designer.vb
generated
Normal file
62
My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' This code was generated by a tool.
|
||||||
|
' Runtime Version:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
' the code is regenerated.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
|
'class via a tool like ResGen or Visual Studio.
|
||||||
|
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
|
'with the /str option, or rebuild your VS project.
|
||||||
|
'''<summary>
|
||||||
|
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
Friend Module Resources
|
||||||
|
|
||||||
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Returns the cached ResourceManager instance used by this class.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
|
Get
|
||||||
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
|
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("Telephone.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Overrides the current thread's CurrentUICulture property for all
|
||||||
|
''' resource lookups using this strongly typed resource class.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
My Project/Resources.resx
Normal file
117
My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?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.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="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</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" 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>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
157
My Project/Settings.Designer.vb
generated
Normal file
157
My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 此代码由工具生成。
|
||||||
|
' 运行时版本:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||||
|
' 重新生成代码,这些更改将会丢失。
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
|
#Region "My.Settings 自动保存功能"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||||
|
Public Property SerialPortName() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("SerialPortName"),String)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("SerialPortName") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("9600")> _
|
||||||
|
Public Property BaudRate() As Integer
|
||||||
|
Get
|
||||||
|
Return CType(Me("BaudRate"),Integer)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("BaudRate") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||||
|
Public Property GTable() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("GTable"),String)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("GTable") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("0")> _
|
||||||
|
Public Property TWide() As Integer
|
||||||
|
Get
|
||||||
|
Return CType(Me("TWide"),Integer)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("TWide") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("0")> _
|
||||||
|
Public Property THigh() As Integer
|
||||||
|
Get
|
||||||
|
Return CType(Me("THigh"),Integer)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("THigh") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||||
|
Public Property G_Subscribe() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("G_Subscribe"),String)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("G_Subscribe") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||||
|
Public Property G_Publish() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("G_Publish"),String)
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
Me("G_Publish") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.Telephone.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.Telephone.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
27
My Project/Settings.settings
Normal file
27
My Project/Settings.settings
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="SerialPortName" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="BaudRate" Type="System.Int32" Scope="User">
|
||||||
|
<Value Profile="(Default)">9600</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="GTable" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="TWide" Type="System.Int32" Scope="User">
|
||||||
|
<Value Profile="(Default)">0</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="THigh" Type="System.Int32" Scope="User">
|
||||||
|
<Value Profile="(Default)">0</Value>
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="G_Subscribe" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
<Setting Name="G_Publish" Type="System.String" Scope="User">
|
||||||
|
<Value Profile="(Default)" />
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
370
PhoneBurstification.vb
Normal file
370
PhoneBurstification.vb
Normal file
@@ -0,0 +1,370 @@
|
|||||||
|
|
||||||
|
|
||||||
|
Imports Telephone.PhoneBurstification
|
||||||
|
|
||||||
|
Public Class PhoneBurstification
|
||||||
|
|
||||||
|
Enum PhoneBuffType
|
||||||
|
'拨打电话
|
||||||
|
CallPhone = 1
|
||||||
|
'发送短信
|
||||||
|
SendSMS = 2
|
||||||
|
'打电话并播放预定内容 = 3
|
||||||
|
CallPhoneAndPlay = 3
|
||||||
|
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Enum comdType
|
||||||
|
'拨打电话
|
||||||
|
comdCallPhone = 1
|
||||||
|
'发送短信
|
||||||
|
comdSendSMS = 2
|
||||||
|
'打电话并播放预定内容 = 3
|
||||||
|
comdCallPhoneAndPlay = 3
|
||||||
|
'CDTAM 设置TTS模式 1远程0本地
|
||||||
|
comdCDTAM
|
||||||
|
'
|
||||||
|
comdCMGF
|
||||||
|
comdCMGS
|
||||||
|
comdmsg
|
||||||
|
comd1A
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
'''
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="PhoneBuffType"> 操作类型 </param>
|
||||||
|
''' <param name="PhoneNum"> 电话号码 </param>
|
||||||
|
''' <param name="PhoneBuffContent"> 内容 </param>
|
||||||
|
Public Shared Function PhoneBurstification(ByVal PhoneBuffType As PhoneBuffType, callnode As CallInfoNode) As List(Of SendBuffnode)
|
||||||
|
If callnode Is Nothing Then Return Nothing
|
||||||
|
Dim PhoneBuffList As New List(Of SendBuffnode)
|
||||||
|
Select Case PhoneBuffType
|
||||||
|
Case PhoneBuffType.CallPhone
|
||||||
|
PhoneBuffList = CallPhone(callnode)
|
||||||
|
Case PhoneBuffType.SendSMS
|
||||||
|
PhoneBuffList = SendSMS(callnode)
|
||||||
|
Case PhoneBuffType.CallPhoneAndPlay
|
||||||
|
PhoneBuffList = CallPhoneAndPlay(callnode)
|
||||||
|
End Select
|
||||||
|
Return PhoneBuffList
|
||||||
|
End Function
|
||||||
|
''' <summary>
|
||||||
|
''' 拨打电话
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="callnode"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Shared Function CallPhone(callnode As CallInfoNode) As List(Of SendBuffnode)
|
||||||
|
Dim PhoneBuffList As New List(Of SendBuffnode)
|
||||||
|
Dim buff As String = $"{callnode.PhoneNumber};{vbCrLf}"
|
||||||
|
Dim SendBuffNode As New SendBuffnode(comdType.comdCallPhone, buff, 1000, 1, 100, 30000, True)
|
||||||
|
PhoneBuffList.Add(SendBuffNode)
|
||||||
|
Return PhoneBuffList
|
||||||
|
End Function
|
||||||
|
''' <summary>
|
||||||
|
''' 发送短信
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="callnode"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Shared Function SendSMS(callnode As CallInfoNode) As List(Of SendBuffnode)
|
||||||
|
Dim PhoneBuffList As New List(Of SendBuffnode)
|
||||||
|
'打电话
|
||||||
|
Dim content As String
|
||||||
|
Dim buff As String
|
||||||
|
Dim SendBuffNode As SendBuffnode
|
||||||
|
buff = $"AT+CMGF = 0{vbCrLf}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comdCMGF, buff, 1000, 1, 100, 2000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffnode)
|
||||||
|
|
||||||
|
content = GetSendSMSContent(callnode)
|
||||||
|
Dim len As Integer = (content.Length \ 2) - 1
|
||||||
|
|
||||||
|
buff = $"AT+CMGS = {len.ToString()}{vbCrLf}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comdCMGS, buff, 1000, 1, 100, 2000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffnode)
|
||||||
|
|
||||||
|
buff = $"{content}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comdmsg, buff, 1000, 1, 100, 2000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffnode)
|
||||||
|
|
||||||
|
buff = $"{Chr(26)}{vbCrLf}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comd1A, buff, 1000, 1, 100, 2000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffNode)
|
||||||
|
Return PhoneBuffList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CallPhoneAndPlay(callnode As CallInfoNode) As List(Of SendBuffnode)
|
||||||
|
Dim PhoneBuffList As New List(Of SendBuffnode)
|
||||||
|
'打电话
|
||||||
|
Dim content As String
|
||||||
|
Dim buff As String = $"ATD{callnode.PhoneNumber};{vbCrLf}"
|
||||||
|
Dim SendBuffNode As New SendBuffnode(comdType.comdCallPhone, buff, 1000, 1, 100, 60000, True)
|
||||||
|
PhoneBuffList.Add(SendBuffNode)
|
||||||
|
'CDTAM 设置TTS模式 1远程0本地
|
||||||
|
buff = $"AT+CDTAM=1{vbCrLf}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comdCDTAM, buff, 1000, 1, 100, 1000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffNode)
|
||||||
|
'播放内容
|
||||||
|
buff = $"AT+CTTS=2,{callnode.Content}{vbCrLf}"
|
||||||
|
SendBuffNode = New SendBuffnode(comdType.comdCallPhoneAndPlay, buff, 1000, 1, 100, 60000, False)
|
||||||
|
PhoneBuffList.Add(SendBuffNode)
|
||||||
|
|
||||||
|
'发送短信
|
||||||
|
|
||||||
|
|
||||||
|
'buff = $"AT+CMGF = 0{vbCrLf}"
|
||||||
|
'SendBuffNode = New SendBuffnode(comdType.comdCMGF, buff, 1000, 1, 100, 1000, False)
|
||||||
|
'PhoneBuffList.Add(SendBuffNode)
|
||||||
|
|
||||||
|
'content = GetSendSMSContent(callnode)
|
||||||
|
'Dim len As Integer = (content.Length \ 2) - 1
|
||||||
|
|
||||||
|
'buff = $"AT+CMGS = {len.ToString()}{vbCrLf}"
|
||||||
|
'SendBuffNode = New SendBuffnode(comdType.comdCMGS, buff, 1000, 1, 100, 1000, False)
|
||||||
|
'PhoneBuffList.Add(SendBuffNode)
|
||||||
|
|
||||||
|
'buff = $"{content}"
|
||||||
|
'SendBuffNode = New SendBuffnode(comdType.comdmsg, buff, 1000, 1, 100, 1000, False)
|
||||||
|
'PhoneBuffList.Add(SendBuffNode)
|
||||||
|
|
||||||
|
'buff = $"{Chr(26)}{vbCrLf}"
|
||||||
|
'SendBuffNode = New SendBuffnode(comdType.comd1A, buff, 1000, 1, 100, 1000, False)
|
||||||
|
'PhoneBuffList.Add(SendBuffNode)
|
||||||
|
|
||||||
|
Return PhoneBuffList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'获取短信发送内容
|
||||||
|
Public Shared Function GetSendSMSContent(callnode As CallInfoNode) As String
|
||||||
|
Dim result As String = ""
|
||||||
|
Dim munberstr As String = publicMode.SwapAndPad(callnode.PhoneNumber)
|
||||||
|
Dim content As String = publicMode.ConvertToUnicode(callnode.Content)
|
||||||
|
Dim len As Integer = content.Length \ 2
|
||||||
|
'将len转换成16进制字符串
|
||||||
|
Dim lenstr As String = len.ToString("X2")
|
||||||
|
result = $"0011000D9168{munberstr}0008C4{lenstr}{content}"
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class SendBuffnode
|
||||||
|
'命令类型
|
||||||
|
Public CommandType As Integer
|
||||||
|
|
||||||
|
'发送数据
|
||||||
|
Public SendData As String
|
||||||
|
'发送时间
|
||||||
|
Public SendTime As DateTime
|
||||||
|
'发送次数
|
||||||
|
Public SendCount As Integer
|
||||||
|
'发送状态
|
||||||
|
Public SendStatus As Boolean
|
||||||
|
'发送超时
|
||||||
|
Public SendTimeout As Integer
|
||||||
|
'当前发送次数
|
||||||
|
Public SendCurrentCount As Integer
|
||||||
|
'发送间隔
|
||||||
|
Public SendInterval As Integer
|
||||||
|
'是否需要回复
|
||||||
|
Public NeedReply As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'接收数据
|
||||||
|
Public ReceiveData As String
|
||||||
|
'接收结果
|
||||||
|
Public ReceiveResult As Boolean
|
||||||
|
'接收时间
|
||||||
|
Public ReceiveTime As DateTime
|
||||||
|
'接收次数
|
||||||
|
Public ReceiveCount As Integer
|
||||||
|
'接收状态
|
||||||
|
Public ReceiveStatus As Boolean
|
||||||
|
'接收超时
|
||||||
|
Public ReceiveTimeout As Integer
|
||||||
|
|
||||||
|
Enum SendStatustype
|
||||||
|
'待发送
|
||||||
|
WaitSend = 0
|
||||||
|
'已经发送等待回复
|
||||||
|
Sending
|
||||||
|
'重发数据
|
||||||
|
Resend
|
||||||
|
'发送超时
|
||||||
|
SendTimeout
|
||||||
|
'接收成功
|
||||||
|
ReceiveSuccess
|
||||||
|
'接收超时
|
||||||
|
ReceiveTimeout
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
'''
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Data"></param>
|
||||||
|
''' <param name="Timeout"></param>
|
||||||
|
''' <param name="SendCount"></param>
|
||||||
|
''' <param name="nSendInterval"></param>
|
||||||
|
Sub New(condtype As Integer, Data As String, Optional Timeout As Integer = 300, Optional nSendCount As Integer = 1, Optional nSendInterval As Integer = 100, Optional nReceiveTimeout As Integer = 300, Optional nNeedReply As Boolean = True)
|
||||||
|
CommandType = condtype
|
||||||
|
SendData = Data
|
||||||
|
'SendTime = Now
|
||||||
|
SendStatus = 0
|
||||||
|
SendCount = nSendCount
|
||||||
|
SendTimeout = Timeout
|
||||||
|
SendCurrentCount = 0
|
||||||
|
SendInterval = nSendInterval
|
||||||
|
ReceiveStatus = 0
|
||||||
|
ReceiveTimeout = nReceiveTimeout
|
||||||
|
End Sub
|
||||||
|
Public Function ReceiveStatusStateMachine(bode As SendBuffnode, voice As Byte()) As Boolean
|
||||||
|
'判断发送状态是否处于
|
||||||
|
If bode.SendStatus = 0 Then Return False
|
||||||
|
Dim readstr As String = publicMode.ByteToString(voice)
|
||||||
|
Select Case bode.CommandType
|
||||||
|
Case comdType.comdCallPhone
|
||||||
|
If readstr.Contains("VOICE CALL: END") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = False
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
If readstr.Contains("VOICE CALL: BEGIN") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case comdType.comdCDTAM
|
||||||
|
If readstr.Contains("OK") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case comdType.comdCallPhoneAndPlay
|
||||||
|
If readstr.Contains("VOICE CALL: END") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = False
|
||||||
|
bode.SendStatus = 0
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If readstr.Contains("OK") OrElse readstr.Contains("ERROR") OrElse readstr.Contains("AT+CTTS") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Case comdType.comdCMGF, comdType.comd1A
|
||||||
|
If readstr.Contains("OK") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Case comdType.comdCMGS
|
||||||
|
If readstr.Contains("AT+CMGS =") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Case comdType.comdmsg
|
||||||
|
If bode.SendData.Contains(readstr) Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Case comdType.comdmsg
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
If readstr.Contains("OK") Then
|
||||||
|
bode.ReceiveStatus = 1
|
||||||
|
bode.ReceiveData = readstr
|
||||||
|
bode.ReceiveResult = True
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'判断接收是否超时
|
||||||
|
Public Function IsNodeReceiveTimeout(bode As SendBuffnode) As Boolean
|
||||||
|
'判断接收是否超时
|
||||||
|
If bode.SendTime.AddMilliseconds(ReceiveTimeout) > Now Then
|
||||||
|
'判断接收是否成功
|
||||||
|
'If bode.ReceiveStatus = 1 Then
|
||||||
|
' Return False
|
||||||
|
'Else
|
||||||
|
|
||||||
|
Return True
|
||||||
|
'End If
|
||||||
|
Else
|
||||||
|
If bode.ReceiveStatus = True Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function IsNodeReceiveTimeout2(bode As SendBuffnode) As Boolean
|
||||||
|
'判断接收是否超时
|
||||||
|
If bode.SendTime.AddMilliseconds(ReceiveTimeout) > Now Then
|
||||||
|
'判断接收是否成功
|
||||||
|
'If bode.ReceiveStatus = 1 Then
|
||||||
|
' Return False
|
||||||
|
'Else
|
||||||
|
|
||||||
|
Return True
|
||||||
|
'End If
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
'设置发送状态
|
||||||
|
Public Shared Function SetSendStatus(bode As SendBuffnode, Status As SendStatustype) As SendBuffnode
|
||||||
|
Select Case Status
|
||||||
|
Case SendStatustype.WaitSend
|
||||||
|
bode.SendStatus = 0
|
||||||
|
Case SendStatustype.Sending
|
||||||
|
bode.SendStatus = 1
|
||||||
|
bode.SendTime = Now
|
||||||
|
bode.SendCurrentCount = bode.SendCurrentCount + 1
|
||||||
|
Case SendStatustype.Resend
|
||||||
|
bode.SendStatus = 2
|
||||||
|
bode.SendTime = Now
|
||||||
|
bode.SendCurrentCount = bode.SendCurrentCount + 1
|
||||||
|
bode.ReceiveResult = 0
|
||||||
|
bode.ReceiveData = ""
|
||||||
|
bode.ReceiveResult = False
|
||||||
|
Case SendStatustype.ReceiveSuccess
|
||||||
|
bode.SendStatus = 4
|
||||||
|
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
158
Redis/RedisSubscriber.vb
Normal file
158
Redis/RedisSubscriber.vb
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
Imports StackExchange.Redis
|
||||||
|
|
||||||
|
|
||||||
|
''这段代码提供了一个完整的 Redis 订阅实现,包含以下功能:
|
||||||
|
|
||||||
|
''通过构造函数初始化 Redis 连接
|
||||||
|
''订阅指定频道并处理接收到的消息
|
||||||
|
''取消订阅功能
|
||||||
|
''关闭连接功能
|
||||||
|
''使用示例
|
||||||
|
''你可以根据需要修改 messageHandler 来自定义消息处理逻辑。这个实现使用了异步回调来处理接收到的消息,确保不会阻塞主线程。
|
||||||
|
|
||||||
|
''记得在使用前替换 connectionString 为你的 Redis 服务器地址。如果你的 Redis 服务器设置了密码,连接字符串应该类似这样:localhost : 6379,password=yourpassword。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'Public Class RedisSubscriber
|
||||||
|
' Private ReadOnly connection As ConnectionMultiplexer
|
||||||
|
' Private ReadOnly db As IDatabase
|
||||||
|
|
||||||
|
' ' 构造函数,初始化 Redis 连接
|
||||||
|
' Public Sub New(ByVal connectionString As String)
|
||||||
|
' connection = ConnectionMultiplexer.Connect(connectionString)
|
||||||
|
' db = connection.GetDatabase()
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' ' 订阅频道并处理消息
|
||||||
|
' Public Sub SubscribeToChannel(ByVal channelName As String, ByVal messageHandler As Action(Of RedisChannel, RedisValue))
|
||||||
|
' ' 创建订阅者
|
||||||
|
' Dim subscriber = connection.GetSubscriber()
|
||||||
|
|
||||||
|
' ' 订阅频道并指定消息处理程序
|
||||||
|
' subscriber.Subscribe(channelName, Function(channel, message) As Task
|
||||||
|
' messageHandler(channel, message)
|
||||||
|
' Return Task.CompletedTask
|
||||||
|
' End Function)
|
||||||
|
|
||||||
|
' Console.WriteLine($"已订阅频道: {channelName}")
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' ' 取消订阅
|
||||||
|
' Public Sub UnsubscribeFromChannel(ByVal channelName As String)
|
||||||
|
' Dim subscriber = connection.GetSubscriber()
|
||||||
|
' subscriber.Unsubscribe(channelName)
|
||||||
|
' Console.WriteLine($"已取消订阅频道: {channelName}")
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' ' 关闭连接
|
||||||
|
' Public Sub CloseConnection()
|
||||||
|
' connection.Close()
|
||||||
|
' End Sub
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
'' 使用示例
|
||||||
|
'Public Class Program
|
||||||
|
' Public Shared Sub Main()
|
||||||
|
' ' 替换为你的 Redis 连接字符串
|
||||||
|
' Dim connectionString = "localhost:6379"
|
||||||
|
' Dim subscriber = New RedisSubscriber(connectionString)
|
||||||
|
|
||||||
|
' ' 定义消息处理程序
|
||||||
|
' Dim messageHandler As Action(Of RedisChannel, RedisValue) = Sub(channel, message)
|
||||||
|
' Console.WriteLine($"接收到来自 {channel} 的消息: {message}")
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' ' 订阅频道
|
||||||
|
' subscriber.SubscribeToChannel("testChannel", messageHandler)
|
||||||
|
|
||||||
|
' ' 保持程序运行以接收消息
|
||||||
|
' Console.WriteLine("按任意键退出...")
|
||||||
|
' Console.ReadKey()
|
||||||
|
|
||||||
|
' ' 取消订阅并关闭连接
|
||||||
|
' subscriber.UnsubscribeFromChannel("testChannel")
|
||||||
|
' subscriber.CloseConnection()
|
||||||
|
' End Sub
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
|
||||||
|
'这个实现添加了以下功能:
|
||||||
|
|
||||||
|
'发布消息功能:
|
||||||
|
|
||||||
|
'PublishMessage 方法允许你向指定频道发布消息
|
||||||
|
'返回值表示有多少个订阅者接收到了这条消息
|
||||||
|
'完整的发布/ 订阅功能
|
||||||
|
|
||||||
|
'保留了之前的订阅功能
|
||||||
|
'将发布和订阅功能整合到一个类中
|
||||||
|
'使用示例:
|
||||||
|
|
||||||
|
'展示了如何发布消息
|
||||||
|
'展示了如何订阅频道并接收消息
|
||||||
|
'展示了完整的初始化和清理流程
|
||||||
|
'你可以通过以下方式使用这个类:
|
||||||
|
|
||||||
|
'创建 RedisPubSub 实例,传入 Redis 连接字符串
|
||||||
|
'使用 PublishMessage 发布消息到频道
|
||||||
|
'使用 SubscribeToChannel 订阅频道并处理消息
|
||||||
|
'使用 UnsubscribeFromChannel 取消订阅
|
||||||
|
'使用 CloseConnection 关闭连接
|
||||||
|
'这个实现是线程安全的, 适合在多线程环境中使用。如果你的 Redis 服务器需要密码, 确保在连接字符串中包含密码信息, 例如: localhost : 6379,password=yourpassword。
|
||||||
|
|
||||||
|
|
||||||
|
Public Class RedisSubscriber
|
||||||
|
Private ReadOnly connection As ConnectionMultiplexer
|
||||||
|
Private ReadOnly db As IDatabase
|
||||||
|
Private ReadOnly subscriber As ISubscriber
|
||||||
|
|
||||||
|
' 构造函数,初始化 Redis 连接
|
||||||
|
Public Sub New(ByVal connectionString As String)
|
||||||
|
connection = ConnectionMultiplexer.Connect(connectionString)
|
||||||
|
db = connection.GetDatabase()
|
||||||
|
subscriber = connection.GetSubscriber()
|
||||||
|
End Sub
|
||||||
|
' Public Sub New(ByVal connectionString As String)
|
||||||
|
' connection = ConnectionMultiplexer.Connect(connectionString)
|
||||||
|
' db = connection.GetDatabase()
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' 发布消息到指定频道
|
||||||
|
Public Function PublishMessage(ByVal channelName As String, ByVal message As String) As Long
|
||||||
|
Dim result = subscriber.Publish(channelName, message)
|
||||||
|
Console.WriteLine($"已发布消息到 {channelName}: {message}, 被订阅者接收次数: {result}")
|
||||||
|
Return result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' 订阅频道并处理消息
|
||||||
|
Public Sub SubscribeToChannel(ByVal channelName As String, ByVal messageHandler As Action(Of RedisChannel, RedisValue))
|
||||||
|
subscriber.Subscribe(channelName, Function(channel, message) As Task
|
||||||
|
messageHandler(channel, message)
|
||||||
|
Return Task.CompletedTask
|
||||||
|
End Function)
|
||||||
|
Console.WriteLine($"已订阅频道: {channelName}")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' 取消订阅
|
||||||
|
Public Sub UnsubscribeFromChannel(ByVal channelName As String)
|
||||||
|
subscriber.Unsubscribe(channelName)
|
||||||
|
Console.WriteLine($"已取消订阅频道: {channelName}")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' 关闭连接
|
||||||
|
Public Sub CloseConnection()
|
||||||
|
connection.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'判断是否连接
|
||||||
|
Public Function IsConnected() As Boolean
|
||||||
|
Return connection.IsConnected
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
266
RuningLog.vb
Normal file
266
RuningLog.vb
Normal file
@@ -0,0 +1,266 @@
|
|||||||
|
Imports System.Threading
|
||||||
|
|
||||||
|
Public Class RuningLog
|
||||||
|
|
||||||
|
Enum LogType
|
||||||
|
e_none
|
||||||
|
e_info
|
||||||
|
e_Error
|
||||||
|
e_warning
|
||||||
|
|
||||||
|
End Enum
|
||||||
|
Enum LogMode
|
||||||
|
''' <summary>
|
||||||
|
''' 文本
|
||||||
|
''' </summary>
|
||||||
|
e_file
|
||||||
|
''' <summary>
|
||||||
|
''' 控制台
|
||||||
|
''' </summary>
|
||||||
|
e_console
|
||||||
|
''' <summary>
|
||||||
|
''' 文本框
|
||||||
|
''' </summary>
|
||||||
|
e_RichTextBox
|
||||||
|
''' <summary>
|
||||||
|
''' 文件和控制台
|
||||||
|
''' </summary>
|
||||||
|
e_fileandconsole
|
||||||
|
''' <summary>
|
||||||
|
''' 文件和文本框
|
||||||
|
''' </summary>
|
||||||
|
e_fileandRichTextBox
|
||||||
|
''' <summary>
|
||||||
|
''' 控制台和文本框
|
||||||
|
''' </summary>
|
||||||
|
e_consoleandRichTextBox
|
||||||
|
''' <summary>
|
||||||
|
''' 文件、控制台和文本框
|
||||||
|
''' </summary>
|
||||||
|
e_both
|
||||||
|
|
||||||
|
End Enum
|
||||||
|
''' <summary>
|
||||||
|
''' 日志显示等级
|
||||||
|
''' </summary>
|
||||||
|
Public LogLevel As Integer = 0
|
||||||
|
''' <summary>
|
||||||
|
''' 日志队列
|
||||||
|
''' </summary>
|
||||||
|
Public logQueue As New Queue(Of LogNode)
|
||||||
|
'日志输出文本框
|
||||||
|
Public RichTextBox As RichTextBox
|
||||||
|
'日志输出文件夹路径
|
||||||
|
Public LogFilePath As String
|
||||||
|
'日志输出线程
|
||||||
|
Public LogThread As Thread
|
||||||
|
Sub New(ric As RichTextBox, logFile As String)
|
||||||
|
LogFilePath = logFile
|
||||||
|
RichTextBox = ric
|
||||||
|
logQueue = New Queue(Of LogNode)
|
||||||
|
LogThread = New Thread(AddressOf LogThreadFunc)
|
||||||
|
LogThread.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub LogThreadFunc()
|
||||||
|
Dim str As LogNode
|
||||||
|
While True
|
||||||
|
If logQueue.Count > 0 Then
|
||||||
|
str = logQueue.Dequeue
|
||||||
|
|
||||||
|
'判断输出模式
|
||||||
|
Select Case str.LogMode
|
||||||
|
Case LogMode.e_file
|
||||||
|
WriteLog(str)
|
||||||
|
Case LogMode.e_console
|
||||||
|
Console.WriteLine(str.LogText)
|
||||||
|
Case LogMode.e_RichTextBox
|
||||||
|
WriteRichTextBox(str)
|
||||||
|
Case LogMode.e_fileandconsole
|
||||||
|
WriteLog(str)
|
||||||
|
Console.WriteLine(str.LogText)
|
||||||
|
Case LogMode.e_fileandRichTextBox
|
||||||
|
WriteLog(str)
|
||||||
|
WriteRichTextBox(str)
|
||||||
|
Case LogMode.e_consoleandRichTextBox
|
||||||
|
Console.WriteLine(str.LogText)
|
||||||
|
WriteRichTextBox(str)
|
||||||
|
Case LogMode.e_both
|
||||||
|
WriteLog(str)
|
||||||
|
Console.WriteLine(str.LogText)
|
||||||
|
WriteRichTextBox(str)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
Thread.Sleep(10)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'添加日志节点
|
||||||
|
Public Sub AddLogNode(node As LogNode)
|
||||||
|
logQueue.Enqueue(node)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'关闭线程
|
||||||
|
Public Sub CloseThread()
|
||||||
|
'判断线程初始化 和是否在运行
|
||||||
|
If Not IsNothing(LogThread) And LogThread.IsAlive Then
|
||||||
|
LogThread.Abort()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'写入文本框
|
||||||
|
Delegate Sub dWriteRichTextBox(node As LogNode)
|
||||||
|
Public Sub WriteRichTextBox(node As LogNode)
|
||||||
|
If IsNothing(RichTextBox) Then Return
|
||||||
|
If RichTextBox.InvokeRequired Then
|
||||||
|
RichTextBox.Invoke(New dWriteRichTextBox(AddressOf WriteRichTextBox), node)
|
||||||
|
|
||||||
|
Else
|
||||||
|
If LogLevel <= node.LogType Then
|
||||||
|
'设置文本 字体和文本颜色即字号大小并在输入框末尾追加文本并设置
|
||||||
|
Dim SelectionStart As Integer = RichTextBox.Text.Length
|
||||||
|
'写入日志
|
||||||
|
Dim logtxt As String = node.LogText & vbCrLf
|
||||||
|
'判断是否要加消息类型
|
||||||
|
If node.ShowType Then
|
||||||
|
logtxt = RuningLog.AddLogType(logtxt, node.LogType)
|
||||||
|
End If
|
||||||
|
'判断是否要加时间戳
|
||||||
|
If node.ShowTime Then
|
||||||
|
logtxt = RuningLog.AddTimeStamps(logtxt)
|
||||||
|
End If
|
||||||
|
RichTextBox.AppendText(logtxt)
|
||||||
|
'并设置颜色、字号、字体、
|
||||||
|
RichTextBox.Select(SelectionStart, logtxt.Length)
|
||||||
|
RichTextBox.SelectionColor = node.LogColor
|
||||||
|
RichTextBox.SelectionFont = node.LogFont
|
||||||
|
'设置字体大小
|
||||||
|
RichTextBox.SelectionLength = 0
|
||||||
|
|
||||||
|
'RichTextBox.SelectionFont = node.LogFont
|
||||||
|
'RichTextBox.SelectionColor = node.LogColor
|
||||||
|
'
|
||||||
|
'RichTextBox.SelectionLength = 0
|
||||||
|
'RichTextBox.SelectedText = node.LogText
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
'写入日志
|
||||||
|
Public Sub WriteLog(node As LogNode)
|
||||||
|
'判断文件夹是否存在,不存在则创建 创建失败则退出
|
||||||
|
If Not System.IO.Directory.Exists(LogFilePath) Then
|
||||||
|
System.IO.Directory.CreateDirectory(LogFilePath)
|
||||||
|
End If
|
||||||
|
'以日期为文件名
|
||||||
|
Dim fileName As String = Now.ToString("yyyy-MM-dd") & ".log"
|
||||||
|
'判断文件是否存在,不存在则创建,创建失败则退出
|
||||||
|
If Not System.IO.File.Exists(LogFilePath & "\" & fileName) Then
|
||||||
|
Try
|
||||||
|
System.IO.File.Create(LogFilePath & "\" & fileName).Dispose()
|
||||||
|
Catch ex As Exception
|
||||||
|
Return
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
'写入日志
|
||||||
|
Dim logtxt As String = node.LogText
|
||||||
|
'判断是否要加消息类型
|
||||||
|
If node.ShowType Then
|
||||||
|
logtxt = RuningLog.AddLogType(logtxt, node.LogType)
|
||||||
|
End If
|
||||||
|
'判断是否要加时间戳
|
||||||
|
If node.ShowTime Then
|
||||||
|
logtxt = RuningLog.AddTimeStamps(logtxt)
|
||||||
|
End If
|
||||||
|
|
||||||
|
System.IO.File.AppendAllText(LogFilePath & "\" & fileName, logtxt & vbCrLf)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
'字符串附加时间戳
|
||||||
|
Public Shared Function AddTimeStamps(str As String) As String
|
||||||
|
Return Now.ToString("yyyy-MM-dd HH:mm:ss:fff") & " " & str
|
||||||
|
End Function
|
||||||
|
'字符串加消息类型
|
||||||
|
Public Shared Function AddLogType(str As String, logType As LogType) As String
|
||||||
|
Select Case logType
|
||||||
|
Case LogType.e_info
|
||||||
|
Return "[Info] " & str
|
||||||
|
Case LogType.e_Error
|
||||||
|
Return "[Error] " & str
|
||||||
|
Case LogType.e_warning
|
||||||
|
Return "[Warning] " & str
|
||||||
|
Case Else
|
||||||
|
Return str
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
'日志文件节点类
|
||||||
|
Public Class LogNode
|
||||||
|
Public LogType As RuningLog.LogType
|
||||||
|
Public LogText As String
|
||||||
|
'Public InputText As String
|
||||||
|
Public LogTime As DateTime
|
||||||
|
Public LogMode As RuningLog.LogMode
|
||||||
|
'文本颜色
|
||||||
|
Public LogColor As Color
|
||||||
|
'文本字体 '文本字号
|
||||||
|
Public LogFont As Font
|
||||||
|
|
||||||
|
|
||||||
|
'是否显示时间
|
||||||
|
Public ShowTime As Boolean = True
|
||||||
|
'是否显示类型
|
||||||
|
Public ShowType As Boolean = True
|
||||||
|
|
||||||
|
Sub New(logtxt As String, nLogType As Integer, nLogMode As Integer)
|
||||||
|
LogText = logtxt
|
||||||
|
LogType = nLogType
|
||||||
|
LogMode = nLogMode
|
||||||
|
'InputText = LogText
|
||||||
|
'默认字体为宋体 字号为 18 颜色为黑色
|
||||||
|
LogFont = New Font("宋体", 9)
|
||||||
|
LogColor = Color.Black
|
||||||
|
'显示时间和类型
|
||||||
|
ShowTime = True
|
||||||
|
|
||||||
|
ShowType = True
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'设置文本颜色
|
||||||
|
Public Sub SetLogColor(color As Color)
|
||||||
|
LogColor = color
|
||||||
|
End Sub
|
||||||
|
'设置文本字体
|
||||||
|
Public Sub SetLogFont(font As Font)
|
||||||
|
LogFont = font
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'设置是否显示时间
|
||||||
|
Public Sub SetShowTime(showTime As Boolean)
|
||||||
|
showTime = showTime
|
||||||
|
' InputText = RuningLog.AddTimeStamps(LogText)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'设置是否显示类型
|
||||||
|
Public Sub SetShowType(showType As Boolean)
|
||||||
|
showType = showType
|
||||||
|
'InputText = RuningLog.AddLogType(LogText, LogType)
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
392
Telephone.Designer.vb
generated
Normal file
392
Telephone.Designer.vb
generated
Normal file
@@ -0,0 +1,392 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class Telephone
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Form 重写 Dispose,以清理组件列表。
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Windows 窗体设计器所必需的
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||||
|
'可以使用 Windows 窗体设计器修改它。
|
||||||
|
'不要使用代码编辑器修改它。
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Me.components = New System.ComponentModel.Container()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Telephone))
|
||||||
|
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||||
|
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||||
|
Me.Button4 = New System.Windows.Forms.Button()
|
||||||
|
Me.TextBox3 = New System.Windows.Forms.TextBox()
|
||||||
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
|
Me.Button3 = New System.Windows.Forms.Button()
|
||||||
|
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||||
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
|
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||||
|
Me.Button2 = New System.Windows.Forms.Button()
|
||||||
|
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
||||||
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
|
Me.Label2 = New System.Windows.Forms.Label()
|
||||||
|
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||||
|
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
|
||||||
|
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip()
|
||||||
|
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||||
|
Me.ToolStripTextBox2 = New System.Windows.Forms.ToolStripTextBox()
|
||||||
|
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel()
|
||||||
|
Me.ToolStripTextBox1 = New System.Windows.Forms.ToolStripTextBox()
|
||||||
|
Me.ToolStripButton4 = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.ToolStripButton3 = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.ToolStripButton5 = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.SerialPort1 = New System.IO.Ports.SerialPort(Me.components)
|
||||||
|
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||||
|
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||||
|
Me.SplitContainer1.SuspendLayout()
|
||||||
|
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||||
|
Me.SplitContainer2.SuspendLayout()
|
||||||
|
Me.Panel1.SuspendLayout()
|
||||||
|
Me.ToolStrip2.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'SplitContainer1
|
||||||
|
'
|
||||||
|
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.SplitContainer1.Name = "SplitContainer1"
|
||||||
|
'
|
||||||
|
'SplitContainer1.Panel1
|
||||||
|
'
|
||||||
|
Me.SplitContainer1.Panel1.Controls.Add(Me.SplitContainer2)
|
||||||
|
Me.SplitContainer1.Panel1.Controls.Add(Me.Panel1)
|
||||||
|
Me.SplitContainer1.Panel1.Controls.Add(Me.ToolStrip1)
|
||||||
|
'
|
||||||
|
'SplitContainer1.Panel2
|
||||||
|
'
|
||||||
|
Me.SplitContainer1.Panel2.Controls.Add(Me.RichTextBox1)
|
||||||
|
Me.SplitContainer1.Panel2.Controls.Add(Me.ToolStrip2)
|
||||||
|
Me.SplitContainer1.Size = New System.Drawing.Size(1162, 744)
|
||||||
|
Me.SplitContainer1.SplitterDistance = 586
|
||||||
|
Me.SplitContainer1.TabIndex = 0
|
||||||
|
'
|
||||||
|
'SplitContainer2
|
||||||
|
'
|
||||||
|
Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.SplitContainer2.Location = New System.Drawing.Point(0, 192)
|
||||||
|
Me.SplitContainer2.Name = "SplitContainer2"
|
||||||
|
Me.SplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||||
|
'
|
||||||
|
'SplitContainer2.Panel1
|
||||||
|
'
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.Button4)
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox3)
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.Label4)
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.Button3)
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox1)
|
||||||
|
Me.SplitContainer2.Panel1.Controls.Add(Me.Label3)
|
||||||
|
Me.SplitContainer2.Size = New System.Drawing.Size(586, 552)
|
||||||
|
Me.SplitContainer2.SplitterDistance = 85
|
||||||
|
Me.SplitContainer2.TabIndex = 2
|
||||||
|
'
|
||||||
|
'Button4
|
||||||
|
'
|
||||||
|
Me.Button4.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Button4.Location = New System.Drawing.Point(476, 40)
|
||||||
|
Me.Button4.Name = "Button4"
|
||||||
|
Me.Button4.Size = New System.Drawing.Size(107, 31)
|
||||||
|
Me.Button4.TabIndex = 10
|
||||||
|
Me.Button4.Text = "发送"
|
||||||
|
Me.Button4.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'TextBox3
|
||||||
|
'
|
||||||
|
Me.TextBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.TextBox3.Location = New System.Drawing.Point(114, 40)
|
||||||
|
Me.TextBox3.Name = "TextBox3"
|
||||||
|
Me.TextBox3.Size = New System.Drawing.Size(356, 31)
|
||||||
|
Me.TextBox3.TabIndex = 9
|
||||||
|
'
|
||||||
|
'Label4
|
||||||
|
'
|
||||||
|
Me.Label4.AutoSize = True
|
||||||
|
Me.Label4.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Label4.Location = New System.Drawing.Point(5, 50)
|
||||||
|
Me.Label4.Name = "Label4"
|
||||||
|
Me.Label4.Size = New System.Drawing.Size(105, 21)
|
||||||
|
Me.Label4.TabIndex = 8
|
||||||
|
Me.Label4.Text = "短信内容:"
|
||||||
|
'
|
||||||
|
'Button3
|
||||||
|
'
|
||||||
|
Me.Button3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Button3.Location = New System.Drawing.Point(476, 6)
|
||||||
|
Me.Button3.Name = "Button3"
|
||||||
|
Me.Button3.Size = New System.Drawing.Size(107, 31)
|
||||||
|
Me.Button3.TabIndex = 7
|
||||||
|
Me.Button3.Text = "拨打"
|
||||||
|
Me.Button3.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'TextBox1
|
||||||
|
'
|
||||||
|
Me.TextBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.TextBox1.Location = New System.Drawing.Point(114, 6)
|
||||||
|
Me.TextBox1.Name = "TextBox1"
|
||||||
|
Me.TextBox1.Size = New System.Drawing.Size(356, 31)
|
||||||
|
Me.TextBox1.TabIndex = 1
|
||||||
|
'
|
||||||
|
'Label3
|
||||||
|
'
|
||||||
|
Me.Label3.AutoSize = True
|
||||||
|
Me.Label3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Label3.Location = New System.Drawing.Point(5, 11)
|
||||||
|
Me.Label3.Name = "Label3"
|
||||||
|
Me.Label3.Size = New System.Drawing.Size(94, 21)
|
||||||
|
Me.Label3.TabIndex = 0
|
||||||
|
Me.Label3.Text = "电话号:"
|
||||||
|
'
|
||||||
|
'Panel1
|
||||||
|
'
|
||||||
|
Me.Panel1.Controls.Add(Me.CheckBox1)
|
||||||
|
Me.Panel1.Controls.Add(Me.ComboBox2)
|
||||||
|
Me.Panel1.Controls.Add(Me.Button2)
|
||||||
|
Me.Panel1.Controls.Add(Me.TextBox2)
|
||||||
|
Me.Panel1.Controls.Add(Me.Button1)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label2)
|
||||||
|
Me.Panel1.Controls.Add(Me.ComboBox1)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label1)
|
||||||
|
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
|
||||||
|
Me.Panel1.Location = New System.Drawing.Point(0, 25)
|
||||||
|
Me.Panel1.Name = "Panel1"
|
||||||
|
Me.Panel1.Size = New System.Drawing.Size(586, 167)
|
||||||
|
Me.Panel1.TabIndex = 1
|
||||||
|
'
|
||||||
|
'CheckBox1
|
||||||
|
'
|
||||||
|
Me.CheckBox1.AutoSize = True
|
||||||
|
Me.CheckBox1.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.CheckBox1.Location = New System.Drawing.Point(476, 98)
|
||||||
|
Me.CheckBox1.Name = "CheckBox1"
|
||||||
|
Me.CheckBox1.Size = New System.Drawing.Size(98, 24)
|
||||||
|
Me.CheckBox1.TabIndex = 8
|
||||||
|
Me.CheckBox1.Text = "HEX发送"
|
||||||
|
Me.CheckBox1.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'ComboBox2
|
||||||
|
'
|
||||||
|
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.ComboBox2.FormattingEnabled = True
|
||||||
|
Me.ComboBox2.Items.AddRange(New Object() {"1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200", "256000", "512000", "9216000", "1000000"})
|
||||||
|
Me.ComboBox2.Location = New System.Drawing.Point(333, 12)
|
||||||
|
Me.ComboBox2.Name = "ComboBox2"
|
||||||
|
Me.ComboBox2.Size = New System.Drawing.Size(137, 29)
|
||||||
|
Me.ComboBox2.TabIndex = 7
|
||||||
|
'
|
||||||
|
'Button2
|
||||||
|
'
|
||||||
|
Me.Button2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Button2.Location = New System.Drawing.Point(476, 129)
|
||||||
|
Me.Button2.Name = "Button2"
|
||||||
|
Me.Button2.Size = New System.Drawing.Size(107, 31)
|
||||||
|
Me.Button2.TabIndex = 6
|
||||||
|
Me.Button2.Text = "发送"
|
||||||
|
Me.Button2.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'TextBox2
|
||||||
|
'
|
||||||
|
Me.TextBox2.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.TextBox2.Location = New System.Drawing.Point(7, 60)
|
||||||
|
Me.TextBox2.Multiline = True
|
||||||
|
Me.TextBox2.Name = "TextBox2"
|
||||||
|
Me.TextBox2.Size = New System.Drawing.Size(463, 100)
|
||||||
|
Me.TextBox2.TabIndex = 5
|
||||||
|
'
|
||||||
|
'Button1
|
||||||
|
'
|
||||||
|
Me.Button1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Button1.Location = New System.Drawing.Point(476, 11)
|
||||||
|
Me.Button1.Name = "Button1"
|
||||||
|
Me.Button1.Size = New System.Drawing.Size(107, 31)
|
||||||
|
Me.Button1.TabIndex = 4
|
||||||
|
Me.Button1.Text = "打开串口"
|
||||||
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'Label2
|
||||||
|
'
|
||||||
|
Me.Label2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Label2.Location = New System.Drawing.Point(238, 8)
|
||||||
|
Me.Label2.Name = "Label2"
|
||||||
|
Me.Label2.Size = New System.Drawing.Size(93, 35)
|
||||||
|
Me.Label2.TabIndex = 2
|
||||||
|
Me.Label2.Text = "波特率:"
|
||||||
|
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'ComboBox1
|
||||||
|
'
|
||||||
|
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.ComboBox1.FormattingEnabled = True
|
||||||
|
Me.ComboBox1.Location = New System.Drawing.Point(73, 12)
|
||||||
|
Me.ComboBox1.Name = "ComboBox1"
|
||||||
|
Me.ComboBox1.Size = New System.Drawing.Size(163, 29)
|
||||||
|
Me.ComboBox1.TabIndex = 1
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(3, 8)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(68, 35)
|
||||||
|
Me.Label1.TabIndex = 0
|
||||||
|
Me.Label1.Text = "串口:"
|
||||||
|
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'ToolStrip1
|
||||||
|
'
|
||||||
|
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.ToolStrip1.Name = "ToolStrip1"
|
||||||
|
Me.ToolStrip1.Size = New System.Drawing.Size(586, 25)
|
||||||
|
Me.ToolStrip1.TabIndex = 0
|
||||||
|
Me.ToolStrip1.Text = "ToolStrip1"
|
||||||
|
'
|
||||||
|
'RichTextBox1
|
||||||
|
'
|
||||||
|
Me.RichTextBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.RichTextBox1.Location = New System.Drawing.Point(0, 25)
|
||||||
|
Me.RichTextBox1.Name = "RichTextBox1"
|
||||||
|
Me.RichTextBox1.Size = New System.Drawing.Size(572, 719)
|
||||||
|
Me.RichTextBox1.TabIndex = 2
|
||||||
|
Me.RichTextBox1.Text = ""
|
||||||
|
'
|
||||||
|
'ToolStrip2
|
||||||
|
'
|
||||||
|
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel1, Me.ToolStripTextBox2, Me.ToolStripLabel2, Me.ToolStripTextBox1, Me.ToolStripButton4, Me.ToolStripButton3, Me.ToolStripButton5})
|
||||||
|
Me.ToolStrip2.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.ToolStrip2.Name = "ToolStrip2"
|
||||||
|
Me.ToolStrip2.Size = New System.Drawing.Size(572, 25)
|
||||||
|
Me.ToolStrip2.TabIndex = 1
|
||||||
|
Me.ToolStrip2.Text = "ToolStrip2"
|
||||||
|
'
|
||||||
|
'ToolStripLabel1
|
||||||
|
'
|
||||||
|
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
||||||
|
Me.ToolStripLabel1.Size = New System.Drawing.Size(56, 22)
|
||||||
|
Me.ToolStripLabel1.Text = "订阅字段"
|
||||||
|
'
|
||||||
|
'ToolStripTextBox2
|
||||||
|
'
|
||||||
|
Me.ToolStripTextBox2.Font = New System.Drawing.Font("Microsoft YaHei UI", 9.0!)
|
||||||
|
Me.ToolStripTextBox2.Name = "ToolStripTextBox2"
|
||||||
|
Me.ToolStripTextBox2.Size = New System.Drawing.Size(100, 25)
|
||||||
|
'
|
||||||
|
'ToolStripLabel2
|
||||||
|
'
|
||||||
|
Me.ToolStripLabel2.Name = "ToolStripLabel2"
|
||||||
|
Me.ToolStripLabel2.Size = New System.Drawing.Size(56, 22)
|
||||||
|
Me.ToolStripLabel2.Text = "发布字段"
|
||||||
|
'
|
||||||
|
'ToolStripTextBox1
|
||||||
|
'
|
||||||
|
Me.ToolStripTextBox1.Font = New System.Drawing.Font("Microsoft YaHei UI", 9.0!)
|
||||||
|
Me.ToolStripTextBox1.Name = "ToolStripTextBox1"
|
||||||
|
Me.ToolStripTextBox1.Size = New System.Drawing.Size(100, 25)
|
||||||
|
'
|
||||||
|
'ToolStripButton4
|
||||||
|
'
|
||||||
|
Me.ToolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.ToolStripButton4.Image = CType(resources.GetObject("ToolStripButton4.Image"), System.Drawing.Image)
|
||||||
|
Me.ToolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.ToolStripButton4.Name = "ToolStripButton4"
|
||||||
|
Me.ToolStripButton4.Size = New System.Drawing.Size(60, 22)
|
||||||
|
Me.ToolStripButton4.Text = "保存设置"
|
||||||
|
'
|
||||||
|
'ToolStripButton3
|
||||||
|
'
|
||||||
|
Me.ToolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.ToolStripButton3.Image = CType(resources.GetObject("ToolStripButton3.Image"), System.Drawing.Image)
|
||||||
|
Me.ToolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.ToolStripButton3.Name = "ToolStripButton3"
|
||||||
|
Me.ToolStripButton3.Size = New System.Drawing.Size(36, 22)
|
||||||
|
Me.ToolStripButton3.Text = "清空"
|
||||||
|
'
|
||||||
|
'ToolStripButton5
|
||||||
|
'
|
||||||
|
Me.ToolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.ToolStripButton5.Image = CType(resources.GetObject("ToolStripButton5.Image"), System.Drawing.Image)
|
||||||
|
Me.ToolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.ToolStripButton5.Name = "ToolStripButton5"
|
||||||
|
Me.ToolStripButton5.Size = New System.Drawing.Size(36, 22)
|
||||||
|
Me.ToolStripButton5.Text = "Test"
|
||||||
|
'
|
||||||
|
'SerialPort1
|
||||||
|
'
|
||||||
|
'
|
||||||
|
'Telephone
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(1162, 744)
|
||||||
|
Me.Controls.Add(Me.SplitContainer1)
|
||||||
|
Me.Name = "Telephone"
|
||||||
|
Me.Text = "Form1"
|
||||||
|
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||||
|
Me.SplitContainer1.Panel1.PerformLayout()
|
||||||
|
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||||
|
Me.SplitContainer1.Panel2.PerformLayout()
|
||||||
|
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.SplitContainer1.ResumeLayout(False)
|
||||||
|
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||||
|
Me.SplitContainer2.Panel1.PerformLayout()
|
||||||
|
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.SplitContainer2.ResumeLayout(False)
|
||||||
|
Me.Panel1.ResumeLayout(False)
|
||||||
|
Me.Panel1.PerformLayout()
|
||||||
|
Me.ToolStrip2.ResumeLayout(False)
|
||||||
|
Me.ToolStrip2.PerformLayout()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents SplitContainer1 As SplitContainer
|
||||||
|
Friend WithEvents ToolStrip1 As ToolStrip
|
||||||
|
Friend WithEvents RichTextBox1 As RichTextBox
|
||||||
|
Friend WithEvents ToolStrip2 As ToolStrip
|
||||||
|
Friend WithEvents ComboBox2 As ComboBox
|
||||||
|
Friend WithEvents Button2 As Button
|
||||||
|
Friend WithEvents TextBox2 As TextBox
|
||||||
|
Friend WithEvents Button1 As Button
|
||||||
|
Friend WithEvents Label2 As Label
|
||||||
|
Friend WithEvents ComboBox1 As ComboBox
|
||||||
|
Friend WithEvents Label1 As Label
|
||||||
|
Friend WithEvents SerialPort1 As IO.Ports.SerialPort
|
||||||
|
Friend WithEvents CheckBox1 As CheckBox
|
||||||
|
Friend WithEvents ToolStripLabel1 As ToolStripLabel
|
||||||
|
Friend WithEvents ToolStripTextBox1 As ToolStripTextBox
|
||||||
|
Friend WithEvents ToolStripTextBox2 As ToolStripTextBox
|
||||||
|
Friend WithEvents ToolStripLabel2 As ToolStripLabel
|
||||||
|
Friend WithEvents ToolStripButton3 As ToolStripButton
|
||||||
|
Friend WithEvents ToolStripButton4 As ToolStripButton
|
||||||
|
Friend WithEvents ToolStripButton5 As ToolStripButton
|
||||||
|
Friend WithEvents SplitContainer2 As SplitContainer
|
||||||
|
Friend WithEvents TextBox3 As TextBox
|
||||||
|
Friend WithEvents Label4 As Label
|
||||||
|
Friend WithEvents Button3 As Button
|
||||||
|
Friend WithEvents TextBox1 As TextBox
|
||||||
|
Friend WithEvents Label3 As Label
|
||||||
|
Friend WithEvents Button4 As Button
|
||||||
|
Friend WithEvents Panel1 As Panel
|
||||||
|
End Class
|
||||||
178
Telephone.resx
Normal file
178
Telephone.resx
Normal file
@@ -0,0 +1,178 @@
|
|||||||
|
<?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>
|
||||||
|
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ToolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>129, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="ToolStripButton4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToolStripButton3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="ToolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="SerialPort1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>241, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>57</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
25
Telephone.sln
Normal file
25
Telephone.sln
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.32602.291
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Telephone", "Telephone.vbproj", "{30E18FAE-69CD-4243-BEB0-BBE9994E6138}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{30E18FAE-69CD-4243-BEB0-BBE9994E6138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{30E18FAE-69CD-4243-BEB0-BBE9994E6138}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{30E18FAE-69CD-4243-BEB0-BBE9994E6138}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{30E18FAE-69CD-4243-BEB0-BBE9994E6138}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {79600813-0F5A-4B11-B35F-39738256D56B}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
687
Telephone.vb
Normal file
687
Telephone.vb
Normal file
@@ -0,0 +1,687 @@
|
|||||||
|
Imports System.IO.Ports
|
||||||
|
Imports System.Text
|
||||||
|
Imports System.Threading
|
||||||
|
Imports Newtonsoft.Json
|
||||||
|
Imports StackExchange.Redis
|
||||||
|
Imports Telephone.PhoneBurstification
|
||||||
|
|
||||||
|
Public Class Telephone
|
||||||
|
'hex 发送标志
|
||||||
|
Public G_Hexflg As Boolean = False
|
||||||
|
'订阅字段
|
||||||
|
Public G_Subscribe As String = ""
|
||||||
|
Public G_OldSubscribe As String = ""
|
||||||
|
'发布字段
|
||||||
|
Public G_Publish As String = ""
|
||||||
|
'
|
||||||
|
Public G_RedisSub, G_Redislish As RedisSubscriber
|
||||||
|
'redis消息队列
|
||||||
|
Public M_RedisQueue As Queue
|
||||||
|
'事件处理线程
|
||||||
|
Public M_EventThread As Thread
|
||||||
|
'
|
||||||
|
Public G_SendBuffnode As SendBuffnode
|
||||||
|
|
||||||
|
'日志对象
|
||||||
|
Public G_Log As RuningLog
|
||||||
|
|
||||||
|
Private Sub Telephone_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
'设置页面标题为软件名称加版本号
|
||||||
|
Me.Text = Application.ProductName & " " & Application.ProductVersion
|
||||||
|
G_Hexflg = False
|
||||||
|
recvBufferli = New List(Of Byte)()
|
||||||
|
G_Log = New RuningLog(RichTextBox1, Application.StartupPath & "\log")
|
||||||
|
ComboBox1.Items.Clear()
|
||||||
|
ComboBox1.Items.AddRange(SerialPort.GetPortNames())
|
||||||
|
GetSeting()
|
||||||
|
|
||||||
|
initRedisSubscriber(G_Subscribe, G_OldSubscribe)
|
||||||
|
initRedisPublisher()
|
||||||
|
M_RedisQueue = New Queue()
|
||||||
|
M_EventThread = New Thread(AddressOf EventThread)
|
||||||
|
M_EventThread.Start()
|
||||||
|
Button1.PerformClick()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub EventThread()
|
||||||
|
|
||||||
|
Dim msgCount As Integer
|
||||||
|
'获取发短信的集合并且按时间排序
|
||||||
|
Dim sendShortMessagesLi As New List(Of CallInfoNode)
|
||||||
|
Dim callLi As New List(Of CallInfoNode)
|
||||||
|
Dim item As CallInfoNode
|
||||||
|
While True
|
||||||
|
If M_RedisQueue.Count > 0 Then
|
||||||
|
'遍历队列
|
||||||
|
msgCount = M_RedisQueue.Count
|
||||||
|
sendShortMessagesLi.Clear()
|
||||||
|
callLi.Clear()
|
||||||
|
For i As Integer = 0 To msgCount - 1
|
||||||
|
item = M_RedisQueue.Dequeue()
|
||||||
|
If IsNothing(item) Then Continue For
|
||||||
|
If item.Type.Trim.Equals("1") Then
|
||||||
|
|
||||||
|
callLi.Add(item)
|
||||||
|
ElseIf item.Type.Trim.Equals("2") Then
|
||||||
|
sendShortMessagesLi.Add(item)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'判断是否有短信发送
|
||||||
|
If sendShortMessagesLi.Count > 0 Then
|
||||||
|
'发送短信
|
||||||
|
SendShortMessage(sendShortMessagesLi)
|
||||||
|
sendShortMessagesLi.Clear()
|
||||||
|
End If
|
||||||
|
'判断是否有电话拨号
|
||||||
|
If callLi.Count > 0 Then
|
||||||
|
'拨打电话
|
||||||
|
CallPhone(callLi)
|
||||||
|
callLi.Clear()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Thread.Sleep(10)
|
||||||
|
End While
|
||||||
|
End Sub
|
||||||
|
'发送短信
|
||||||
|
Public Sub SendShortMessage(sendShortMessagesLi As List(Of CallInfoNode))
|
||||||
|
'遍历sendShortMessagesLi
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
For Each item In sendShortMessagesLi
|
||||||
|
'获取当前时间的utc秒值
|
||||||
|
Dim nowt As Long = CLng(DateTime.UtcNow.Subtract(New DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds)
|
||||||
|
'判断是否超时
|
||||||
|
If item.DeadLine < nowt Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
gLogNode = New LogNode($"开始执行{item.CallerName}发送短信:{item.PhoneNumber}", RuningLog.LogType.e_info, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
|
||||||
|
|
||||||
|
If ProcessshortmessagesData(item) Then
|
||||||
|
RedisPublishMessage($"执行{item.CallerName}发送短信:{item.PhoneNumber}成功")
|
||||||
|
gLogNode = New LogNode($"执行{item.CallerName}发送短信:{item.PhoneNumber}成功", RuningLog.LogType.e_info, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
RedisPublishMessage($"执行{item.CallerName}发送短信:{item.PhoneNumber}失败")
|
||||||
|
gLogNode = New LogNode($"执行{item.CallerName}发送短信:{item.PhoneNumber}失败", RuningLog.LogType.e_Error, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function ProcessshortmessagesData(CallInfoNode As CallInfoNode) As Boolean
|
||||||
|
Dim li As List(Of SendBuffnode)
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
Dim SendData As Byte()
|
||||||
|
li = PhoneBurstification.PhoneBurstification(PhoneBurstification.PhoneBuffType.SendSMS, CallInfoNode)
|
||||||
|
For Each item As SendBuffnode In li
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
G_SendBuffnode = item
|
||||||
|
SendData = publicMode.StringToByte(item.SendData)
|
||||||
|
SerialPort1.Write(SendData, 0, SendData.Length)
|
||||||
|
SendBuffnode.SetSendStatus(item, SendBuffnode.SendStatustype.Sending)
|
||||||
|
gLogNode = New LogNode($"TX:{item.SendData}", RuningLog.LogType.e_info, RuningLog.LogMode.e_both)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
gLogNode = New LogNode("串口未打开!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_both)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
While True
|
||||||
|
|
||||||
|
If G_SendBuffnode.IsNodeReceiveTimeout2(G_SendBuffnode) Then
|
||||||
|
If G_SendBuffnode.ReceiveStatus = True Then
|
||||||
|
If G_SendBuffnode.CommandType = comdType.comdmsg Then
|
||||||
|
Thread.Sleep(100)
|
||||||
|
Else
|
||||||
|
Thread.Sleep(100)
|
||||||
|
End If
|
||||||
|
Exit While
|
||||||
|
'Select Case G_SendBuffnode.CommandType
|
||||||
|
' Case comdType.comdCDTAM
|
||||||
|
' If G_SendBuffnode.ReceiveResult = True Then
|
||||||
|
' Exit While
|
||||||
|
' End If
|
||||||
|
' Case comdType.comdCMGF
|
||||||
|
' Exit While
|
||||||
|
' Case comdType.comdCSCA
|
||||||
|
'End Select
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
|
||||||
|
gLogNode = New LogNode($"发送超时命令:{item.SendData}!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End While
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'拨打电话
|
||||||
|
Public Sub CallPhone(callLi As List(Of CallInfoNode))
|
||||||
|
'遍历callli
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
For Each item In callLi
|
||||||
|
'获取当前时间的utc秒值
|
||||||
|
Dim nowt As Double = CInt(DateTime.UtcNow.Subtract(New DateTime(1970, 1, 1, 0, 0, 0, 0)).TotalSeconds)
|
||||||
|
'判断是否超时
|
||||||
|
If item.DeadLine < nowt Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
gLogNode = New LogNode($"开始执行{item.CallerName}播打电话:{item.PhoneNumber}", RuningLog.LogType.e_info, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
|
||||||
|
If ProcessData(item) Then
|
||||||
|
RedisPublishMessage($"执行{item.CallerName}播打电话:{item.PhoneNumber}成功")
|
||||||
|
gLogNode = New LogNode($"执行{item.CallerName}播打电话:{item.PhoneNumber}成功", RuningLog.LogType.e_info, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
RedisPublishMessage($"执行{item.CallerName}播打电话:{item.PhoneNumber}失败")
|
||||||
|
gLogNode = New LogNode($"执行{item.CallerName}播打电话:{item.PhoneNumber}失败", RuningLog.LogType.e_Error, RuningLog.LogMode.e_consoleandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ProcessData(CallInfoNode As CallInfoNode) As Boolean
|
||||||
|
|
||||||
|
|
||||||
|
Dim li As List(Of SendBuffnode)
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
Dim SendData As Byte()
|
||||||
|
li = PhoneBurstification.PhoneBurstification(PhoneBurstification.PhoneBuffType.CallPhoneAndPlay, CallInfoNode)
|
||||||
|
For Each item As SendBuffnode In li
|
||||||
|
'If item.CommandType <> comdType.comd1A Then Continue For
|
||||||
|
'判断串口是否打开
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
G_SendBuffnode = item
|
||||||
|
SendData = publicMode.StringToByte(item.SendData)
|
||||||
|
SerialPort1.Write(SendData, 0, SendData.Length)
|
||||||
|
SendBuffnode.SetSendStatus(item, SendBuffnode.SendStatustype.Sending)
|
||||||
|
gLogNode = New LogNode($"TX:{item.SendData}", RuningLog.LogType.e_info, RuningLog.LogMode.e_both)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
gLogNode = New LogNode("串口未打开!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_both)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
While True
|
||||||
|
If G_SendBuffnode.IsNodeReceiveTimeout(G_SendBuffnode) Then
|
||||||
|
If G_SendBuffnode.ReceiveStatus = True Then
|
||||||
|
|
||||||
|
Select Case G_SendBuffnode.CommandType
|
||||||
|
Case comdType.comdCallPhone
|
||||||
|
If G_SendBuffnode.ReceiveResult = True Then
|
||||||
|
Thread.Sleep(1000)
|
||||||
|
Exit While
|
||||||
|
Else
|
||||||
|
gLogNode = New LogNode($"电话已经挂断!!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case comdType.comdSendSMS
|
||||||
|
Exit While
|
||||||
|
Case comdType.comdCallPhoneAndPlay
|
||||||
|
If G_SendBuffnode.ReceiveResult = True Then
|
||||||
|
If G_SendBuffnode.SendCurrentCount >= 10 Then
|
||||||
|
SendData = publicMode.StringToByte("AT+CHUP" & vbCrLf)
|
||||||
|
SerialPort1.Write(SendData, 0, SendData.Length)
|
||||||
|
gLogNode = New LogNode("主动挂掉电话!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Thread.Sleep(5000)
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
SerialPort1.Write(SendData, 0, SendData.Length)
|
||||||
|
SendBuffnode.SetSendStatus(item, SendBuffnode.SendStatustype.Resend)
|
||||||
|
gLogNode = New LogNode($"TX:{item.SendData}", RuningLog.LogType.e_info, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
gLogNode = New LogNode("串口未打开!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
|
||||||
|
If G_SendBuffnode.CommandType = comdType.comdCallPhoneAndPlay AndAlso Not G_SendBuffnode.ReceiveData.Contains("VOICE CALL: END") Then
|
||||||
|
Continue While
|
||||||
|
End If
|
||||||
|
gLogNode = New LogNode($"电话已经挂断,停止发送语音!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case Else
|
||||||
|
Thread.Sleep(50)
|
||||||
|
Exit While
|
||||||
|
End Select
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
|
||||||
|
|
||||||
|
gLogNode = New LogNode($"发送超时命令:{item.SendData}!!", RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
'判断接收状态
|
||||||
|
|
||||||
|
Thread.Sleep(10)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'获取系统缓存参数
|
||||||
|
Public Sub GetSeting()
|
||||||
|
'刷新系统缓存
|
||||||
|
My.Settings.Reload()
|
||||||
|
'获取系统缓存参数
|
||||||
|
ComboBox1.Text = My.Settings.SerialPortName
|
||||||
|
ComboBox2.Text = My.Settings.BaudRate
|
||||||
|
If My.Settings.THigh = 0 OrElse My.Settings.TWide = 0 Then
|
||||||
|
Else
|
||||||
|
Me.Height = My.Settings.THigh
|
||||||
|
Me.Width = My.Settings.TWide
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
G_Subscribe = My.Settings.G_Subscribe
|
||||||
|
G_Publish = My.Settings.G_Publish
|
||||||
|
ToolStripTextBox2.Text = G_Subscribe
|
||||||
|
ToolStripTextBox1.Text = G_Publish
|
||||||
|
|
||||||
|
Dim dic As Dictionary(Of Integer, (String, String, String))
|
||||||
|
dic = JsonConvert.DeserializeObject(Of Dictionary(Of Integer, (String, String, String)))(My.Settings.GTable)
|
||||||
|
If IsNothing(dic) OrElse dic.Count = 0 Then Return
|
||||||
|
|
||||||
|
|
||||||
|
'JsonConvert.SerializeObject(m_Applicationconfig)
|
||||||
|
End Sub
|
||||||
|
'保存系统缓存参数
|
||||||
|
Public Sub SaveSeting()
|
||||||
|
|
||||||
|
'刷新系统缓存
|
||||||
|
My.Settings.Reload()
|
||||||
|
'获取系统缓存参数
|
||||||
|
My.Settings.SerialPortName = ComboBox1.Text
|
||||||
|
My.Settings.BaudRate = ComboBox2.Text
|
||||||
|
My.Settings.THigh = Me.Height
|
||||||
|
My.Settings.TWide = Me.Width
|
||||||
|
My.Settings.G_Subscribe = G_Subscribe
|
||||||
|
My.Settings.G_Publish = G_Publish
|
||||||
|
Dim dic As New Dictionary(Of Integer, (String, String, String))
|
||||||
|
|
||||||
|
My.Settings.GTable = JsonConvert.SerializeObject(dic)
|
||||||
|
My.Settings.Save()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub ComboBox1_DropDown(sender As Object, e As EventArgs) Handles ComboBox1.DropDown
|
||||||
|
|
||||||
|
'判断串口是否打开
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
ComboBox1.DroppedDown = False
|
||||||
|
MsgBox("串口已打开,请先关闭串口")
|
||||||
|
'终止下拉
|
||||||
|
'收起ComboBox1 下拉
|
||||||
|
|
||||||
|
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
ComboBox1.Items.Clear()
|
||||||
|
ComboBox1.Items.AddRange(SerialPort.GetPortNames())
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ComboBox2_DropDown(sender As Object, e As EventArgs) Handles ComboBox2.DropDown '判断串口是否打开
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
MsgBox("串口已打开,请先关闭串口")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
|
||||||
|
G_Hexflg = CheckBox1.Checked
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||||
|
If Button1.Text = "打开串口" Then
|
||||||
|
Try
|
||||||
|
SerialPort1.PortName = ComboBox1.Text
|
||||||
|
SerialPort1.BaudRate = CInt(ComboBox2.Text)
|
||||||
|
SerialPort1.Open()
|
||||||
|
Button1.Text = "关闭串口"
|
||||||
|
Button1.ForeColor = Color.Red
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox("串口打开失败")
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
SerialPort1.Close()
|
||||||
|
Button1.Text = "打开串口"
|
||||||
|
Button1.ForeColor = Color.Black
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
'使用串口发送数据
|
||||||
|
Public Function SerialPortSendData(nstr As String, Optional hexflg As Boolean = False) As Boolean
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
'判断数据是否为空
|
||||||
|
If String.IsNullOrEmpty(nstr) Then
|
||||||
|
MsgBox("发送数据不能为空")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If hexflg Then
|
||||||
|
Dim hex As String = StrToHex(nstr)
|
||||||
|
|
||||||
|
'RuningLog.OutputLogsToTheControl(RichTextBox1, New RuningLogConfig($"串口发送: {hex}", Color.Green, 12), 1)
|
||||||
|
SerialPort1.Write(hex)
|
||||||
|
Else
|
||||||
|
nstr = nstr & vbCrLf
|
||||||
|
'RuningLog.OutputLogsToTheControl(RichTextBox1, New RuningLogConfig($"串口发送: {nstr}", Color.Green, 12), 1)
|
||||||
|
|
||||||
|
SerialPort1.Write(nstr)
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
MsgBox("串口未打开")
|
||||||
|
Return False
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||||
|
If SerialPort1.IsOpen Then
|
||||||
|
SerialPortSendData(TextBox2.Text, G_Hexflg)
|
||||||
|
Else
|
||||||
|
MsgBox("串口未打开")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'将字符串转Hex 数据
|
||||||
|
Private Function StrToHex(ByVal str As String) As String
|
||||||
|
Dim hex As String = ""
|
||||||
|
For Each c As Char In str
|
||||||
|
hex += Convert.ToString(Asc(c), 16).PadLeft(2, "0"c) & " "
|
||||||
|
Next
|
||||||
|
Return hex
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'将Hex 数据转字符串
|
||||||
|
Private Function HexToStr(ByVal hex As String) As String
|
||||||
|
Dim str As String = ""
|
||||||
|
Dim hexs() As String = hex.Split(" "c)
|
||||||
|
For Each h As String In hexs
|
||||||
|
If h <> "" Then
|
||||||
|
str += ChrW(Convert.ToInt32(h, 16))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return str
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub Telephone_FormClosed(sender As Object, e As FormClosedEventArgs) Handles MyBase.FormClosed
|
||||||
|
SaveSeting()
|
||||||
|
RedisClose()
|
||||||
|
If Not IsNothing(M_EventThread) AndAlso M_EventThread.IsAlive Then
|
||||||
|
M_EventThread.Abort()
|
||||||
|
End If
|
||||||
|
If Not IsNothing(G_Log) Then
|
||||||
|
G_Log.CloseThread()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
|
||||||
|
RichTextBox1.Clear()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles RichTextBox1.TextChanged
|
||||||
|
If RichTextBox1.Lines.Length > 2147000000 Then
|
||||||
|
RichTextBox1.Clear()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
|
||||||
|
If String.IsNullOrEmpty(ToolStripTextBox2.Text) Then
|
||||||
|
MsgBox("请输入订阅频道")
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
G_OldSubscribe = G_Subscribe
|
||||||
|
G_Subscribe = ToolStripTextBox2.Text.Trim
|
||||||
|
End If
|
||||||
|
If String.IsNullOrEmpty(ToolStripTextBox1.Text) Then
|
||||||
|
MsgBox("请输入发布频道")
|
||||||
|
Return
|
||||||
|
Else
|
||||||
|
G_Publish = ToolStripTextBox1.Text.Trim
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
initRedisSubscriber(G_Subscribe, G_OldSubscribe)
|
||||||
|
|
||||||
|
initRedisPublisher()
|
||||||
|
End Sub
|
||||||
|
'订阅初始化
|
||||||
|
''' <summary>
|
||||||
|
'''
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Subscribe"></param>
|
||||||
|
''' <param name="OldSubscribe"></param>
|
||||||
|
Public Sub initRedisSubscriber(Subscribe As String, OldSubscribe As String)
|
||||||
|
If String.IsNullOrEmpty(Subscribe) Then
|
||||||
|
MsgBox("未设置订阅频道")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IsNothing(G_RedisSub) AndAlso G_RedisSub.IsConnected Then
|
||||||
|
' 取消订阅并关闭连接
|
||||||
|
G_RedisSub.UnsubscribeFromChannel(OldSubscribe)
|
||||||
|
G_RedisSub.CloseConnection()
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' 替换为你的 Redis 连接字符串
|
||||||
|
Dim connectionString = "127.0.0.1:6379"
|
||||||
|
Try
|
||||||
|
G_RedisSub = New RedisSubscriber(connectionString)
|
||||||
|
|
||||||
|
' 定义消息处理程序
|
||||||
|
Dim messageHandler As Action(Of RedisChannel, RedisValue) = Sub(channel, message)
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
Dim g_CallInfoNode As CallInfoNode
|
||||||
|
Try
|
||||||
|
g_CallInfoNode = JsonConvert.DeserializeObject(Of CallInfoNode)(message)
|
||||||
|
Catch ex As Exception
|
||||||
|
'MsgBox($"消息解析失败:{ex.Message}")
|
||||||
|
gLogNode = New LogNode(ex.Message, RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Return
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
gLogNode = New LogNode($"Redis:{channel}: {message}", RuningLog.LogType.e_info, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
M_RedisQueue.Enqueue(g_CallInfoNode)
|
||||||
|
'Console.WriteLine($"接收到来自 {channel} 的消息: {message}")
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' 订阅频道
|
||||||
|
G_RedisSub.SubscribeToChannel(Subscribe, messageHandler)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox($"订阅失败:{ex.Message}")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
'' 发布消息示例
|
||||||
|
'Console.WriteLine("发布测试消息...")
|
||||||
|
'G_RedisSub.PublishMessage("testChannel", "Hello from publisher!")
|
||||||
|
|
||||||
|
'' 保持程序运行以接收更多消息
|
||||||
|
'Console.WriteLine("按任意键退出...")
|
||||||
|
'Console.ReadKey()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton5_Click(sender As Object, e As EventArgs) Handles ToolStripButton5.Click
|
||||||
|
RedisPublishMessage("20131415926")
|
||||||
|
End Sub
|
||||||
|
'redis发布初始化
|
||||||
|
Public Sub initRedisPublisher()
|
||||||
|
If Not IsNothing(G_Redislish) AndAlso G_Redislish.IsConnected Then
|
||||||
|
G_Redislish.CloseConnection()
|
||||||
|
End If
|
||||||
|
' 替换为你的 Redis 连接字符串
|
||||||
|
Dim connectionString = "127.0.0.1:6379"
|
||||||
|
Try
|
||||||
|
G_Redislish = New RedisSubscriber(connectionString)
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox($"redis发布初始化失败:{ex.Message}")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
'发布消息
|
||||||
|
Public Sub RedisPublishMessage(message As String)
|
||||||
|
If String.IsNullOrEmpty(G_Publish) Then
|
||||||
|
MsgBox("未设置发布频道")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
If String.IsNullOrEmpty(message) Then
|
||||||
|
MsgBox("未输入发布内容")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
If G_Redislish.IsConnected Then
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
|
||||||
|
Try
|
||||||
|
|
||||||
|
G_Redislish.PublishMessage(G_Publish, message)
|
||||||
|
gLogNode = New LogNode($"Redis:{G_Publish}: {message}", RuningLog.LogType.e_info, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
MsgBox($"redis发布失败:{ex.Message}")
|
||||||
|
gLogNode = New LogNode(ex.Message, RuningLog.LogType.e_Error, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
gLogNode.SetLogColor(Color.Red)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgBox("redis未连接")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public IsRead As Boolean = False
|
||||||
|
Public listening As Boolean = False
|
||||||
|
Public recvBufferli As List(Of Byte)
|
||||||
|
Private Sub SerialPort1_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
|
||||||
|
|
||||||
|
'获取读缓冲区数据长度
|
||||||
|
Dim gLogNode As LogNode
|
||||||
|
Dim n As Integer = SerialPort1.BytesToRead
|
||||||
|
Dim recvBuffer As Byte() = New Byte(n - 1) {}
|
||||||
|
SerialPort1.Read(recvBuffer, 0, n)
|
||||||
|
If Not IsNothing(G_SendBuffnode) Then
|
||||||
|
|
||||||
|
G_SendBuffnode.ReceiveStatusStateMachine(G_SendBuffnode, recvBuffer)
|
||||||
|
'SendBuffnode.SetSendStatus(G_SendBuffnode, SendBuffnode.SendStatustype.ReceiveSuccess)
|
||||||
|
End If
|
||||||
|
'输出到富文本
|
||||||
|
If G_Hexflg Then
|
||||||
|
'RuningLog.OutputLogsToTheControl(RichTextBox1, New RuningLogConfig($"串口接收到数据:{ByteToString2(recvBuffer)}", Color.Olive, 12), 1)
|
||||||
|
gLogNode = New LogNode($"RX:{ByteToString2(recvBuffer)}", RuningLog.LogType.e_info, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
Else
|
||||||
|
'RuningLog.OutputLogsToTheControl(RichTextBox1, New RuningLogConfig($"串口接收到数据:{Encoding.Default.GetString(recvBuffer)}", Color.Olive, 12), 1)
|
||||||
|
gLogNode = New LogNode($"RX:{Encoding.Default.GetString(recvBuffer)}", RuningLog.LogType.e_info, RuningLog.LogMode.e_fileandRichTextBox)
|
||||||
|
G_Log.AddLogNode(gLogNode)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Dim readstr As String = publicMode.ByteToString(recvBuffer)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Public Shared Function ByteToString2(databuff() As Byte)
|
||||||
|
Dim strData As String = String.Empty
|
||||||
|
For i = 0 To databuff.Length - 1
|
||||||
|
strData &= $" {ByteToHex1(databuff(i)).PadLeft(2, "0"c)}"
|
||||||
|
Next
|
||||||
|
Return strData
|
||||||
|
End Function
|
||||||
|
Public Shared Function ByteToHex1(ByVal b As Byte) As String
|
||||||
|
Return b.ToString("X2")
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||||
|
'TextBox1
|
||||||
|
'判断TextBox1 是否为空
|
||||||
|
If String.IsNullOrEmpty(TextBox1.Text) Then
|
||||||
|
MsgBox("电话号码为空")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
'判断TextBox1 是否为数字 且符合电话号码格式
|
||||||
|
If Not IsNumeric(TextBox1.Text) OrElse TextBox1.Text.Length <> 11 Then
|
||||||
|
MsgBox("电话号码格式不正确")
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim str As String = $"ATD{TextBox1.Text};"
|
||||||
|
SerialPortSendData(str, False)
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||||
|
Console.WriteLine(publicMode.SwapAndPad("18144070918"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
'关闭redis
|
||||||
|
Public Sub RedisClose()
|
||||||
|
If Not IsNothing(G_RedisSub) AndAlso G_RedisSub.IsConnected Then
|
||||||
|
G_RedisSub.UnsubscribeFromChannel(G_Subscribe)
|
||||||
|
G_RedisSub.CloseConnection()
|
||||||
|
End If
|
||||||
|
If Not IsNothing(G_Redislish) AndAlso G_Redislish.IsConnected Then
|
||||||
|
G_Redislish.CloseConnection()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
240
Telephone.vbproj
Normal file
240
Telephone.vbproj
Normal file
@@ -0,0 +1,240 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{30E18FAE-69CD-4243-BEB0-BBE9994E6138}</ProjectGuid>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<StartupObject>Telephone.My.MyApplication</StartupObject>
|
||||||
|
<RootNamespace>Telephone</RootNamespace>
|
||||||
|
<AssemblyName>Telephone</AssemblyName>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<MyType>WindowsForms</MyType>
|
||||||
|
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>Telephone.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>Telephone.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\BouncyCastle.Cryptography.2.5.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="FlexCell, Version=4.7.0.0, Culture=neutral, PublicKeyToken=6f86587eb70ee309, processorArchitecture=MSIL" />
|
||||||
|
<Reference Include="Google.Protobuf, Version=3.30.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Google.Protobuf.3.30.0\lib\net45\Google.Protobuf.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="K4os.Compression.LZ4, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\K4os.Compression.LZ4.1.3.8\lib\net462\K4os.Compression.LZ4.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.8.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\K4os.Compression.LZ4.Streams.1.3.8\lib\net462\K4os.Compression.LZ4.Streams.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="K4os.Hash.xxHash, Version=1.0.8.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\K4os.Hash.xxHash.1.0.8\lib\net462\K4os.Hash.xxHash.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.6.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\lib\net461\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data, Version=9.4.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\MySql.Data.9.4.0\lib\net48\MySql.Data.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\Pipelines.Sockets.Unofficial.2.2.8\lib\net472\Pipelines.Sockets.Unofficial.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\StackExchange.Redis.2.9.11\lib\net472\StackExchange.Redis.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
|
<Reference Include="System.Configuration.ConfigurationManager, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Data.SQLite.2.0.1\lib\net471\System.Data.SQLite.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Deployment" />
|
||||||
|
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Management" />
|
||||||
|
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Numerics" />
|
||||||
|
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Channels, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Threading.Channels.5.0.0\lib\net461\System.Threading.Channels.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Transactions" />
|
||||||
|
<Reference Include="System.Windows.Forms" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="ZstdSharp, Version=0.8.5.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||||
|
<HintPath>packages\ZstdSharp.Port.0.8.5\lib\net462\ZstdSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Data" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Windows.Forms" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ApplicationLog.vb" />
|
||||||
|
<Compile Include="CallInfoNode.vb" />
|
||||||
|
<Compile Include="Database\Base\ColumnSchema.vb" />
|
||||||
|
<Compile Include="Database\Base\CommandHelpers.vb" />
|
||||||
|
<Compile Include="Database\Base\DatabaseData.vb" />
|
||||||
|
<Compile Include="Database\Base\DatabaseSchema.vb" />
|
||||||
|
<Compile Include="Database\Base\ForeignKeySchema.vb" />
|
||||||
|
<Compile Include="Database\Base\IndexSchema.vb" />
|
||||||
|
<Compile Include="Database\Base\InsertParams.vb" />
|
||||||
|
<Compile Include="Database\Base\SearchCondition.vb" />
|
||||||
|
<Compile Include="Database\Base\SearchParams.vb" />
|
||||||
|
<Compile Include="Database\Base\TableSchema.vb" />
|
||||||
|
<Compile Include="Database\Base\TriggerBuilder.vb" />
|
||||||
|
<Compile Include="Database\Base\TriggerSchema.vb" />
|
||||||
|
<Compile Include="Database\Base\ViewSchema.vb" />
|
||||||
|
<Compile Include="Database\DbCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\DbExecutor.vb" />
|
||||||
|
<Compile Include="Database\MssqlCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\Mssql\MssqlCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\MysqlCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\MysqlDataParam.vb" />
|
||||||
|
<Compile Include="Database\Mysql\DataParam.vb" />
|
||||||
|
<Compile Include="Database\Mysql\MysqlCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\SqliteCmdHelper.vb" />
|
||||||
|
<Compile Include="Database\SqliteDataParam.vb" />
|
||||||
|
<Compile Include="Database\Sqlite\DataParam.vb" />
|
||||||
|
<Compile Include="Database\Sqlite\SqliteCmdHelper.vb" />
|
||||||
|
<Compile Include="PhoneBurstification.vb" />
|
||||||
|
<Compile Include="publicMode.vb" />
|
||||||
|
<Compile Include="Redis\RedisSubscriber.vb" />
|
||||||
|
<Compile Include="Telephone.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Telephone.Designer.vb">
|
||||||
|
<DependentUpon>Telephone.vb</DependentUpon>
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="RuningLog.vb" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Telephone.resx">
|
||||||
|
<DependentUpon>Telephone.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="App.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
<Import Project="packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" />
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.Extensions.Logging.Abstractions.6.0.0\build\Microsoft.Extensions.Logging.Abstractions.targets'))" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
||||||
BIN
bin/Debug/BouncyCastle.Cryptography.dll
Normal file
BIN
bin/Debug/BouncyCastle.Cryptography.dll
Normal file
Binary file not shown.
30259
bin/Debug/BouncyCastle.Cryptography.xml
Normal file
30259
bin/Debug/BouncyCastle.Cryptography.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/FlexCell.dll
Normal file
BIN
bin/Debug/FlexCell.dll
Normal file
Binary file not shown.
BIN
bin/Debug/Google.Protobuf.dll
Normal file
BIN
bin/Debug/Google.Protobuf.dll
Normal file
Binary file not shown.
BIN
bin/Debug/Google.Protobuf.pdb
Normal file
BIN
bin/Debug/Google.Protobuf.pdb
Normal file
Binary file not shown.
11896
bin/Debug/Google.Protobuf.xml
Normal file
11896
bin/Debug/Google.Protobuf.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/K4os.Compression.LZ4.Streams.dll
Normal file
BIN
bin/Debug/K4os.Compression.LZ4.Streams.dll
Normal file
Binary file not shown.
2072
bin/Debug/K4os.Compression.LZ4.Streams.xml
Normal file
2072
bin/Debug/K4os.Compression.LZ4.Streams.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/K4os.Compression.LZ4.dll
Normal file
BIN
bin/Debug/K4os.Compression.LZ4.dll
Normal file
Binary file not shown.
1673
bin/Debug/K4os.Compression.LZ4.xml
Normal file
1673
bin/Debug/K4os.Compression.LZ4.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/K4os.Hash.xxHash.dll
Normal file
BIN
bin/Debug/K4os.Hash.xxHash.dll
Normal file
Binary file not shown.
245
bin/Debug/K4os.Hash.xxHash.xml
Normal file
245
bin/Debug/K4os.Hash.xxHash.xml
Normal file
@@ -0,0 +1,245 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>K4os.Hash.xxHash</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:K4os.Hash.xxHash.HashAlgorithmAdapter">
|
||||||
|
<summary>
|
||||||
|
Adapter implementing <see cref="T:System.Security.Cryptography.HashAlgorithm"/>
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.HashAlgorithmAdapter.#ctor(System.Int32,System.Action,System.Action{System.Byte[],System.Int32,System.Int32},System.Func{System.Byte[]})">
|
||||||
|
<summary>
|
||||||
|
Creates new <see cref="T:K4os.Hash.xxHash.HashAlgorithmAdapter"/>.
|
||||||
|
</summary>
|
||||||
|
<param name="hashSize">Hash size (in bytes)</param>
|
||||||
|
<param name="reset">Reset function.</param>
|
||||||
|
<param name="update">Update function.</param>
|
||||||
|
<param name="digest">Digest function.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:K4os.Hash.xxHash.HashAlgorithmAdapter.HashSize">
|
||||||
|
<inheritdoc />
|
||||||
|
</member>
|
||||||
|
<member name="P:K4os.Hash.xxHash.HashAlgorithmAdapter.Hash">
|
||||||
|
<inheritdoc />
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.HashAlgorithmAdapter.HashCore(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<inheritdoc />
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.HashAlgorithmAdapter.HashFinal">
|
||||||
|
<inheritdoc />
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.HashAlgorithmAdapter.Initialize">
|
||||||
|
<inheritdoc />
|
||||||
|
</member>
|
||||||
|
<member name="T:K4os.Hash.xxHash.XXH">
|
||||||
|
<summary>
|
||||||
|
Base class for both <see cref="T:K4os.Hash.xxHash.XXH32"/> and <see cref="T:K4os.Hash.xxHash.XXH64"/>. Do not use directly.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH.#ctor">
|
||||||
|
<summary>Protected constructor to prevent instantiation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:K4os.Hash.xxHash.XXH32">
|
||||||
|
<summary>
|
||||||
|
xxHash 32-bit.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:K4os.Hash.xxHash.XXH32.State">
|
||||||
|
<summary>Internal state of the algorithm.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:K4os.Hash.xxHash.XXH32.EmptyHash">
|
||||||
|
<summary>Hash of empty buffer.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.DigestOf(System.Void*,System.Int32)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.DigestOf(System.Void*,System.Int32,System.UInt32)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<param name="seed">Seed.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.DigestOf(System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.DigestOf(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="offset">Starting offset.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.#ctor">
|
||||||
|
<summary>Creates xxHash instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.#ctor(System.UInt32)">
|
||||||
|
<summary>Creates xxHash instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Reset">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Reset(System.UInt32)">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(System.Void*,System.Int32)">
|
||||||
|
<summary>Updates the hash using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(System.Byte*,System.Int32)">
|
||||||
|
<summary>Updates the hash using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="offset">Starting offset.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Digest">
|
||||||
|
<summary>Hash so far.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.DigestBytes">
|
||||||
|
<summary>Hash so far, as byte array.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.AsHashAlgorithm">
|
||||||
|
<summary>Converts this class to <see cref="T:System.Security.Cryptography.HashAlgorithm"/></summary>
|
||||||
|
<returns><see cref="T:System.Security.Cryptography.HashAlgorithm"/></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Reset(K4os.Hash.xxHash.XXH32.State@,System.UInt32)">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="seed">Hash seed.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(K4os.Hash.xxHash.XXH32.State@,System.Void*,System.Int32)">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Update(K4os.Hash.xxHash.XXH32.State@,System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH32.Digest(K4os.Hash.xxHash.XXH32.State@)">
|
||||||
|
<summary>Hash so far.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:K4os.Hash.xxHash.XXH64">
|
||||||
|
<summary>
|
||||||
|
xxHash 64-bit.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:K4os.Hash.xxHash.XXH64.State">
|
||||||
|
<summary>Internal state of the algorithm.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:K4os.Hash.xxHash.XXH64.EmptyHash">
|
||||||
|
<summary>Hash of empty buffer.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.DigestOf(System.Void*,System.Int32)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.DigestOf(System.Void*,System.Int32,System.UInt64)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<param name="seed">Seed.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.DigestOf(System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.DigestOf(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>Hash of provided buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="offset">Starting offset.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
<returns>Digest.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.#ctor">
|
||||||
|
<summary>Creates xxHash instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.#ctor(System.UInt64)">
|
||||||
|
<summary>Creates xxHash instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Reset">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Reset(System.UInt64)">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(System.Void*,System.Int32)">
|
||||||
|
<summary>Updates the hash using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(System.Byte*,System.Int32)">
|
||||||
|
<summary>Updates the hash using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(System.Byte[],System.Int32,System.Int32)">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="offset">Starting offset.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Digest">
|
||||||
|
<summary>Hash so far.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.DigestBytes">
|
||||||
|
<summary>Hash so far, as byte array.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.AsHashAlgorithm">
|
||||||
|
<summary>Converts this class to <see cref="T:System.Security.Cryptography.HashAlgorithm"/></summary>
|
||||||
|
<returns><see cref="T:System.Security.Cryptography.HashAlgorithm"/></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Reset(K4os.Hash.xxHash.XXH64.State@,System.UInt64)">
|
||||||
|
<summary>Resets hash calculation.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="seed">Hash seed.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(K4os.Hash.xxHash.XXH64.State@,System.Void*,System.Int32)">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
<param name="length">Length of buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Update(K4os.Hash.xxHash.XXH64.State@,System.ReadOnlySpan{System.Byte})">
|
||||||
|
<summary>Updates the has using given buffer.</summary>
|
||||||
|
<param name="state">Hash state.</param>
|
||||||
|
<param name="bytes">Buffer.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:K4os.Hash.xxHash.XXH64.Digest(K4os.Hash.xxHash.XXH64.State@)">
|
||||||
|
<summary>Hash so far.</summary>
|
||||||
|
<returns>Hash so far.</returns>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
BIN
bin/Debug/Microsoft.Bcl.AsyncInterfaces.dll
Normal file
Binary file not shown.
223
bin/Debug/Microsoft.Bcl.AsyncInterfaces.xml
Normal file
223
bin/Debug/Microsoft.Bcl.AsyncInterfaces.xml
Normal file
@@ -0,0 +1,223 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>Microsoft.Bcl.AsyncInterfaces</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1">
|
||||||
|
<summary>Provides the core logic for implementing a manual-reset <see cref="T:System.Threading.Tasks.Sources.IValueTaskSource"/> or <see cref="T:System.Threading.Tasks.Sources.IValueTaskSource`1"/>.</summary>
|
||||||
|
<typeparam name="TResult"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._continuation">
|
||||||
|
<summary>
|
||||||
|
The callback to invoke when the operation completes if <see cref="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.OnCompleted(System.Action{System.Object},System.Object,System.Int16,System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags)"/> was called before the operation completed,
|
||||||
|
or <see cref="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCoreShared.s_sentinel"/> if the operation completed before a callback was supplied,
|
||||||
|
or null if a callback hasn't yet been provided and the operation hasn't yet completed.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._continuationState">
|
||||||
|
<summary>State to pass to <see cref="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._continuation"/>.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._executionContext">
|
||||||
|
<summary><see cref="T:System.Threading.ExecutionContext"/> to flow to the callback, or null if no flowing is required.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._capturedContext">
|
||||||
|
<summary>
|
||||||
|
A "captured" <see cref="T:System.Threading.SynchronizationContext"/> or <see cref="T:System.Threading.Tasks.TaskScheduler"/> with which to invoke the callback,
|
||||||
|
or null if no special context is required.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._completed">
|
||||||
|
<summary>Whether the current operation has completed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._result">
|
||||||
|
<summary>The result with which the operation succeeded, or the default value if it hasn't yet completed or failed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._error">
|
||||||
|
<summary>The exception with which the operation failed, or null if it hasn't yet completed or completed successfully.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._version">
|
||||||
|
<summary>The current version of this value, used to help prevent misuse.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.RunContinuationsAsynchronously">
|
||||||
|
<summary>Gets or sets whether to force continuations to run asynchronously.</summary>
|
||||||
|
<remarks>Continuations may run asynchronously if this is false, but they'll never run synchronously if this is true.</remarks>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.Reset">
|
||||||
|
<summary>Resets to prepare for the next operation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SetResult(`0)">
|
||||||
|
<summary>Completes with a successful result.</summary>
|
||||||
|
<param name="result">The result.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SetException(System.Exception)">
|
||||||
|
<summary>Complets with an error.</summary>
|
||||||
|
<param name="error"></param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.Version">
|
||||||
|
<summary>Gets the operation version.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetStatus(System.Int16)">
|
||||||
|
<summary>Gets the status of the operation.</summary>
|
||||||
|
<param name="token">Opaque value that was provided to the <see cref="T:System.Threading.Tasks.ValueTask"/>'s constructor.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.GetResult(System.Int16)">
|
||||||
|
<summary>Gets the result of the operation.</summary>
|
||||||
|
<param name="token">Opaque value that was provided to the <see cref="T:System.Threading.Tasks.ValueTask"/>'s constructor.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.OnCompleted(System.Action{System.Object},System.Object,System.Int16,System.Threading.Tasks.Sources.ValueTaskSourceOnCompletedFlags)">
|
||||||
|
<summary>Schedules the continuation action for this operation.</summary>
|
||||||
|
<param name="continuation">The continuation to invoke when the operation has completed.</param>
|
||||||
|
<param name="state">The state object to pass to <paramref name="continuation"/> when it's invoked.</param>
|
||||||
|
<param name="token">Opaque value that was provided to the <see cref="T:System.Threading.Tasks.ValueTask"/>'s constructor.</param>
|
||||||
|
<param name="flags">The flags describing the behavior of the continuation.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.ValidateToken(System.Int16)">
|
||||||
|
<summary>Ensures that the specified token matches the current version.</summary>
|
||||||
|
<param name="token">The token supplied by <see cref="T:System.Threading.Tasks.ValueTask"/>.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.SignalCompletion">
|
||||||
|
<summary>Signals that the operation has completed. Invoked after the result or error has been set.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.InvokeContinuation">
|
||||||
|
<summary>
|
||||||
|
Invokes the continuation with the appropriate captured context / scheduler.
|
||||||
|
This assumes that if <see cref="F:System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1._executionContext"/> is not null we're already
|
||||||
|
running within that <see cref="T:System.Threading.ExecutionContext"/>.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Tasks.TaskAsyncEnumerableExtensions">
|
||||||
|
<summary>Provides a set of static methods for configuring <see cref="T:System.Threading.Tasks.Task"/>-related behaviors on asynchronous enumerables and disposables.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.TaskAsyncEnumerableExtensions.ConfigureAwait(System.IAsyncDisposable,System.Boolean)">
|
||||||
|
<summary>Configures how awaits on the tasks returned from an async disposable will be performed.</summary>
|
||||||
|
<param name="source">The source async disposable.</param>
|
||||||
|
<param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
|
||||||
|
<returns>The configured async disposable.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.TaskAsyncEnumerableExtensions.ConfigureAwait``1(System.Collections.Generic.IAsyncEnumerable{``0},System.Boolean)">
|
||||||
|
<summary>Configures how awaits on the tasks returned from an async iteration will be performed.</summary>
|
||||||
|
<typeparam name="T">The type of the objects being iterated.</typeparam>
|
||||||
|
<param name="source">The source enumerable being iterated.</param>
|
||||||
|
<param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
|
||||||
|
<returns>The configured enumerable.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.TaskAsyncEnumerableExtensions.WithCancellation``1(System.Collections.Generic.IAsyncEnumerable{``0},System.Threading.CancellationToken)">
|
||||||
|
<summary>Sets the <see cref="T:System.Threading.CancellationToken"/> to be passed to <see cref="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)"/> when iterating.</summary>
|
||||||
|
<typeparam name="T">The type of the objects being iterated.</typeparam>
|
||||||
|
<param name="source">The source enumerable being iterated.</param>
|
||||||
|
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken"/> to use.</param>
|
||||||
|
<returns>The configured enumerable.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder">
|
||||||
|
<summary>Represents a builder for asynchronous iterators.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.Create">
|
||||||
|
<summary>Creates an instance of the <see cref="T:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder"/> struct.</summary>
|
||||||
|
<returns>The initialized instance.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.MoveNext``1(``0@)">
|
||||||
|
<summary>Invokes <see cref="M:System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext"/> on the state machine while guarding the <see cref="T:System.Threading.ExecutionContext"/>.</summary>
|
||||||
|
<typeparam name="TStateMachine">The type of the state machine.</typeparam>
|
||||||
|
<param name="stateMachine">The state machine instance, passed by reference.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.AwaitOnCompleted``2(``0@,``1@)">
|
||||||
|
<summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
|
||||||
|
<typeparam name="TAwaiter">The type of the awaiter.</typeparam>
|
||||||
|
<typeparam name="TStateMachine">The type of the state machine.</typeparam>
|
||||||
|
<param name="awaiter">The awaiter.</param>
|
||||||
|
<param name="stateMachine">The state machine.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.AwaitUnsafeOnCompleted``2(``0@,``1@)">
|
||||||
|
<summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
|
||||||
|
<typeparam name="TAwaiter">The type of the awaiter.</typeparam>
|
||||||
|
<typeparam name="TStateMachine">The type of the state machine.</typeparam>
|
||||||
|
<param name="awaiter">The awaiter.</param>
|
||||||
|
<param name="stateMachine">The state machine.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.Complete">
|
||||||
|
<summary>Marks iteration as being completed, whether successfully or otherwise.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.AsyncIteratorMethodBuilder.ObjectIdForDebugger">
|
||||||
|
<summary>Gets an object that may be used to uniquely identify this builder to the debugger.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute">
|
||||||
|
<summary>Indicates whether a method is an asynchronous iterator.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute.#ctor(System.Type)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Runtime.CompilerServices.AsyncIteratorStateMachineAttribute"/> class.</summary>
|
||||||
|
<param name="stateMachineType">The type object for the underlying state machine type that's used to implement a state machine method.</param>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ConfiguredAsyncDisposable">
|
||||||
|
<summary>Provides a type that can be used to configure how awaits on an <see cref="T:System.IAsyncDisposable"/> are performed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1">
|
||||||
|
<summary>Provides an awaitable async enumerable that enables cancelable iteration and configured awaits.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.ConfigureAwait(System.Boolean)">
|
||||||
|
<summary>Configures how awaits on the tasks returned from an async iteration will be performed.</summary>
|
||||||
|
<param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
|
||||||
|
<returns>The configured enumerable.</returns>
|
||||||
|
<remarks>This will replace any previous value set by <see cref="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.ConfigureAwait(System.Boolean)"/> for this iteration.</remarks>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.WithCancellation(System.Threading.CancellationToken)">
|
||||||
|
<summary>Sets the <see cref="T:System.Threading.CancellationToken"/> to be passed to <see cref="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)"/> when iterating.</summary>
|
||||||
|
<param name="cancellationToken">The <see cref="T:System.Threading.CancellationToken"/> to use.</param>
|
||||||
|
<returns>The configured enumerable.</returns>
|
||||||
|
<remarks>This will replace any previous <see cref="T:System.Threading.CancellationToken"/> set by <see cref="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.WithCancellation(System.Threading.CancellationToken)"/> for this iteration.</remarks>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.Enumerator">
|
||||||
|
<summary>Provides an awaitable async enumerator that enables cancelable iteration and configured awaits.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.Enumerator.MoveNextAsync">
|
||||||
|
<summary>Advances the enumerator asynchronously to the next element of the collection.</summary>
|
||||||
|
<returns>
|
||||||
|
A <see cref="T:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1"/> that will complete with a result of <c>true</c>
|
||||||
|
if the enumerator was successfully advanced to the next element, or <c>false</c> if the enumerator has
|
||||||
|
passed the end of the collection.
|
||||||
|
</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.Enumerator.Current">
|
||||||
|
<summary>Gets the element in the collection at the current position of the enumerator.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1.Enumerator.DisposeAsync">
|
||||||
|
<summary>
|
||||||
|
Performs application-defined tasks associated with freeing, releasing, or
|
||||||
|
resetting unmanaged resources asynchronously.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Collections.Generic.IAsyncEnumerable`1">
|
||||||
|
<summary>Exposes an enumerator that provides asynchronous iteration over values of a specified type.</summary>
|
||||||
|
<typeparam name="T">The type of values to enumerate.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)">
|
||||||
|
<summary>Returns an enumerator that iterates asynchronously through the collection.</summary>
|
||||||
|
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken"/> that may be used to cancel the asynchronous iteration.</param>
|
||||||
|
<returns>An enumerator that can be used to iterate asynchronously through the collection.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Collections.Generic.IAsyncEnumerator`1">
|
||||||
|
<summary>Supports a simple asynchronous iteration over a generic collection.</summary>
|
||||||
|
<typeparam name="T">The type of objects to enumerate.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Collections.Generic.IAsyncEnumerator`1.MoveNextAsync">
|
||||||
|
<summary>Advances the enumerator asynchronously to the next element of the collection.</summary>
|
||||||
|
<returns>
|
||||||
|
A <see cref="T:System.Threading.Tasks.ValueTask`1"/> that will complete with a result of <c>true</c> if the enumerator
|
||||||
|
was successfully advanced to the next element, or <c>false</c> if the enumerator has passed the end
|
||||||
|
of the collection.
|
||||||
|
</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Collections.Generic.IAsyncEnumerator`1.Current">
|
||||||
|
<summary>Gets the element in the collection at the current position of the enumerator.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IAsyncDisposable">
|
||||||
|
<summary>Provides a mechanism for releasing unmanaged resources asynchronously.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IAsyncDisposable.DisposeAsync">
|
||||||
|
<summary>
|
||||||
|
Performs application-defined tasks associated with freeing, releasing, or
|
||||||
|
resetting unmanaged resources asynchronously.
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/Microsoft.Extensions.Logging.Abstractions.dll
Normal file
BIN
bin/Debug/Microsoft.Extensions.Logging.Abstractions.dll
Normal file
Binary file not shown.
1228
bin/Debug/Microsoft.Extensions.Logging.Abstractions.xml
Normal file
1228
bin/Debug/Microsoft.Extensions.Logging.Abstractions.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/MySql.Data.dll
Normal file
BIN
bin/Debug/MySql.Data.dll
Normal file
Binary file not shown.
18618
bin/Debug/MySql.Data.xml
Normal file
18618
bin/Debug/MySql.Data.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/Newtonsoft.Json.dll
Normal file
BIN
bin/Debug/Newtonsoft.Json.dll
Normal file
Binary file not shown.
11363
bin/Debug/Newtonsoft.Json.xml
Normal file
11363
bin/Debug/Newtonsoft.Json.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/Pipelines.Sockets.Unofficial.dll
Normal file
BIN
bin/Debug/Pipelines.Sockets.Unofficial.dll
Normal file
Binary file not shown.
2083
bin/Debug/Pipelines.Sockets.Unofficial.xml
Normal file
2083
bin/Debug/Pipelines.Sockets.Unofficial.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/StackExchange.Redis.dll
Normal file
BIN
bin/Debug/StackExchange.Redis.dll
Normal file
Binary file not shown.
13115
bin/Debug/StackExchange.Redis.xml
Normal file
13115
bin/Debug/StackExchange.Redis.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/System.Buffers.dll
Normal file
BIN
bin/Debug/System.Buffers.dll
Normal file
Binary file not shown.
38
bin/Debug/System.Buffers.xml
Normal file
38
bin/Debug/System.Buffers.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.Buffers</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Buffers.ArrayPool`1">
|
||||||
|
<summary>Provides a resource pool that enables reusing instances of type <see cref="T[]"></see>.</summary>
|
||||||
|
<typeparam name="T">The type of the objects that are in the resource pool.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Buffers.ArrayPool`1.#ctor">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Buffers.ArrayPool`1.Create">
|
||||||
|
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class.</summary>
|
||||||
|
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Buffers.ArrayPool`1.Create(System.Int32,System.Int32)">
|
||||||
|
<summary>Creates a new instance of the <see cref="T:System.Buffers.ArrayPool`1"></see> class using the specifed configuration.</summary>
|
||||||
|
<param name="maxArrayLength">The maximum length of an array instance that may be stored in the pool.</param>
|
||||||
|
<param name="maxArraysPerBucket">The maximum number of array instances that may be stored in each bucket in the pool. The pool groups arrays of similar lengths into buckets for faster access.</param>
|
||||||
|
<returns>A new instance of the <see cref="System.Buffers.ArrayPool`1"></see> class with the specified configuration.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Buffers.ArrayPool`1.Rent(System.Int32)">
|
||||||
|
<summary>Retrieves a buffer that is at least the requested length.</summary>
|
||||||
|
<param name="minimumLength">The minimum length of the array.</param>
|
||||||
|
<returns>An array of type <see cref="T[]"></see> that is at least <paramref name="minimumLength">minimumLength</paramref> in length.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)">
|
||||||
|
<summary>Returns an array to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method on the same <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
|
||||||
|
<param name="array">A buffer to return to the pool that was previously obtained using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method.</param>
|
||||||
|
<param name="clearArray">Indicates whether the contents of the buffer should be cleared before reuse. If <paramref name="clearArray">clearArray</paramref> is set to true, and if the pool will store the buffer to enable subsequent reuse, the <see cref="M:System.Buffers.ArrayPool`1.Return(`0[],System.Boolean)"></see> method will clear the <paramref name="array">array</paramref> of its contents so that a subsequent caller using the <see cref="M:System.Buffers.ArrayPool`1.Rent(System.Int32)"></see> method will not see the content of the previous caller. If <paramref name="clearArray">clearArray</paramref> is set to false or if the pool will release the buffer, the array&#39;s contents are left unchanged.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Buffers.ArrayPool`1.Shared">
|
||||||
|
<summary>Gets a shared <see cref="T:System.Buffers.ArrayPool`1"></see> instance.</summary>
|
||||||
|
<returns>A shared <see cref="System.Buffers.ArrayPool`1"></see> instance.</returns>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/System.Configuration.ConfigurationManager.dll
Normal file
BIN
bin/Debug/System.Configuration.ConfigurationManager.dll
Normal file
Binary file not shown.
5265
bin/Debug/System.Configuration.ConfigurationManager.xml
Normal file
5265
bin/Debug/System.Configuration.ConfigurationManager.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/System.Data.SQLite.dll
Normal file
BIN
bin/Debug/System.Data.SQLite.dll
Normal file
Binary file not shown.
BIN
bin/Debug/System.Diagnostics.DiagnosticSource.dll
Normal file
BIN
bin/Debug/System.Diagnostics.DiagnosticSource.dll
Normal file
Binary file not shown.
1886
bin/Debug/System.Diagnostics.DiagnosticSource.xml
Normal file
1886
bin/Debug/System.Diagnostics.DiagnosticSource.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/System.IO.Pipelines.dll
Normal file
BIN
bin/Debug/System.IO.Pipelines.dll
Normal file
Binary file not shown.
341
bin/Debug/System.IO.Pipelines.xml
Normal file
341
bin/Debug/System.IO.Pipelines.xml
Normal file
@@ -0,0 +1,341 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.IO.Pipelines</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.IO.Pipelines.FlushResult">
|
||||||
|
<summary>Result returned by <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> call.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.FlushResult.#ctor(System.Boolean,System.Boolean)">
|
||||||
|
<summary>Initializes a new instance of <see cref="T:System.IO.Pipelines.FlushResult" /> struct setting the <see cref="P:System.IO.Pipelines.FlushResult.IsCanceled" /> and <see cref="P:System.IO.Pipelines.FlushResult.IsCompleted" /> flags.</summary>
|
||||||
|
<param name="isCanceled">
|
||||||
|
<see langword="true" /> to indicate the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation that produced this <see cref="T:System.IO.Pipelines.FlushResult" /> was canceled by <see cref="M:System.IO.Pipelines.PipeWriter.CancelPendingFlush" />; otherwise, <see langword="false" />.</param>
|
||||||
|
<param name="isCompleted">
|
||||||
|
<see langword="true" /> to indicate the reader is no longer reading data written to the <see cref="T:System.IO.Pipelines.PipeWriter" />.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.FlushResult.IsCanceled">
|
||||||
|
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the current <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation was canceled; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.FlushResult.IsCompleted">
|
||||||
|
<summary>Gets a value that indicates the reader is no longer reading data written to the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the reader is no longer reading data written to the <see cref="T:System.IO.Pipelines.PipeWriter" />; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.IDuplexPipe">
|
||||||
|
<summary>Defines a class that provides a duplex pipe from which data can be read from and written to.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.IDuplexPipe.Input">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeReader" /> half of the duplex pipe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.IDuplexPipe.Output">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeWriter" /> half of the duplex pipe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.Pipe">
|
||||||
|
<summary>The default <see cref="T:System.IO.Pipelines.PipeWriter" /> and <see cref="T:System.IO.Pipelines.PipeReader" /> implementation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.Pipe.#ctor">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.IO.Pipelines.Pipe" /> class using <see cref="P:System.IO.Pipelines.PipeOptions.Default" /> as options.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.Pipe.#ctor(System.IO.Pipelines.PipeOptions)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.IO.Pipelines.Pipe" /> class with the specified options.</summary>
|
||||||
|
<param name="options">The set of options for this pipe.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.Pipe.Reset">
|
||||||
|
<summary>Resets the pipe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.Pipe.Reader">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeReader" /> for this pipe.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeReader" /> instance for this pipe.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.Pipe.Writer">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeWriter" /> for this pipe.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeWriter" /> instance for this pipe.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.PipeOptions">
|
||||||
|
<summary>Represents a set of <see cref="T:System.IO.Pipelines.Pipe" /> options.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeOptions.#ctor(System.Buffers.MemoryPool{System.Byte},System.IO.Pipelines.PipeScheduler,System.IO.Pipelines.PipeScheduler,System.Int64,System.Int64,System.Int32,System.Boolean)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.IO.Pipelines.PipeOptions" /> class with the specified parameters.</summary>
|
||||||
|
<param name="pool">The pool of memory blocks to be used for buffer management.</param>
|
||||||
|
<param name="readerScheduler">The <see cref="T:System.IO.Pipelines.PipeScheduler" /> to be used to execute <see cref="T:System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</param>
|
||||||
|
<param name="writerScheduler">The <see cref="T:System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="T:System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</param>
|
||||||
|
<param name="pauseWriterThreshold">The number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> before <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> starts blocking. A value of zero prevents <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> from ever blocking, effectively making the number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> unlimited.</param>
|
||||||
|
<param name="resumeWriterThreshold">The number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> when <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> stops blocking.</param>
|
||||||
|
<param name="minimumSegmentSize">The minimum size of the segment requested from <paramref name="pool" />.</param>
|
||||||
|
<param name="useSynchronizationContext">
|
||||||
|
<see langword="true" /> if asynchronous continuations should be executed on the <see cref="T:System.Threading.SynchronizationContext" /> they were captured on; <see langword="false" /> otherwise. This takes precedence over the schedulers specified in <see cref="P:System.IO.Pipelines.PipeOptions.ReaderScheduler" /> and <see cref="P:System.IO.Pipelines.PipeOptions.WriterScheduler" />.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.Default">
|
||||||
|
<summary>Gets the default instance of <see cref="T:System.IO.Pipelines.PipeOptions" />.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeOptions" /> object initialized with default parameters.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.MinimumSegmentSize">
|
||||||
|
<summary>Gets the minimum size of the segment requested from the <see cref="P:System.IO.Pipelines.PipeOptions.Pool" />.</summary>
|
||||||
|
<returns>The minimum size of the segment requested from the <see cref="P:System.IO.Pipelines.PipeOptions.Pool" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.PauseWriterThreshold">
|
||||||
|
<summary>Gets the number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> when <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> starts blocking.</summary>
|
||||||
|
<returns>The number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> when <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> starts blocking.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.Pool">
|
||||||
|
<summary>Gets the <see cref="T:System.Buffers.MemoryPool`1" /> object used for buffer management.</summary>
|
||||||
|
<returns>A pool of memory blocks used for buffer management.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.ReaderScheduler">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="T:System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeScheduler" /> that is used to execute <see cref="T:System.IO.Pipelines.PipeReader" /> callbacks and async continuations.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.ResumeWriterThreshold">
|
||||||
|
<summary>Gets the number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> when <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> stops blocking.</summary>
|
||||||
|
<returns>The number of bytes in the <see cref="T:System.IO.Pipelines.Pipe" /> when <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> stops blocking.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.UseSynchronizationContext">
|
||||||
|
<summary>Gets a value that determines if asynchronous callbacks and continuations should be executed on the <see cref="T:System.Threading.SynchronizationContext" /> they were captured on. This takes precedence over the schedulers specified in <see cref="P:System.IO.Pipelines.PipeOptions.ReaderScheduler" /> and <see cref="P:System.IO.Pipelines.PipeOptions.WriterScheduler" />.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if asynchronous callbacks and continuations should be executed on the <see cref="T:System.Threading.SynchronizationContext" /> they were captured on; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeOptions.WriterScheduler">
|
||||||
|
<summary>Gets the <see cref="T:System.IO.Pipelines.PipeScheduler" /> used to execute <see cref="T:System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeScheduler" /> object used to execute <see cref="T:System.IO.Pipelines.PipeWriter" /> callbacks and async continuations.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.PipeReader">
|
||||||
|
<summary>Defines a class that provides access to a read side of pipe.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.#ctor">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.IO.Pipelines.PipeReader" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.AdvanceTo(System.SequencePosition)">
|
||||||
|
<summary>Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed.</summary>
|
||||||
|
<param name="consumed">Marks the extent of the data that has been successfully processed.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.AdvanceTo(System.SequencePosition,System.SequencePosition)">
|
||||||
|
<summary>Moves forward the pipeline's read cursor to after the consumed data, marking the data as processed, read and examined.</summary>
|
||||||
|
<param name="consumed">Marks the extent of the data that has been successfully processed.</param>
|
||||||
|
<param name="examined">Marks the extent of the data that has been read and examined.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.AsStream(System.Boolean)">
|
||||||
|
<summary>Returns a <see cref="T:System.IO.Stream" /> representation of the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
<param name="leaveOpen">An optional flag that indicates whether disposing the returned <see cref="T:System.IO.Stream" /> leaves <see cref="T:System.IO.Pipelines.PipeReader" /> open (<see langword="true" />) or completes <see cref="T:System.IO.Pipelines.PipeReader" /> (<see langword="false" />).</param>
|
||||||
|
<returns>A stream that represents the <see cref="T:System.IO.Pipelines.PipeReader" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.CancelPendingRead">
|
||||||
|
<summary>Cancels to currently pending or if none is pending next call to <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" />, without completing the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.Complete(System.Exception)">
|
||||||
|
<summary>Signals to the producer that the consumer is done reading.</summary>
|
||||||
|
<param name="exception">Optional <see cref="T:System.Exception" /> indicating a failure that's causing the pipeline to complete.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.CompleteAsync(System.Exception)">
|
||||||
|
<summary>Marks the current pipe reader instance as being complete, meaning no more data will be read from it.</summary>
|
||||||
|
<param name="exception">An optional exception that indicates the failure that caused the reader to complete.</param>
|
||||||
|
<returns>A value task that represents the asynchronous complete operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.CopyToAsync(System.IO.Pipelines.PipeWriter,System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads the bytes from the <see cref="T:System.IO.Pipelines.PipeReader" /> and writes them to the specified <see cref="T:System.IO.Pipelines.PipeWriter" />, using a specified buffer size and cancellation token.</summary>
|
||||||
|
<param name="destination">The pipe writer to which the contents of the current stream will be copied.</param>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents the asynchronous copy operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.CopyToAsync(System.IO.Stream,System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads the bytes from the <see cref="T:System.IO.Pipelines.PipeReader" /> and writes them to the specified stream, using a specified cancellation token.</summary>
|
||||||
|
<param name="destination">The stream to which the contents of the current stream will be copied.</param>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents the asynchronous copy operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.Create(System.IO.Stream,System.IO.Pipelines.StreamPipeReaderOptions)">
|
||||||
|
<summary>Creates a <see cref="T:System.IO.Pipelines.PipeReader" /> wrapping the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||||
|
<param name="stream">The stream that the pipe reader will wrap.</param>
|
||||||
|
<param name="readerOptions">The options to configure the pipe reader.</param>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeReader" /> that wraps the <see cref="T:System.IO.Stream" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.OnWriterCompleted(System.Action{System.Exception,System.Object},System.Object)">
|
||||||
|
<summary>Registers a callback that executes when the <see cref="T:System.IO.Pipelines.PipeWriter" /> side of the pipe is completed.</summary>
|
||||||
|
<param name="callback">The callback to register.</param>
|
||||||
|
<param name="state">The state object to pass to <paramref name="callback" /> when it's invoked.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads a sequence of bytes from the current <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see langword="default" />.</param>
|
||||||
|
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> representing the asynchronous read operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeReader.TryRead(System.IO.Pipelines.ReadResult@)">
|
||||||
|
<summary>Attempts to synchronously read data the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
<param name="result">When this method returns <see langword="true" />, this value is set to a <see cref="T:System.IO.Pipelines.ReadResult" /> instance that represents the result of the read call; otherwise, this value is set to <see langword="default" />.</param>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if data was available, or if the call was canceled or the writer was completed; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.PipeScheduler">
|
||||||
|
<summary>Abstraction for running <see cref="T:System.IO.Pipelines.PipeReader" /> and <see cref="T:System.IO.Pipelines.PipeWriter" /> callbacks and continuations.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeScheduler.#ctor">
|
||||||
|
<summary>Initializes new a <see cref="T:System.IO.Pipelines.PipeScheduler" /> instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeScheduler.Schedule(System.Action{System.Object},System.Object)">
|
||||||
|
<summary>Requests <paramref name="action" /> to be run on scheduler with <paramref name="state" /> being passed in.</summary>
|
||||||
|
<param name="action">The single-parameter action delegate to schedule.</param>
|
||||||
|
<param name="state">The parameter to pass to the <paramref name="action" /> delegate.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeScheduler.Inline">
|
||||||
|
<summary>The <see cref="T:System.IO.Pipelines.PipeScheduler" /> implementation that runs callbacks inline.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeScheduler" /> instance that runs callbacks inline.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.PipeScheduler.ThreadPool">
|
||||||
|
<summary>The <see cref="T:System.IO.Pipelines.PipeScheduler" /> implementation that queues callbacks to the thread pool.</summary>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeScheduler" /> instance that queues callbacks to the thread pool.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.PipeWriter">
|
||||||
|
<summary>Defines a class that provides a pipeline to which data can be written.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.#ctor">
|
||||||
|
<summary>Initializes a new instance of the class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.Advance(System.Int32)">
|
||||||
|
<summary>Notifies the <see cref="T:System.IO.Pipelines.PipeWriter" /> that <paramref name="bytes" /> bytes were written to the output <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" />. You must request a new buffer after calling <see cref="M:System.IO.Pipelines.PipeWriter.Advance(System.Int32)" /> to continue writing more data; you cannot write to a previously acquired buffer.</summary>
|
||||||
|
<param name="bytes">The number of bytes written to the <see cref="T:System.Span`1" /> or <see cref="T:System.Memory`1" />.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.AsStream(System.Boolean)">
|
||||||
|
<summary>Returns a <see cref="T:System.IO.Stream" /> representation of the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
|
||||||
|
<param name="leaveOpen">An optional flag that indicates whether disposing the returned <see cref="T:System.IO.Stream" /> leaves <see cref="T:System.IO.Pipelines.PipeReader" /> open (<see langword="true" />) or completes <see cref="T:System.IO.Pipelines.PipeReader" /> (<see langword="false" />).</param>
|
||||||
|
<returns>A stream that represents the <see cref="T:System.IO.Pipelines.PipeWriter" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.CancelPendingFlush">
|
||||||
|
<summary>Cancels the pending <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation. If there is none, cancels next <see cref="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)" /> operation, without completing the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.Complete(System.Exception)">
|
||||||
|
<summary>Marks the <see cref="T:System.IO.Pipelines.PipeWriter" /> as being complete, meaning no more items will be written to it.</summary>
|
||||||
|
<param name="exception">Optional <see cref="T:System.Exception" /> indicating a failure that's causing the pipeline to complete.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.CompleteAsync(System.Exception)">
|
||||||
|
<summary>Marks the current pipe writer instance as being complete, meaning no more data will be written to it.</summary>
|
||||||
|
<param name="exception">An optional exception that indicates the failure that caused the pipeline to complete.</param>
|
||||||
|
<returns>A value task that represents the asynchronous complete operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.CopyFromAsync(System.IO.Stream,System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads the bytes from the specified stream and writes them to the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
|
||||||
|
<param name="source">The stream from which the contents will be copied.</param>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents the asynchronous copy operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.Create(System.IO.Stream,System.IO.Pipelines.StreamPipeWriterOptions)">
|
||||||
|
<summary>Creates a <see cref="T:System.IO.Pipelines.PipeWriter" /> wrapping the specified <see cref="T:System.IO.Stream" />.</summary>
|
||||||
|
<param name="stream">The stream that the pipe writer will wrap.</param>
|
||||||
|
<param name="writerOptions">The options to configure the pipe writer.</param>
|
||||||
|
<returns>A <see cref="T:System.IO.Pipelines.PipeWriter" /> that wraps the <see cref="T:System.IO.Stream" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.FlushAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Makes bytes written available to <see cref="T:System.IO.Pipelines.PipeReader" /> and runs <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> continuation.</summary>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents and wraps the asynchronous flush operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.GetMemory(System.Int32)">
|
||||||
|
<summary>Returns a <see cref="T:System.Memory`1" /> to write to that is at least the requested size, as specified by the <paramref name="sizeHint" /> parameter.</summary>
|
||||||
|
<param name="sizeHint">The minimum length of the returned <see cref="T:System.Memory`1" />. If 0, a non-empty memory buffer of arbitrary size is returned.</param>
|
||||||
|
<exception cref="T:System.OutOfMemoryException">The requested buffer size is not available.</exception>
|
||||||
|
<returns>A memory buffer of at least <paramref name="sizeHint" /> bytes. If <paramref name="sizeHint" /> is 0, returns a non-empty buffer of arbitrary size.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.GetSpan(System.Int32)">
|
||||||
|
<summary>Returns a <see cref="T:System.Span`1" /> to write to that is at least the requested size, as specified by the <paramref name="sizeHint" /> parameter.</summary>
|
||||||
|
<param name="sizeHint">The minimum length of the returned <see cref="T:System.Span`1" />. If 0, a non-empty buffer of arbitrary size is returned.</param>
|
||||||
|
<exception cref="T:System.OutOfMemoryException">The requested buffer size is not available.</exception>
|
||||||
|
<returns>A buffer of at least <paramref name="sizeHint" /> bytes. If <paramref name="sizeHint" /> is 0, returns a non-empty buffer of arbitrary size.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.OnReaderCompleted(System.Action{System.Exception,System.Object},System.Object)">
|
||||||
|
<summary>Registers a callback that executes when the <see cref="T:System.IO.Pipelines.PipeReader" /> side of the pipe is completed.</summary>
|
||||||
|
<param name="callback">The callback to register.</param>
|
||||||
|
<param name="state">The state object to pass to <paramref name="callback" /> when it's invoked.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.PipeWriter.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken)">
|
||||||
|
<summary>Writes the specified byte memory range to the pipe and makes data accessible to the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
<param name="source">The read-only byte memory region to write.</param>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents the asynchronous write operation, and wraps the flush asynchronous operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.ReadResult">
|
||||||
|
<summary>Represents the result of a <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> call.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.ReadResult.#ctor(System.Buffers.ReadOnlySequence{System.Byte},System.Boolean,System.Boolean)">
|
||||||
|
<summary>Creates a new instance of <see cref="T:System.IO.Pipelines.ReadResult" /> setting <see cref="P:System.IO.Pipelines.ReadResult.IsCanceled" /> and <see cref="P:System.IO.Pipelines.ReadResult.IsCompleted" /> flags.</summary>
|
||||||
|
<param name="buffer">The read-only sequence containing the bytes of data that were read in the <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> call.</param>
|
||||||
|
<param name="isCanceled">A flag that indicates if the <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation that produced this <see cref="T:System.IO.Pipelines.ReadResult" /> was canceled by <see cref="M:System.IO.Pipelines.PipeReader.CancelPendingRead" />.</param>
|
||||||
|
<param name="isCompleted">A flag that indicates whether the end of the data stream has been reached.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.ReadResult.Buffer">
|
||||||
|
<summary>Gets the <see cref="T:System.Buffers.ReadOnlySequence`1" /> that was read.</summary>
|
||||||
|
<returns>A read-only sequence containing the bytes of data that were read in the <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> call.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.ReadResult.IsCanceled">
|
||||||
|
<summary>Gets a value that indicates whether the current <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation was canceled.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the <see cref="M:System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)" /> operation that produced this <see cref="T:System.IO.Pipelines.ReadResult" /> was canceled by <see cref="M:System.IO.Pipelines.PipeReader.CancelPendingRead" />; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.ReadResult.IsCompleted">
|
||||||
|
<summary>Gets a value that indicates whether the end of the data stream has been reached.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the end of the data stream has been reached; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.StreamPipeExtensions">
|
||||||
|
<summary>Provides extension methods for <see cref="T:System.IO.Stream" /> that support read and write operations directly into pipes.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.StreamPipeExtensions.CopyToAsync(System.IO.Stream,System.IO.Pipelines.PipeWriter,System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads the bytes from the <see cref="T:System.IO.Stream" /> and writes them to the specified <see cref="T:System.IO.Pipelines.PipeWriter" />, using a cancellation token.</summary>
|
||||||
|
<param name="source">The stream from which the contents of the current stream will be copied.</param>
|
||||||
|
<param name="destination">The writer to which the contents of the source stream will be copied.</param>
|
||||||
|
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
|
||||||
|
<returns>A task that represents the asynchronous copy operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.StreamPipeReaderOptions">
|
||||||
|
<summary>Represents a set of options for controlling the creation of the <see cref="T:System.IO.Pipelines.PipeReader" />.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.StreamPipeReaderOptions.#ctor(System.Buffers.MemoryPool{System.Byte},System.Int32,System.Int32,System.Boolean)">
|
||||||
|
<summary>Initializes a <see cref="T:System.IO.Pipelines.StreamPipeReaderOptions" /> instance, optionally specifying a memory pool, a minimum buffer size, a minimum read size, and whether the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeReader" /> completes.</summary>
|
||||||
|
<param name="pool">The memory pool to use when allocating memory. The default value is <see langword="null" />.</param>
|
||||||
|
<param name="bufferSize">The minimum buffer size to use when renting memory from the <paramref name="pool" />. The default value is 4096.</param>
|
||||||
|
<param name="minimumReadSize">The threshold of remaining bytes in the buffer before a new buffer is allocated. The default value is 1024.</param>
|
||||||
|
<param name="leaveOpen">
|
||||||
|
<see langword="true" /> to leave the underlying stream open after the <see cref="T:System.IO.Pipelines.PipeReader" /> completes; <see langword="false" /> to close it. The default is <see langword="false" />.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeReaderOptions.BufferSize">
|
||||||
|
<summary>Gets the minimum buffer size to use when renting memory from the <see cref="P:System.IO.Pipelines.StreamPipeReaderOptions.Pool" />.</summary>
|
||||||
|
<returns>The buffer size.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeReaderOptions.LeaveOpen">
|
||||||
|
<summary>Gets the value that indicates if the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeReader" /> completes.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeReader" /> completes; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeReaderOptions.MinimumReadSize">
|
||||||
|
<summary>Gets the threshold of remaining bytes in the buffer before a new buffer is allocated.</summary>
|
||||||
|
<returns>The minimum read size.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeReaderOptions.Pool">
|
||||||
|
<summary>Gets the <see cref="T:System.Buffers.MemoryPool`1" /> to use when allocating memory.</summary>
|
||||||
|
<returns>A memory pool instance.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.IO.Pipelines.StreamPipeWriterOptions">
|
||||||
|
<summary>Represents a set of options for controlling the creation of the <see cref="T:System.IO.Pipelines.PipeWriter" />.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.IO.Pipelines.StreamPipeWriterOptions.#ctor(System.Buffers.MemoryPool{System.Byte},System.Int32,System.Boolean)">
|
||||||
|
<summary>Initializes a <see cref="T:System.IO.Pipelines.StreamPipeWriterOptions" /> instance, optionally specifying a memory pool, a minimum buffer size, and whether the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeWriter" /> completes.</summary>
|
||||||
|
<param name="pool">The memory pool to use when allocating memory. The default value is <see langword="null" />.</param>
|
||||||
|
<param name="minimumBufferSize">The minimum buffer size to use when renting memory from the <paramref name="pool" />. The default value is 4096.</param>
|
||||||
|
<param name="leaveOpen">
|
||||||
|
<see langword="true" /> to leave the underlying stream open after the <see cref="T:System.IO.Pipelines.PipeWriter" /> completes; <see langword="false" /> to close it. The default is <see langword="false" />.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeWriterOptions.LeaveOpen">
|
||||||
|
<summary>Gets the value that indicates if the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeWriter" /> completes.</summary>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the underlying stream should be left open after the <see cref="T:System.IO.Pipelines.PipeWriter" /> completes; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeWriterOptions.MinimumBufferSize">
|
||||||
|
<summary>Gets the minimum buffer size to use when renting memory from the <see cref="P:System.IO.Pipelines.StreamPipeWriterOptions.Pool" />.</summary>
|
||||||
|
<returns>An integer representing the minimum buffer size.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.IO.Pipelines.StreamPipeWriterOptions.Pool">
|
||||||
|
<summary>Gets the <see cref="T:System.Buffers.MemoryPool`1" /> to use when allocating memory.</summary>
|
||||||
|
<returns>A memory pool instance.</returns>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/System.Memory.dll
Normal file
BIN
bin/Debug/System.Memory.dll
Normal file
Binary file not shown.
355
bin/Debug/System.Memory.xml
Normal file
355
bin/Debug/System.Memory.xml
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.Memory</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Span`1">
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.#ctor(`0[])">
|
||||||
|
<param name="array"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.#ctor(System.Void*,System.Int32)">
|
||||||
|
<param name="pointer"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.#ctor(`0[],System.Int32)">
|
||||||
|
<param name="array"></param>
|
||||||
|
<param name="start"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||||
|
<param name="array"></param>
|
||||||
|
<param name="start"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.Clear">
|
||||||
|
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.CopyTo(System.Span{`0})">
|
||||||
|
<param name="destination"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||||
|
<param name="obj"></param>
|
||||||
|
<param name="objectData"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.DangerousGetPinnableReference">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Span`1.Empty">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.Equals(System.Object)">
|
||||||
|
<param name="obj"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.Fill(`0)">
|
||||||
|
<param name="value"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.GetHashCode">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Span`1.IsEmpty">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Span`1.Item(System.Int32)">
|
||||||
|
<param name="index"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Span`1.Length">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.op_Equality(System.Span{`0},System.Span{`0})">
|
||||||
|
<param name="left"></param>
|
||||||
|
<param name="right"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.op_Implicit(System.ArraySegment{T})~System.Span{T}">
|
||||||
|
<param name="arraySegment"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.op_Implicit(System.Span{T})~System.ReadOnlySpan{T}">
|
||||||
|
<param name="span"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.op_Implicit(T[])~System.Span{T}">
|
||||||
|
<param name="array"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.op_Inequality(System.Span{`0},System.Span{`0})">
|
||||||
|
<param name="left"></param>
|
||||||
|
<param name="right"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.Slice(System.Int32)">
|
||||||
|
<param name="start"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.Slice(System.Int32,System.Int32)">
|
||||||
|
<param name="start"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.ToArray">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Span`1.TryCopyTo(System.Span{`0})">
|
||||||
|
<param name="destination"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.SpanExtensions">
|
||||||
|
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.AsBytes``1(System.ReadOnlySpan{``0})">
|
||||||
|
<param name="source"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.AsBytes``1(System.Span{``0})">
|
||||||
|
<param name="source"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.AsSpan(System.String)">
|
||||||
|
<param name="text"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.AsSpan``1(System.ArraySegment{``0})">
|
||||||
|
<param name="arraySegment"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.AsSpan``1(``0[])">
|
||||||
|
<param name="array"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.CopyTo``1(``0[],System.Span{``0})">
|
||||||
|
<param name="array"></param>
|
||||||
|
<param name="destination"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf(System.Span{System.Byte},System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf``1(System.ReadOnlySpan{``0},``0)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOf``1(System.Span{``0},``0)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value0"></param>
|
||||||
|
<param name="value1"></param>
|
||||||
|
<param name="value2"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte,System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value0"></param>
|
||||||
|
<param name="value1"></param>
|
||||||
|
<param name="value2"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.Byte,System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value0"></param>
|
||||||
|
<param name="value1"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="values"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="values"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.IndexOfAny(System.ReadOnlySpan{System.Byte},System.Byte,System.Byte)">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value0"></param>
|
||||||
|
<param name="value1"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.NonPortableCast``2(System.ReadOnlySpan{``0})">
|
||||||
|
<param name="source"></param>
|
||||||
|
<typeparam name="TFrom"></typeparam>
|
||||||
|
<typeparam name="TTo"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.NonPortableCast``2(System.Span{``0})">
|
||||||
|
<param name="source"></param>
|
||||||
|
<typeparam name="TFrom"></typeparam>
|
||||||
|
<typeparam name="TTo"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.SequenceEqual(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="first"></param>
|
||||||
|
<param name="second"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.SequenceEqual(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="first"></param>
|
||||||
|
<param name="second"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.SequenceEqual``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="first"></param>
|
||||||
|
<param name="second"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.SequenceEqual``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="first"></param>
|
||||||
|
<param name="second"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.StartsWith(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.StartsWith(System.Span{System.Byte},System.ReadOnlySpan{System.Byte})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.StartsWith``1(System.ReadOnlySpan{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.SpanExtensions.StartsWith``1(System.Span{``0},System.ReadOnlySpan{``0})">
|
||||||
|
<param name="span"></param>
|
||||||
|
<param name="value"></param>
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.ReadOnlySpan`1">
|
||||||
|
<typeparam name="T"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.#ctor(`0[])">
|
||||||
|
<param name="array"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.#ctor(System.Void*,System.Int32)">
|
||||||
|
<param name="pointer"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32)">
|
||||||
|
<param name="array"></param>
|
||||||
|
<param name="start"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.#ctor(`0[],System.Int32,System.Int32)">
|
||||||
|
<param name="array"></param>
|
||||||
|
<param name="start"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.CopyTo(System.Span{`0})">
|
||||||
|
<param name="destination"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.DangerousCreate(System.Object,`0@,System.Int32)">
|
||||||
|
<param name="obj"></param>
|
||||||
|
<param name="objectData"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.DangerousGetPinnableReference">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.ReadOnlySpan`1.Empty">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.Equals(System.Object)">
|
||||||
|
<param name="obj"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.GetHashCode">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.ReadOnlySpan`1.IsEmpty">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.ReadOnlySpan`1.Item(System.Int32)">
|
||||||
|
<param name="index"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.ReadOnlySpan`1.Length">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.op_Equality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||||
|
<param name="left"></param>
|
||||||
|
<param name="right"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.op_Implicit(System.ArraySegment{T})~System.ReadOnlySpan{T}">
|
||||||
|
<param name="arraySegment"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.op_Implicit(T[])~System.ReadOnlySpan{T}">
|
||||||
|
<param name="array"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.op_Inequality(System.ReadOnlySpan{`0},System.ReadOnlySpan{`0})">
|
||||||
|
<param name="left"></param>
|
||||||
|
<param name="right"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32)">
|
||||||
|
<param name="start"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.Slice(System.Int32,System.Int32)">
|
||||||
|
<param name="start"></param>
|
||||||
|
<param name="length"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.ToArray">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.ReadOnlySpan`1.TryCopyTo(System.Span{`0})">
|
||||||
|
<param name="destination"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/System.Numerics.Vectors.dll
Normal file
BIN
bin/Debug/System.Numerics.Vectors.dll
Normal file
Binary file not shown.
2621
bin/Debug/System.Numerics.Vectors.xml
Normal file
2621
bin/Debug/System.Numerics.Vectors.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/System.Runtime.CompilerServices.Unsafe.dll
Normal file
BIN
bin/Debug/System.Runtime.CompilerServices.Unsafe.dll
Normal file
Binary file not shown.
291
bin/Debug/System.Runtime.CompilerServices.Unsafe.xml
Normal file
291
bin/Debug/System.Runtime.CompilerServices.Unsafe.xml
Normal file
@@ -0,0 +1,291 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.Runtime.CompilerServices.Unsafe</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.Unsafe">
|
||||||
|
<summary>Contains generic, low-level functionality for manipulating pointers.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.Int32)">
|
||||||
|
<summary>Adds an element offset to the given reference.</summary>
|
||||||
|
<param name="source">The reference to add the offset to.</param>
|
||||||
|
<param name="elementOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.IntPtr)">
|
||||||
|
<summary>Adds an element offset to the given reference.</summary>
|
||||||
|
<param name="source">The reference to add the offset to.</param>
|
||||||
|
<param name="elementOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(``0@,System.UIntPtr)">
|
||||||
|
<summary>Adds an element offset to the given reference.</summary>
|
||||||
|
<param name="source">The reference to add the offset to.</param>
|
||||||
|
<param name="elementOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the addition of offset to pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Add``1(System.Void*,System.Int32)">
|
||||||
|
<summary>Adds an element offset to the given void pointer.</summary>
|
||||||
|
<param name="source">The void pointer to add the offset to.</param>
|
||||||
|
<param name="elementOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of void pointer.</typeparam>
|
||||||
|
<returns>A new void pointer that reflects the addition of offset to the specified pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.IntPtr)">
|
||||||
|
<summary>Adds a byte offset to the given reference.</summary>
|
||||||
|
<param name="source">The reference to add the offset to.</param>
|
||||||
|
<param name="byteOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AddByteOffset``1(``0@,System.UIntPtr)">
|
||||||
|
<summary>Adds a byte offset to the given reference.</summary>
|
||||||
|
<param name="source">The reference to add the offset to.</param>
|
||||||
|
<param name="byteOffset">The offset to add.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the addition of byte offset to pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AreSame``1(``0@,``0@)">
|
||||||
|
<summary>Determines whether the specified references point to the same location.</summary>
|
||||||
|
<param name="left">The first reference to compare.</param>
|
||||||
|
<param name="right">The second reference to compare.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if <paramref name="left" /> and <paramref name="right" /> point to the same location; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.As``1(System.Object)">
|
||||||
|
<summary>Casts the given object to the specified type.</summary>
|
||||||
|
<param name="o">The object to cast.</param>
|
||||||
|
<typeparam name="T">The type which the object will be cast to.</typeparam>
|
||||||
|
<returns>The original object, casted to the given type.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.As``2(``0@)">
|
||||||
|
<summary>Reinterprets the given reference as a reference to a value of type <typeparamref name="TTo" />.</summary>
|
||||||
|
<param name="source">The reference to reinterpret.</param>
|
||||||
|
<typeparam name="TFrom">The type of reference to reinterpret.</typeparam>
|
||||||
|
<typeparam name="TTo">The desired type of the reference.</typeparam>
|
||||||
|
<returns>A reference to a value of type <typeparamref name="TTo" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AsPointer``1(``0@)">
|
||||||
|
<summary>Returns a pointer to the given by-ref parameter.</summary>
|
||||||
|
<param name="value">The object whose pointer is obtained.</param>
|
||||||
|
<typeparam name="T">The type of object.</typeparam>
|
||||||
|
<returns>A pointer to the given value.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(``0@)">
|
||||||
|
<summary>Reinterprets the given read-only reference as a reference.</summary>
|
||||||
|
<param name="source">The read-only reference to reinterpret.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.AsRef``1(System.Void*)">
|
||||||
|
<summary>Reinterprets the given location as a reference to a value of type <typeparamref name="T" />.</summary>
|
||||||
|
<param name="source">The location of the value to reference.</param>
|
||||||
|
<typeparam name="T">The type of the interpreted location.</typeparam>
|
||||||
|
<returns>A reference to a value of type <typeparamref name="T" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.ByteOffset``1(``0@,``0@)">
|
||||||
|
<summary>Determines the byte offset from origin to target from the given references.</summary>
|
||||||
|
<param name="origin">The reference to origin.</param>
|
||||||
|
<param name="target">The reference to target.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>Byte offset from origin to target i.e. <paramref name="target" /> - <paramref name="origin" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(``0@,System.Void*)">
|
||||||
|
<summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
|
||||||
|
<param name="destination">The location to copy to.</param>
|
||||||
|
<param name="source">A pointer to the value to copy.</param>
|
||||||
|
<typeparam name="T">The type of value to copy.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Copy``1(System.Void*,``0@)">
|
||||||
|
<summary>Copies a value of type <typeparamref name="T" /> to the given location.</summary>
|
||||||
|
<param name="destination">The location to copy to.</param>
|
||||||
|
<param name="source">A reference to the value to copy.</param>
|
||||||
|
<typeparam name="T">The type of value to copy.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Byte@,System.Byte@,System.UInt32)">
|
||||||
|
<summary>Copies bytes from the source address to the destination address.</summary>
|
||||||
|
<param name="destination">The destination address to copy to.</param>
|
||||||
|
<param name="source">The source address to copy from.</param>
|
||||||
|
<param name="byteCount">The number of bytes to copy.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlock(System.Void*,System.Void*,System.UInt32)">
|
||||||
|
<summary>Copies bytes from the source address to the destination address.</summary>
|
||||||
|
<param name="destination">The destination address to copy to.</param>
|
||||||
|
<param name="source">The source address to copy from.</param>
|
||||||
|
<param name="byteCount">The number of bytes to copy.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Byte@,System.Byte@,System.UInt32)">
|
||||||
|
<summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="destination">The destination address to copy to.</param>
|
||||||
|
<param name="source">The source address to copy from.</param>
|
||||||
|
<param name="byteCount">The number of bytes to copy.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.CopyBlockUnaligned(System.Void*,System.Void*,System.UInt32)">
|
||||||
|
<summary>Copies bytes from the source address to the destination address without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="destination">The destination address to copy to.</param>
|
||||||
|
<param name="source">The source address to copy from.</param>
|
||||||
|
<param name="byteCount">The number of bytes to copy.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Byte@,System.Byte,System.UInt32)">
|
||||||
|
<summary>Initializes a block of memory at the given location with a given initial value.</summary>
|
||||||
|
<param name="startAddress">The address of the start of the memory block to initialize.</param>
|
||||||
|
<param name="value">The value to initialize the block to.</param>
|
||||||
|
<param name="byteCount">The number of bytes to initialize.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlock(System.Void*,System.Byte,System.UInt32)">
|
||||||
|
<summary>Initializes a block of memory at the given location with a given initial value.</summary>
|
||||||
|
<param name="startAddress">The address of the start of the memory block to initialize.</param>
|
||||||
|
<param name="value">The value to initialize the block to.</param>
|
||||||
|
<param name="byteCount">The number of bytes to initialize.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Byte@,System.Byte,System.UInt32)">
|
||||||
|
<summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
|
||||||
|
<param name="startAddress">The address of the start of the memory block to initialize.</param>
|
||||||
|
<param name="value">The value to initialize the block to.</param>
|
||||||
|
<param name="byteCount">The number of bytes to initialize.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.InitBlockUnaligned(System.Void*,System.Byte,System.UInt32)">
|
||||||
|
<summary>Initializes a block of memory at the given location with a given initial value without assuming architecture dependent alignment of the address.</summary>
|
||||||
|
<param name="startAddress">The address of the start of the memory block to initialize.</param>
|
||||||
|
<param name="value">The value to initialize the block to.</param>
|
||||||
|
<param name="byteCount">The number of bytes to initialize.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressGreaterThan``1(``0@,``0@)">
|
||||||
|
<summary>Returns a value that indicates whether a specified reference is greater than another specified reference.</summary>
|
||||||
|
<param name="left">The first value to compare.</param>
|
||||||
|
<param name="right">The second value to compare.</param>
|
||||||
|
<typeparam name="T">The type of the reference.</typeparam>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if <paramref name="left" /> is greater than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.IsAddressLessThan``1(``0@,``0@)">
|
||||||
|
<summary>Returns a value that indicates whether a specified reference is less than another specified reference.</summary>
|
||||||
|
<param name="left">The first value to compare.</param>
|
||||||
|
<param name="right">The second value to compare.</param>
|
||||||
|
<typeparam name="T">The type of the reference.</typeparam>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if <paramref name="left" /> is less than <paramref name="right" />; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.IsNullRef``1(``0@)">
|
||||||
|
<summary>Determines if a given reference to a value of type <typeparamref name="T" /> is a null reference.</summary>
|
||||||
|
<param name="source">The reference to check.</param>
|
||||||
|
<typeparam name="T">The type of the reference.</typeparam>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if <paramref name="source" /> is a null reference; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.NullRef``1">
|
||||||
|
<summary>Returns a reference to a value of type <typeparamref name="T" /> that is a null reference.</summary>
|
||||||
|
<typeparam name="T">The type of the reference.</typeparam>
|
||||||
|
<returns>A reference to a value of type <typeparamref name="T" /> that is a null reference.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Read``1(System.Void*)">
|
||||||
|
<summary>Reads a value of type <typeparamref name="T" /> from the given location.</summary>
|
||||||
|
<param name="source">The location to read from.</param>
|
||||||
|
<typeparam name="T">The type to read.</typeparam>
|
||||||
|
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Byte@)">
|
||||||
|
<summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="source">The location to read from.</param>
|
||||||
|
<typeparam name="T">The type to read.</typeparam>
|
||||||
|
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.ReadUnaligned``1(System.Void*)">
|
||||||
|
<summary>Reads a value of type <typeparamref name="T" /> from the given location without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="source">The location to read from.</param>
|
||||||
|
<typeparam name="T">The type to read.</typeparam>
|
||||||
|
<returns>An object of type <typeparamref name="T" /> read from the given location.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.SizeOf``1">
|
||||||
|
<summary>Returns the size of an object of the given type parameter.</summary>
|
||||||
|
<typeparam name="T">The type of object whose size is retrieved.</typeparam>
|
||||||
|
<returns>The size of an object of type <typeparamref name="T" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.SkipInit``1(``0@)">
|
||||||
|
<summary>Bypasses definite assignment rules for a given value.</summary>
|
||||||
|
<param name="value">The uninitialized object.</param>
|
||||||
|
<typeparam name="T">The type of the uninitialized object.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.Int32)">
|
||||||
|
<summary>Subtracts an element offset from the given reference.</summary>
|
||||||
|
<param name="source">The reference to subtract the offset from.</param>
|
||||||
|
<param name="elementOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.IntPtr)">
|
||||||
|
<summary>Subtracts an element offset from the given reference.</summary>
|
||||||
|
<param name="source">The reference to subtract the offset from.</param>
|
||||||
|
<param name="elementOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the subtraction of offset from pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(``0@,System.UIntPtr)">
|
||||||
|
<summary>Subtracts an element offset from the given reference.</summary>
|
||||||
|
<param name="source">The reference to subtract the offset from.</param>
|
||||||
|
<param name="elementOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the subraction of offset from pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Subtract``1(System.Void*,System.Int32)">
|
||||||
|
<summary>Subtracts an element offset from the given void pointer.</summary>
|
||||||
|
<param name="source">The void pointer to subtract the offset from.</param>
|
||||||
|
<param name="elementOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of the void pointer.</typeparam>
|
||||||
|
<returns>A new void pointer that reflects the subtraction of offset from the specified pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.IntPtr)">
|
||||||
|
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||||
|
<param name="source">The reference to subtract the offset from.</param>
|
||||||
|
<param name="byteOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the subtraction of byte offset from pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.SubtractByteOffset``1(``0@,System.UIntPtr)">
|
||||||
|
<summary>Subtracts a byte offset from the given reference.</summary>
|
||||||
|
<param name="source">The reference to subtract the offset from.</param>
|
||||||
|
<param name="byteOffset">The offset to subtract.</param>
|
||||||
|
<typeparam name="T">The type of reference.</typeparam>
|
||||||
|
<returns>A new reference that reflects the subraction of byte offset from pointer.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Unbox``1(System.Object)">
|
||||||
|
<summary>Returns a <see langword="mutable ref" /> to a boxed value.</summary>
|
||||||
|
<param name="box">The value to unbox.</param>
|
||||||
|
<typeparam name="T">The type to be unboxed.</typeparam>
|
||||||
|
<exception cref="T:System.NullReferenceException">
|
||||||
|
<paramref name="box" /> is <see langword="null" />, and <typeparamref name="T" /> is a non-nullable value type.</exception>
|
||||||
|
<exception cref="T:System.InvalidCastException">
|
||||||
|
<paramref name="box" /> is not a boxed value type.
|
||||||
|
|
||||||
|
-or-
|
||||||
|
|
||||||
|
<paramref name="box" /> is not a boxed <typeparamref name="T" />.</exception>
|
||||||
|
<exception cref="T:System.TypeLoadException">
|
||||||
|
<typeparamref name="T" /> cannot be found.</exception>
|
||||||
|
<returns>A <see langword="mutable ref" /> to the boxed value <paramref name="box" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.Write``1(System.Void*,``0)">
|
||||||
|
<summary>Writes a value of type <typeparamref name="T" /> to the given location.</summary>
|
||||||
|
<param name="destination">The location to write to.</param>
|
||||||
|
<param name="value">The value to write.</param>
|
||||||
|
<typeparam name="T">The type of value to write.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Byte@,``0)">
|
||||||
|
<summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="destination">The location to write to.</param>
|
||||||
|
<param name="value">The value to write.</param>
|
||||||
|
<typeparam name="T">The type of value to write.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.Unsafe.WriteUnaligned``1(System.Void*,``0)">
|
||||||
|
<summary>Writes a value of type <typeparamref name="T" /> to the given location without assuming architecture dependent alignment of the addresses.</summary>
|
||||||
|
<param name="destination">The location to write to.</param>
|
||||||
|
<param name="value">The value to write.</param>
|
||||||
|
<typeparam name="T">The type of value to write.</typeparam>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/System.Threading.Channels.dll
Normal file
BIN
bin/Debug/System.Threading.Channels.dll
Normal file
Binary file not shown.
225
bin/Debug/System.Threading.Channels.xml
Normal file
225
bin/Debug/System.Threading.Channels.xml
Normal file
@@ -0,0 +1,225 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.Threading.Channels</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Threading.Channels.BoundedChannelFullMode">
|
||||||
|
<summary>Specifies the behavior to use when writing to a bounded channel that is already full.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Channels.BoundedChannelFullMode.DropNewest">
|
||||||
|
<summary>Removes and ignores the newest item in the channel in order to make room for the item being written.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Channels.BoundedChannelFullMode.DropOldest">
|
||||||
|
<summary>Removes and ignores the oldest item in the channel in order to make room for the item being written.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Channels.BoundedChannelFullMode.DropWrite">
|
||||||
|
<summary>Drops the item being written.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="F:System.Threading.Channels.BoundedChannelFullMode.Wait">
|
||||||
|
<summary>Waits for space to be available in order to complete the write operation.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.BoundedChannelOptions">
|
||||||
|
<summary>Provides options that control the behavior of bounded <see cref="T:System.Threading.Channels.Channel`1" /> instances.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.BoundedChannelOptions.#ctor(System.Int32)">
|
||||||
|
<summary>Initializes the options.</summary>
|
||||||
|
<param name="capacity">The maximum number of items the bounded channel may store.</param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.BoundedChannelOptions.Capacity">
|
||||||
|
<summary>Gets or sets the maximum number of items the bounded channel may store.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.BoundedChannelOptions.FullMode">
|
||||||
|
<summary>Gets or sets the behavior incurred by write operations when the channel is full.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.Channel">
|
||||||
|
<summary>Provides static methods for creating channels.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel.CreateBounded``1(System.Int32)">
|
||||||
|
<summary>Creates a channel with the specified maximum capacity.</summary>
|
||||||
|
<param name="capacity">The maximum number of items the channel may store.</param>
|
||||||
|
<typeparam name="T">Specifies the type of data in the channel.</typeparam>
|
||||||
|
<returns>The created channel.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel.CreateBounded``1(System.Threading.Channels.BoundedChannelOptions)">
|
||||||
|
<summary>Creates a channel with the specified maximum capacity.</summary>
|
||||||
|
<param name="options">Options that guide the behavior of the channel.</param>
|
||||||
|
<typeparam name="T">Specifies the type of data in the channel.</typeparam>
|
||||||
|
<returns>The created channel.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel.CreateUnbounded``1">
|
||||||
|
<summary>Creates an unbounded channel usable by any number of readers and writers concurrently.</summary>
|
||||||
|
<typeparam name="T">The type of data in the channel.</typeparam>
|
||||||
|
<returns>The created channel.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel.CreateUnbounded``1(System.Threading.Channels.UnboundedChannelOptions)">
|
||||||
|
<summary>Creates an unbounded channel subject to the provided options.</summary>
|
||||||
|
<param name="options">Options that guide the behavior of the channel.</param>
|
||||||
|
<typeparam name="T">Specifies the type of data in the channel.</typeparam>
|
||||||
|
<returns>The created channel.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.Channel`1">
|
||||||
|
<summary>Provides a base class for channels that support reading and writing elements of type <typeparamref name="T" />.</summary>
|
||||||
|
<typeparam name="T">Specifies the type of data readable and writable in the channel.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel`1.#ctor">
|
||||||
|
<summary>Initializes an instance of the <see cref="T:System.Threading.Channels.Channel`1" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.Channel`2">
|
||||||
|
<summary>Provides a base class for channels that support reading elements of type <typeparamref name="TRead" /> and writing elements of type <typeparamref name="TWrite" />.</summary>
|
||||||
|
<typeparam name="TWrite">Specifies the type of data that may be written to the channel.</typeparam>
|
||||||
|
<typeparam name="TRead">Specifies the type of data that may be read from the channel.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel`2.#ctor">
|
||||||
|
<summary>Initializes an instance of the <see cref="T:System.Threading.Channels.Channel`2" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel`2.op_Implicit(System.Threading.Channels.Channel{`0,`1})~System.Threading.Channels.ChannelReader{`1}">
|
||||||
|
<summary>Implicit cast from a <see cref="T:System.Threading.Channels.Channel`2" /> to its readable half.</summary>
|
||||||
|
<param name="channel">The <see cref="T:System.Threading.Channels.Channel`2" /> being cast.</param>
|
||||||
|
<returns>The readable half.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.Channel`2.op_Implicit(System.Threading.Channels.Channel{`0,`1})~System.Threading.Channels.ChannelWriter{`0}">
|
||||||
|
<summary>Implicit cast from a <see cref="T:System.Threading.Channels.Channel`2" /> to its writable half.</summary>
|
||||||
|
<param name="channel">The <see cref="T:System.Threading.Channels.Channel`2" /> being cast.</param>
|
||||||
|
<returns>The writable half.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.Channel`2.Reader">
|
||||||
|
<summary>Gets the readable half of this channel.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.Channel`2.Writer">
|
||||||
|
<summary>Gets the writable half of this channel.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.ChannelClosedException">
|
||||||
|
<summary>Exception thrown when a channel is used after it's been closed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelClosedException.#ctor">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.Exception)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
|
||||||
|
<param name="innerException">The exception that is the cause of this exception.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class with serialized data.</summary>
|
||||||
|
<param name="info">The object that holds the serialized object data.</param>
|
||||||
|
<param name="context">The contextual information about the source or destination.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.String)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
|
||||||
|
<param name="message">The message that describes the error.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelClosedException.#ctor(System.String,System.Exception)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.ChannelClosedException" /> class.</summary>
|
||||||
|
<param name="message">The message that describes the error.</param>
|
||||||
|
<param name="innerException">The exception that is the cause of this exception.</param>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.ChannelOptions">
|
||||||
|
<summary>Provides options that control the behavior of channel instances.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelOptions.#ctor">
|
||||||
|
<summary>Initializes an instance of the <see cref="T:System.Threading.Channels.ChannelOptions" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelOptions.AllowSynchronousContinuations">
|
||||||
|
<summary>
|
||||||
|
<see langword="true" /> if operations performed on a channel may synchronously invoke continuations subscribed to
|
||||||
|
notifications of pending async operations; <see langword="false" /> if all continuations should be invoked asynchronously.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelOptions.SingleReader">
|
||||||
|
<summary>
|
||||||
|
<see langword="true" /> readers from the channel guarantee that there will only ever be at most one read operation at a time;
|
||||||
|
<see langword="false" /> if no such constraint is guaranteed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelOptions.SingleWriter">
|
||||||
|
<summary>
|
||||||
|
<see langword="true" /> if writers to the channel guarantee that there will only ever be at most one write operation
|
||||||
|
at a time; <see langword="false" /> if no such constraint is guaranteed.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.ChannelReader`1">
|
||||||
|
<summary>Provides a base class for reading from a channel.</summary>
|
||||||
|
<typeparam name="T">Specifies the type of data that may be read from the channel.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelReader`1.#ctor">
|
||||||
|
<summary>Initializes an instance of the <see cref="T:System.Threading.Channels.ChannelReader`1" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelReader`1.ReadAllAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Creates an <see cref="T:System.Collections.Generic.IAsyncEnumerable`1" /> that enables reading all of the data from the channel.</summary>
|
||||||
|
<param name="cancellationToken">The cancellation token to use to cancel the enumeration.</param>
|
||||||
|
<returns>The created async enumerable.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelReader`1.ReadAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously reads an item from the channel.</summary>
|
||||||
|
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the read operation.</param>
|
||||||
|
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that represents the asynchronous read operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelReader`1.TryRead(`0@)">
|
||||||
|
<summary>Attempts to read an item from the channel.</summary>
|
||||||
|
<param name="item">The read item, or a default value if no item could be read.</param>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if an item was read; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelReader`1.WaitToReadAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Returns a <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete when data is available to read.</summary>
|
||||||
|
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the wait operation.</param>
|
||||||
|
<returns>
|
||||||
|
<para>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete with a <see langword="true" /> result when data is available to read
|
||||||
|
or with a <see langword="false" /> result when no further data will ever be available to be read due to the channel completing successfully.</para>
|
||||||
|
<para>If the channel completes with an exception, the task will also complete with an exception.</para>
|
||||||
|
</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelReader`1.CanCount">
|
||||||
|
<summary>Gets a value that indicates whether <see cref="P:System.Threading.Channels.ChannelReader`1.Count" /> is available for use on this <see cref="T:System.Threading.Channels.ChannelReader`1" /> instance.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelReader`1.Completion">
|
||||||
|
<summary>Gets a <see cref="T:System.Threading.Tasks.Task" /> that completes when no more data will ever
|
||||||
|
be available to be read from this channel.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Channels.ChannelReader`1.Count">
|
||||||
|
<summary>Gets the current number of items available from this channel reader.</summary>
|
||||||
|
<exception cref="T:System.NotSupportedException">Counting is not supported on this instance.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.ChannelWriter`1">
|
||||||
|
<summary>Provides a base class for writing to a channel.</summary>
|
||||||
|
<typeparam name="T">Specifies the type of data that may be written to the channel.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.#ctor">
|
||||||
|
<summary>Initializes an instance of the <see cref="T:System.Threading.Channels.ChannelWriter`1" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.Complete(System.Exception)">
|
||||||
|
<summary>Mark the channel as being complete, meaning no more items will be written to it.</summary>
|
||||||
|
<param name="error">Optional Exception indicating a failure that's causing the channel to complete.</param>
|
||||||
|
<exception cref="T:System.InvalidOperationException">The channel has already been marked as complete.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.TryComplete(System.Exception)">
|
||||||
|
<summary>Attempts to mark the channel as being completed, meaning no more data will be written to it.</summary>
|
||||||
|
<param name="error">An <see cref="T:System.Exception" /> indicating the failure causing no more data to be written, or null for success.</param>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if this operation successfully completes the channel; otherwise, <see langword="false" /> if the channel could not be marked for completion,
|
||||||
|
for example due to having already been marked as such, or due to not supporting completion.
|
||||||
|
.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.TryWrite(`0)">
|
||||||
|
<summary>Attempts to write the specified item to the channel.</summary>
|
||||||
|
<param name="item">The item to write.</param>
|
||||||
|
<returns>
|
||||||
|
<see langword="true" /> if the item was written; otherwise, <see langword="false" />.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.WaitToWriteAsync(System.Threading.CancellationToken)">
|
||||||
|
<summary>Returns a <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete when space is available to write an item.</summary>
|
||||||
|
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the wait operation.</param>
|
||||||
|
<returns>A <see cref="T:System.Threading.Tasks.ValueTask`1" /> that will complete with a <see langword="true" /> result when space is available to write an item
|
||||||
|
or with a <see langword="false" /> result when no further writing will be permitted.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.ChannelWriter`1.WriteAsync(`0,System.Threading.CancellationToken)">
|
||||||
|
<summary>Asynchronously writes an item to the channel.</summary>
|
||||||
|
<param name="item">The value to write to the channel.</param>
|
||||||
|
<param name="cancellationToken">A <see cref="T:System.Threading.CancellationToken" /> used to cancel the write operation.</param>
|
||||||
|
<returns>A <see cref="T:System.Threading.Tasks.ValueTask" /> that represents the asynchronous write operation.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Channels.UnboundedChannelOptions">
|
||||||
|
<summary>Provides options that control the behavior of unbounded <see cref="T:System.Threading.Channels.Channel`1" /> instances.</summary>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Channels.UnboundedChannelOptions.#ctor">
|
||||||
|
<summary>Initializes a new instance of the <see cref="T:System.Threading.Channels.UnboundedChannelOptions" /> class.</summary>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/System.Threading.Tasks.Extensions.dll
Normal file
BIN
bin/Debug/System.Threading.Tasks.Extensions.dll
Normal file
Binary file not shown.
166
bin/Debug/System.Threading.Tasks.Extensions.xml
Normal file
166
bin/Debug/System.Threading.Tasks.Extensions.xml
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><doc>
|
||||||
|
<assembly>
|
||||||
|
<name>System.Threading.Tasks.Extensions</name>
|
||||||
|
</assembly>
|
||||||
|
<members>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ValueTaskAwaiter`1">
|
||||||
|
<typeparam name="TResult"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.ValueTaskAwaiter`1.IsCompleted">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ValueTaskAwaiter`1.OnCompleted(System.Action)">
|
||||||
|
<param name="continuation"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ValueTaskAwaiter`1.UnsafeOnCompleted(System.Action)">
|
||||||
|
<param name="continuation"></param>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Threading.Tasks.ValueTask`1">
|
||||||
|
<summary>Provides a value type that wraps a <see cref="Task{TResult}"></see> and a <typeparamref name="TResult">TResult</typeparamref>, only one of which is used.</summary>
|
||||||
|
<typeparam name="TResult">The result.</typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.#ctor(System.Threading.Tasks.Task{`0})">
|
||||||
|
<summary>Initializes a new instance of the <see cref="ValueTask{TResult}"></see> class using the supplied task that represents the operation.</summary>
|
||||||
|
<param name="task">The task.</param>
|
||||||
|
<exception cref="T:System.ArgumentNullException">The <paramref name="task">task</paramref> argument is null.</exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.#ctor(`0)">
|
||||||
|
<summary>Initializes a new instance of the <see cref="ValueTask{TResult}"></see> class using the supplied result of a successful operation.</summary>
|
||||||
|
<param name="result">The result.</param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.AsTask">
|
||||||
|
<summary>Retrieves a <see cref="Task{TResult}"></see> object that represents this <see cref="ValueTask{TResult}"></see>.</summary>
|
||||||
|
<returns>The <see cref="Task{TResult}"></see> object that is wrapped in this <see cref="ValueTask{TResult}"></see> if one exists, or a new <see cref="Task{TResult}"></see> object that represents the result.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.ConfigureAwait(System.Boolean)">
|
||||||
|
<summary>Configures an awaiter for this value.</summary>
|
||||||
|
<param name="continueOnCapturedContext">true to attempt to marshal the continuation back to the captured context; otherwise, false.</param>
|
||||||
|
<returns>The configured awaiter.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.CreateAsyncMethodBuilder">
|
||||||
|
<summary>Creates a method builder for use with an async method.</summary>
|
||||||
|
<returns>The created builder.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.Equals(System.Object)">
|
||||||
|
<summary>Determines whether the specified object is equal to the current object.</summary>
|
||||||
|
<param name="obj">The object to compare with the current object.</param>
|
||||||
|
<returns>true if the specified object is equal to the current object; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.Equals(System.Threading.Tasks.ValueTask{`0})">
|
||||||
|
<summary>Determines whether the specified <see cref="ValueTask{TResult}"></see> object is equal to the current <see cref="ValueTask{TResult}"></see> object.</summary>
|
||||||
|
<param name="other">The object to compare with the current object.</param>
|
||||||
|
<returns>true if the specified object is equal to the current object; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.GetAwaiter">
|
||||||
|
<summary>Creates an awaiter for this value.</summary>
|
||||||
|
<returns>The awaiter.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.GetHashCode">
|
||||||
|
<summary>Returns the hash code for this instance.</summary>
|
||||||
|
<returns>The hash code for the current object.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.ValueTask`1.IsCanceled">
|
||||||
|
<summary>Gets a value that indicates whether this object represents a canceled operation.</summary>
|
||||||
|
<returns>true if this object represents a canceled operation; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.ValueTask`1.IsCompleted">
|
||||||
|
<summary>Gets a value that indicates whether this object represents a completed operation.</summary>
|
||||||
|
<returns>true if this object represents a completed operation; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.ValueTask`1.IsCompletedSuccessfully">
|
||||||
|
<summary>Gets a value that indicates whether this object represents a successfully completed operation.</summary>
|
||||||
|
<returns>true if this object represents a successfully completed operation; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.ValueTask`1.IsFaulted">
|
||||||
|
<summary>Gets a value that indicates whether this object represents a failed operation.</summary>
|
||||||
|
<returns>true if this object represents a failed operation; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.op_Equality(System.Threading.Tasks.ValueTask{`0},System.Threading.Tasks.ValueTask{`0})">
|
||||||
|
<summary>Compares two values for equality.</summary>
|
||||||
|
<param name="left">The first value to compare.</param>
|
||||||
|
<param name="right">The second value to compare.</param>
|
||||||
|
<returns>true if the two <see cref="ValueTask{TResult}"></see> values are equal; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.op_Inequality(System.Threading.Tasks.ValueTask{`0},System.Threading.Tasks.ValueTask{`0})">
|
||||||
|
<summary>Determines whether two <see cref="ValueTask{TResult}"></see> values are unequal.</summary>
|
||||||
|
<param name="left">The first value to compare.</param>
|
||||||
|
<param name="right">The seconed value to compare.</param>
|
||||||
|
<returns>true if the two <see cref="ValueTask{TResult}"></see> values are not equal; otherwise, false.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Threading.Tasks.ValueTask`1.Result">
|
||||||
|
<summary>Gets the result.</summary>
|
||||||
|
<returns>The result.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Threading.Tasks.ValueTask`1.ToString">
|
||||||
|
<summary>Returns a string that represents the current object.</summary>
|
||||||
|
<returns>A string that represents the current object.</returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute">
|
||||||
|
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.#ctor(System.Type)">
|
||||||
|
<param name="builderType"></param>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.AsyncMethodBuilderAttribute.BuilderType">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1">
|
||||||
|
<typeparam name="TResult"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.AwaitOnCompleted``2(``0@,``1@)">
|
||||||
|
<param name="awaiter"></param>
|
||||||
|
<param name="stateMachine"></param>
|
||||||
|
<typeparam name="TAwaiter"></typeparam>
|
||||||
|
<typeparam name="TStateMachine"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.AwaitUnsafeOnCompleted``2(``0@,``1@)">
|
||||||
|
<param name="awaiter"></param>
|
||||||
|
<param name="stateMachine"></param>
|
||||||
|
<typeparam name="TAwaiter"></typeparam>
|
||||||
|
<typeparam name="TStateMachine"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.Create">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetException(System.Exception)">
|
||||||
|
<param name="exception"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetResult(`0)">
|
||||||
|
<param name="result"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)">
|
||||||
|
<param name="stateMachine"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.Start``1(``0@)">
|
||||||
|
<param name="stateMachine"></param>
|
||||||
|
<typeparam name="TStateMachine"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.Task">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter">
|
||||||
|
<typeparam name="TResult"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.GetResult">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="P:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.IsCompleted">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.OnCompleted(System.Action)">
|
||||||
|
<param name="continuation"></param>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.ConfiguredValueTaskAwaiter.UnsafeOnCompleted(System.Action)">
|
||||||
|
<param name="continuation"></param>
|
||||||
|
</member>
|
||||||
|
<member name="T:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1">
|
||||||
|
<typeparam name="TResult"></typeparam>
|
||||||
|
</member>
|
||||||
|
<member name="M:System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1.GetAwaiter">
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
</members>
|
||||||
|
</doc>
|
||||||
BIN
bin/Debug/Telephone.exe
Normal file
BIN
bin/Debug/Telephone.exe
Normal file
Binary file not shown.
52
bin/Debug/Telephone.exe.config
Normal file
52
bin/Debug/Telephone.exe.config
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<section name="Telephone.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||||
|
</sectionGroup>
|
||||||
|
</configSections>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.0.0.2" newVersion="5.0.0.2" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
<userSettings>
|
||||||
|
<Telephone.My.MySettings>
|
||||||
|
<setting name="SerialPortName" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="BaudRate" serializeAs="String">
|
||||||
|
<value>9600</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="GTable" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="TWide" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="THigh" serializeAs="String">
|
||||||
|
<value>0</value>
|
||||||
|
</setting>
|
||||||
|
<setting name="G_Subscribe" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
<setting name="G_Publish" serializeAs="String">
|
||||||
|
<value />
|
||||||
|
</setting>
|
||||||
|
</Telephone.My.MySettings>
|
||||||
|
</userSettings>
|
||||||
|
</configuration>
|
||||||
BIN
bin/Debug/Telephone.pdb
Normal file
BIN
bin/Debug/Telephone.pdb
Normal file
Binary file not shown.
1425
bin/Debug/Telephone.xml
Normal file
1425
bin/Debug/Telephone.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/ZstdSharp.dll
Normal file
BIN
bin/Debug/ZstdSharp.dll
Normal file
Binary file not shown.
2293
bin/Debug/log/2025-09-10.log
Normal file
2293
bin/Debug/log/2025-09-10.log
Normal file
File diff suppressed because it is too large
Load Diff
627
bin/Debug/log/2025-09-11.log
Normal file
627
bin/Debug/log/2025-09-11.log
Normal file
@@ -0,0 +1,627 @@
|
|||||||
|
2025-09-11 11:21:59:675 [Info] Redis:A: {"PhoneNumber":"13509214696","CallerName":"陈ZH","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 11:22:33:645 [Error] Unexpected character encountered while parsing number: :. Path '', line 1, position 2.
|
||||||
|
2025-09-11 11:22:37:427 [Info] Redis:A: 11:21:59 11 Sep 2025A{"PhoneNumber":"13509214696","CallerName":"陈ZH","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 11:23:10:873 [Error] Unexpected character encountered while parsing number: :. Path '', line 1, position 2.
|
||||||
|
2025-09-11 11:24:54:473 [Error] Unexpected character encountered while parsing number: :. Path '', line 1, position 2.
|
||||||
|
2025-09-11 11:25:35:371 [Info] Redis:A: {"PhoneNumber":"13509214696","CallerName":"陈ZH","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 11:26:32:353 [Info] Redis:A: {"PhoneNumber":"13509214696","CallerName":"陈ZH","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 11:27:04:910 [Info] Redis:A: {"PhoneNumber":"13509214696","CallerName":"陈ZH","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 11:27:34:805 [Info] TX:ATD13509214696;
|
||||||
|
|
||||||
|
2025-09-11 11:54:19:920 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:030 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:130 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:241 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:352 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:489 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:577 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:677 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:789 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:20:899 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:010 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:120 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:231 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:331 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:442 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:553 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:663 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:776 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:911 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:21:989 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:111 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:211 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:318 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:430 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:534 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:657 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:757 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:869 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:22:981 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:083 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:194 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:305 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:416 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:528 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:628 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:740 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:852 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:23:974 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:074 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:185 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:287 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:399 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:511 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:612 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:723 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:835 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:24:947 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:057 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:168 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:279 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:379 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:490 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:602 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:714 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:835 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:25:926 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:038 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:150 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:261 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:460 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:569 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:680 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:793 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:26:904 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:005 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:119 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:220 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:343 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:443 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:554 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:666 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:777 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:888 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:27:988 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:100 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:212 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:322 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:551 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:563 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:651 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:763 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:863 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:28:976 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:090 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:191 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:303 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:416 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:527 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:627 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:739 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:854 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:29:957 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:070 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:182 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:294 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:395 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:511 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:535 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:54:30:613 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:726 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:30:837 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:064 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:077 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:168 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:279 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:379 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:492 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:605 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:720 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:820 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:31:932 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:043 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:144 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:257 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:372 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:482 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:583 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:696 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:807 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:32:909 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:022 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:133 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:244 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:358 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:461 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:574 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:674 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:789 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:33:901 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:012 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:113 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:223 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:336 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:446 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:558 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:661 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:773 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:885 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:34:987 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:100 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:212 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:324 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:435 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:536 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:647 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:759 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:871 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:35:971 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:083 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:194 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:306 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:408 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:520 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:631 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:743 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:854 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:36:965 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:066 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:179 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:293 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:393 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:507 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:619 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:730 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:832 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:37:945 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:058 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:159 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:271 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:384 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:488 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:603 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:716 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:816 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:38:929 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:043 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:155 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:255 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:369 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:481 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:583 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:694 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:806 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:39:918 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:029 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:134 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:246 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:349 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:463 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:576 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:677 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:791 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:40:902 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:003 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:114 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:229 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:333 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:447 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:558 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:660 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:773 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:885 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:41:997 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:097 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:209 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:320 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:432 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:533 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:646 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:758 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:870 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:42:981 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:091 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:192 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:305 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:417 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:528 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:629 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:741 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:852 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:43:965 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:066 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:179 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:291 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:402 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:505 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:617 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:729 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:830 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:44:943 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:056 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:158 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:271 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:385 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:497 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:597 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:709 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:822 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:45:933 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:037 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:150 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:252 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:365 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:478 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:591 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:691 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:807 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:46:910 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:021 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:135 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:246 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:348 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:461 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:573 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:675 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:788 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:54:47:903 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:55:10:170 [Error] Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
|
||||||
|
2025-09-11 11:55:22:944 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:55:29:896 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:56:04:887 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:56:34:013 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:56:51:003 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:57:05:670 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:57:42:129 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:58:00:455 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1767493606", "Type": "1" }
|
||||||
|
2025-09-11 11:58:05:152 [Info] TX:ATD17833753261;
|
||||||
|
|
||||||
|
2025-09-11 11:58:08:455 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:58:09:464 [Info] TX:AT+CDTAM=1
|
||||||
|
|
||||||
|
2025-09-11 11:58:10:474 [Error] 发送超时命令:AT+CDTAM=1
|
||||||
|
!!
|
||||||
|
2025-09-11 11:58:10:487 [Info] Redis:B: 执行xxx播打电话:17833753261失败
|
||||||
|
2025-09-11 11:58:13:296 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:58:52:772 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 11:58:56:008 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 11:58:56:371 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 11:59:42:917 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 12:00:14:178 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 12:00:48:648 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "1" }
|
||||||
|
2025-09-11 12:01:30:847 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1767493606", "Type": "1" }
|
||||||
|
2025-09-11 12:01:30:872 [Info] TX:ATD17833753261;
|
||||||
|
|
||||||
|
2025-09-11 12:01:36:332 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 12:01:47:626 [Info] TX:AT+CDTAM=1
|
||||||
|
|
||||||
|
2025-09-11 12:01:48:602 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 12:01:56:587 [Info] TX:AT+CTTS=2,打开百度网址:https://www.baidu.com/ 搜索最美惠州
|
||||||
|
|
||||||
|
2025-09-11 12:01:57:751 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 12:02:02:756 [Info] TX:AT+CTTS=2,打开百度网址:https://www.baidu.com/ 搜索最美惠州
|
||||||
|
|
||||||
|
2025-09-11 12:02:02:778 [Error] 电话已经挂断,停止发送语音!!
|
||||||
|
2025-09-11 12:02:02:794 [Info] Redis:B: 执行xxx播打电话:17833753261成功
|
||||||
|
2025-09-11 13:44:34:319 [Info] Redis:A: {"PhoneNumber":"17833753261","CallerName":"陈ZH1","Content":"[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。","StartingPoint":"1757559556","DeadLine":"1757999563","Type":"1"}
|
||||||
|
2025-09-11 13:44:44:990 [Info] TX:ATD17833753261;
|
||||||
|
|
||||||
|
2025-09-11 13:44:46:155 [Info] RX:VOICE CALL: BEGIN
|
||||||
|
|
||||||
|
2025-09-11 13:44:47:056 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:44:49:626 [Info] TX:AT+CDTAM=1
|
||||||
|
|
||||||
|
2025-09-11 13:44:50:570 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:44:58:893 [Info] RX:OK
|
||||||
|
OK
|
||||||
|
OK
|
||||||
|
OK
|
||||||
|
|
||||||
|
2025-09-11 13:44:58:909 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:44:59:995 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:45:05:006 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:46:45:930 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:50:932 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:46:53:371 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:53:846 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:54:241 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:54:703 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:55:426 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:46:58:377 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:47:41:757 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:47:43:485 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:47:55:681 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:48:00:673 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:48:01:532 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:48:05:616 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:48:06:529 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
|
2025-09-11 13:48:06:728 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:48:09:679 [Info] RX:OK
|
||||||
|
|
||||||
|
2025-09-11 13:48:11:721 [Info] TX:AT+CTTS=2,[BLV运维提示] RCU服务器的监控程序无法访问,请立即检查。
|
||||||
|
|
||||||
3
bin/Debug/log/2025-09-23.log
Normal file
3
bin/Debug/log/2025-09-23.log
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
2025-09-23 10:22:01:237 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州11111111111111111111111111111111111111111111111打开百度网址:https://www.baidu.com/ 搜索最美惠州打开百度网址:https://www.baidu.com/ 搜索最美惠州打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "2" }
|
||||||
|
2025-09-23 10:23:09:032 [Error] Error parsing Infinity value. Path '', line 1, position 7.
|
||||||
|
2025-09-23 10:23:24:042 [Info] Redis:A: { "PhoneNumber": "17833753261", "CallerName": "xxx", "Content": "打开百度网址:https://www.baidu.com/ 搜索最美惠州11111111111111111111111111111111111111111111111打开百度网址:https://www.baidu.com/ 搜索最美惠州打开百度网址:https://www.baidu.com/ 搜索最美惠州打开百度网址:https://www.baidu.com/ 搜索最美惠州", "StartingPoint": "1757060585", "DeadLine": "1757493606", "Type": "2" }
|
||||||
4
bin/Debug/log/2025-09-30.log
Normal file
4
bin/Debug/log/2025-09-30.log
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
2025-09-30 15:26:50:512 [Info] RX:AT+CMGF = 0
|
||||||
|
|
||||||
|
2025-09-30 15:27:33:739 [Info] RX:AT+CMGF = 0
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user