初始化
This commit is contained in:
BIN
.vs/DataPresentationManager/v16/.suo
Normal file
BIN
.vs/DataPresentationManager/v16/.suo
Normal file
Binary file not shown.
18
App.config
Normal file
18
App.config
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
25
DataPresentationManager.sln
Normal file
25
DataPresentationManager.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}") = "DataPresentationManager", "DataPresentationManager.vbproj", "{2A8EB503-36FA-421A-A4A5-1B926E048EC4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2A8EB503-36FA-421A-A4A5-1B926E048EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2A8EB503-36FA-421A-A4A5-1B926E048EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2A8EB503-36FA-421A-A4A5-1B926E048EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2A8EB503-36FA-421A-A4A5-1B926E048EC4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3CAFA0B-7298-4C7B-A009-EFA013204C64}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
211
DataPresentationManager.vbproj
Normal file
211
DataPresentationManager.vbproj
Normal file
@@ -0,0 +1,211 @@
|
||||
<?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>{2A8EB503-36FA-421A-A4A5-1B926E048EC4}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>DataPresentationManager.My.MyApplication</StartupObject>
|
||||
<RootNamespace>DataPresentationManager</RootNamespace>
|
||||
<AssemblyName>DataPresentationManager</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</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>DataPresentationManager.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>DataPresentationManager.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.2.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FlexCell, Version=4.4.5.0, Culture=neutral, PublicKeyToken=6f86587eb70ee309, processorArchitecture=MSIL" />
|
||||
<Reference Include="Google.Protobuf, Version=3.21.9.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Google.Protobuf.3.21.9\lib\net45\Google.Protobuf.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\K4os.Compression.LZ4.1.3.5\lib\net462\K4os.Compression.LZ4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.3.5.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\K4os.Compression.LZ4.Streams.1.3.5\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=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=8.2.0.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\MySql.Data.8.2.0\lib\net48\MySql.Data.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=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Configuration.ConfigurationManager.4.4.1\lib\net461\System.Configuration.ConfigurationManager.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\..\..\Project\BLV_Studio\BLV_Studio_20230302_增加设备类型\SourceCode\BLV_Studio\bin\Debug\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Diagnostics.DiagnosticSource, Version=7.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Diagnostics.DiagnosticSource.7.0.2\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<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.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.Windows.Forms.DataVisualization" />
|
||||
<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="TeeChart, Version=4.1.2017.2153, Culture=neutral, PublicKeyToken=9c8126276c77bdb7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Project\UTS_Studio\src\AUTS_Studio\bin\Debug\TeeChart.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ZstdSharp, Version=0.7.1.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
|
||||
<HintPath>packages\ZstdSharp.Port.0.7.1\lib\net461\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="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="Form1.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.vb">
|
||||
<DependentUpon>Form1.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="MysqlDataDispose.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.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" />
|
||||
</Project>
|
||||
6
DataPresentationManager.vbproj.user
Normal file
6
DataPresentationManager.vbproj.user
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
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
|
||||
747
Database/DbCmdHelper.vb
Normal file
747
Database/DbCmdHelper.vb
Normal file
@@ -0,0 +1,747 @@
|
||||
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
|
||||
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)
|
||||
|
||||
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
|
||||
747
DbCmdHelper.vb
Normal file
747
DbCmdHelper.vb
Normal file
@@ -0,0 +1,747 @@
|
||||
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
|
||||
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)
|
||||
|
||||
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
DbExecutor.vb
Normal file
377
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
|
||||
595
Form1.Designer.vb
generated
Normal file
595
Form1.Designer.vb
generated
Normal file
@@ -0,0 +1,595 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class Form1
|
||||
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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Grid_config = New FlexCell.Grid()
|
||||
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip()
|
||||
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton3 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripButton4 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.ChartBar = New Steema.TeeChart.TChart()
|
||||
Me.ScrollPager1 = New Steema.TeeChart.Tools.ScrollPager()
|
||||
Me.Grid_Mysqldate = New FlexCell.Grid()
|
||||
Me.ToolStrip3 = New System.Windows.Forms.ToolStrip()
|
||||
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.labY1 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripLabel5 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.labY2 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripLabel6 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.lab1_2 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripLabel9 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.labdevanme = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripLabel8 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.labDate = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator7 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripLabel13 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.labval = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripButton5 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator5 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripSeparator9 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.MySqlDataAdapter1 = New MySql.Data.MySqlClient.MySqlDataAdapter()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.ToolStrip2.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
Me.ToolStrip3.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(1557, 25)
|
||||
Me.ToolStrip1.TabIndex = 0
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 25)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Grid_config)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.ToolStrip2)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(1557, 812)
|
||||
Me.SplitContainer1.SplitterDistance = 368
|
||||
Me.SplitContainer1.TabIndex = 1
|
||||
'
|
||||
'Grid_config
|
||||
'
|
||||
Me.Grid_config.CheckedImage = Nothing
|
||||
Me.Grid_config.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Grid_config.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Grid_config.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Grid_config.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid_config.Location = New System.Drawing.Point(0, 29)
|
||||
Me.Grid_config.Name = "Grid_config"
|
||||
Me.Grid_config.Rows = 3
|
||||
Me.Grid_config.Size = New System.Drawing.Size(368, 783)
|
||||
Me.Grid_config.TabIndex = 2
|
||||
Me.Grid_config.UncheckedImage = Nothing
|
||||
'
|
||||
'ToolStrip2
|
||||
'
|
||||
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton1, Me.ToolStripButton3, Me.ToolStripButton2, Me.ToolStripLabel1, Me.ToolStripButton4})
|
||||
Me.ToolStrip2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip2.Name = "ToolStrip2"
|
||||
Me.ToolStrip2.Size = New System.Drawing.Size(368, 29)
|
||||
Me.ToolStrip2.TabIndex = 1
|
||||
Me.ToolStrip2.Text = "ToolStrip2"
|
||||
'
|
||||
'ToolStripButton1
|
||||
'
|
||||
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton1.Name = "ToolStripButton1"
|
||||
Me.ToolStripButton1.Size = New System.Drawing.Size(60, 26)
|
||||
Me.ToolStripButton1.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(84, 26)
|
||||
Me.ToolStripButton3.Text = "删除选中机型"
|
||||
'
|
||||
'ToolStripButton2
|
||||
'
|
||||
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton2.Image = CType(resources.GetObject("ToolStripButton2.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton2.Name = "ToolStripButton2"
|
||||
Me.ToolStripButton2.Size = New System.Drawing.Size(60, 26)
|
||||
Me.ToolStripButton2.Text = "清空机型"
|
||||
'
|
||||
'ToolStripLabel1
|
||||
'
|
||||
Me.ToolStripLabel1.AutoSize = False
|
||||
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
||||
Me.ToolStripLabel1.Size = New System.Drawing.Size(50, 22)
|
||||
'
|
||||
'ToolStripButton4
|
||||
'
|
||||
Me.ToolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton4.Font = New System.Drawing.Font("Microsoft YaHei UI", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
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(56, 26)
|
||||
Me.ToolStripButton4.Text = " 查询 "
|
||||
'
|
||||
'SplitContainer2
|
||||
'
|
||||
Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer2.Name = "SplitContainer2"
|
||||
Me.SplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer2.Panel1
|
||||
'
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.ChartBar)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Grid_Mysqldate)
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.ToolStrip3)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(1185, 812)
|
||||
Me.SplitContainer2.SplitterDistance = 343
|
||||
Me.SplitContainer2.TabIndex = 0
|
||||
'
|
||||
'ChartBar
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Aspect.ColorPaletteIndex = 20
|
||||
Me.ChartBar.Aspect.View3D = False
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Automatic = True
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Bottom.Grid.DrawEvery = 2
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Bottom.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.ChartBar.Axes.Bottom.Labels.Font.Size = 9
|
||||
Me.ChartBar.Axes.Bottom.Labels.Font.SizeFloat = 9.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Bottom.Title.Caption = "0"
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Bottom.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.ChartBar.Axes.Bottom.Title.Font.Size = 11
|
||||
Me.ChartBar.Axes.Bottom.Title.Font.SizeFloat = 11.0!
|
||||
Me.ChartBar.Axes.Bottom.Title.Lines = New String() {"0"}
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Left.Grid.DrawEvery = 2
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Left.Labels.Font.Brush.Color = System.Drawing.Color.Gray
|
||||
Me.ChartBar.Axes.Left.Labels.Font.Size = 9
|
||||
Me.ChartBar.Axes.Left.Labels.Font.SizeFloat = 9.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Left.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.ChartBar.Axes.Left.Title.Font.Size = 11
|
||||
Me.ChartBar.Axes.Left.Title.Font.SizeFloat = 11.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Right.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.ChartBar.Axes.Right.Labels.Font.Size = 9
|
||||
Me.ChartBar.Axes.Right.Labels.Font.SizeFloat = 9.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Axes.Top.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.ChartBar.Axes.Top.Labels.Font.Size = 9
|
||||
Me.ChartBar.Axes.Top.Labels.Font.SizeFloat = 9.0!
|
||||
Me.ChartBar.BackColor = System.Drawing.Color.Transparent
|
||||
Me.ChartBar.CurrentTheme = Steema.TeeChart.ThemeType.Lookout
|
||||
Me.ChartBar.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.ChartBar.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Header.Font.Brush.Color = System.Drawing.Color.Gray
|
||||
Me.ChartBar.Header.Font.Size = 12
|
||||
Me.ChartBar.Header.Font.SizeFloat = 12.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
|
||||
Me.ChartBar.Legend.Font.Size = 9
|
||||
Me.ChartBar.Legend.Font.SizeFloat = 9.0!
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Legend.Shadow.Visible = False
|
||||
Me.ChartBar.Legend.Transparent = True
|
||||
Me.ChartBar.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ChartBar.Name = "ChartBar"
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Panel.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Panel.Brush.Gradient.Visible = False
|
||||
Me.ChartBar.Panel.MarginRight = 10.0R
|
||||
Me.ChartBar.Size = New System.Drawing.Size(1185, 343)
|
||||
Me.ChartBar.TabIndex = 2
|
||||
Me.ChartBar.Tools.Add(Me.ScrollPager1)
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
'
|
||||
Me.ChartBar.Walls.Back.Brush.Visible = False
|
||||
Me.ChartBar.Walls.Back.Transparent = True
|
||||
Me.ChartBar.Walls.Back.Visible = False
|
||||
'
|
||||
'ScrollPager1
|
||||
'
|
||||
Me.ScrollPager1.EndValue = 0R
|
||||
Me.ScrollPager1.StartValue = 0R
|
||||
'
|
||||
'Grid_Mysqldate
|
||||
'
|
||||
Me.Grid_Mysqldate.CheckedImage = Nothing
|
||||
Me.Grid_Mysqldate.Cols = 30
|
||||
Me.Grid_Mysqldate.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Grid_Mysqldate.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Grid_Mysqldate.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Grid_Mysqldate.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid_Mysqldate.Location = New System.Drawing.Point(0, 25)
|
||||
Me.Grid_Mysqldate.Name = "Grid_Mysqldate"
|
||||
Me.Grid_Mysqldate.Rows = 1
|
||||
Me.Grid_Mysqldate.Size = New System.Drawing.Size(1185, 440)
|
||||
Me.Grid_Mysqldate.TabIndex = 3
|
||||
Me.Grid_Mysqldate.UncheckedImage = Nothing
|
||||
'
|
||||
'ToolStrip3
|
||||
'
|
||||
Me.ToolStrip3.BackColor = System.Drawing.Color.Lavender
|
||||
Me.ToolStrip3.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripLabel2, Me.labY1, Me.ToolStripSeparator4, Me.ToolStripLabel5, Me.labY2, Me.ToolStripSeparator3, Me.ToolStripLabel6, Me.lab1_2, Me.ToolStripSeparator1, Me.ToolStripLabel9, Me.labdevanme, Me.ToolStripSeparator6, Me.ToolStripLabel8, Me.labDate, Me.ToolStripSeparator7, Me.ToolStripLabel13, Me.labval, Me.ToolStripSeparator8, Me.ToolStripSeparator2, Me.ToolStripButton5, Me.ToolStripSeparator5, Me.ToolStripSeparator9})
|
||||
Me.ToolStrip3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip3.Name = "ToolStrip3"
|
||||
Me.ToolStrip3.Size = New System.Drawing.Size(1185, 25)
|
||||
Me.ToolStrip3.TabIndex = 2
|
||||
Me.ToolStrip3.Text = "ToolStrip3"
|
||||
'
|
||||
'ToolStripLabel2
|
||||
'
|
||||
Me.ToolStripLabel2.ForeColor = System.Drawing.Color.Orange
|
||||
Me.ToolStripLabel2.Name = "ToolStripLabel2"
|
||||
Me.ToolStripLabel2.Size = New System.Drawing.Size(26, 22)
|
||||
Me.ToolStripLabel2.Text = "X1:"
|
||||
'
|
||||
'labY1
|
||||
'
|
||||
Me.labY1.ForeColor = System.Drawing.Color.Orange
|
||||
Me.labY1.Name = "labY1"
|
||||
Me.labY1.Size = New System.Drawing.Size(15, 22)
|
||||
Me.labY1.Tag = "0"
|
||||
Me.labY1.Text = "0"
|
||||
'
|
||||
'ToolStripSeparator4
|
||||
'
|
||||
Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
|
||||
Me.ToolStripSeparator4.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripLabel5
|
||||
'
|
||||
Me.ToolStripLabel5.BackColor = System.Drawing.Color.Lime
|
||||
Me.ToolStripLabel5.ForeColor = System.Drawing.Color.Lime
|
||||
Me.ToolStripLabel5.Name = "ToolStripLabel5"
|
||||
Me.ToolStripLabel5.Size = New System.Drawing.Size(26, 22)
|
||||
Me.ToolStripLabel5.Text = "X2:"
|
||||
Me.ToolStripLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'labY2
|
||||
'
|
||||
Me.labY2.BackColor = System.Drawing.Color.Lime
|
||||
Me.labY2.ForeColor = System.Drawing.Color.Lime
|
||||
Me.labY2.Name = "labY2"
|
||||
Me.labY2.Size = New System.Drawing.Size(15, 22)
|
||||
Me.labY2.Tag = "0"
|
||||
Me.labY2.Text = "0"
|
||||
'
|
||||
'ToolStripSeparator3
|
||||
'
|
||||
Me.ToolStripSeparator3.Name = "ToolStripSeparator3"
|
||||
Me.ToolStripSeparator3.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripLabel6
|
||||
'
|
||||
Me.ToolStripLabel6.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
Me.ToolStripLabel6.ForeColor = System.Drawing.Color.Navy
|
||||
Me.ToolStripLabel6.Name = "ToolStripLabel6"
|
||||
Me.ToolStripLabel6.Size = New System.Drawing.Size(46, 22)
|
||||
Me.ToolStripLabel6.Text = "X2-X1:"
|
||||
'
|
||||
'lab1_2
|
||||
'
|
||||
Me.lab1_2.Name = "lab1_2"
|
||||
Me.lab1_2.Size = New System.Drawing.Size(15, 22)
|
||||
Me.lab1_2.Text = "0"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripLabel9
|
||||
'
|
||||
Me.ToolStripLabel9.Name = "ToolStripLabel9"
|
||||
Me.ToolStripLabel9.Size = New System.Drawing.Size(44, 22)
|
||||
Me.ToolStripLabel9.Text = "机型:"
|
||||
'
|
||||
'labdevanme
|
||||
'
|
||||
Me.labdevanme.Name = "labdevanme"
|
||||
Me.labdevanme.Size = New System.Drawing.Size(23, 22)
|
||||
Me.labdevanme.Text = "---"
|
||||
'
|
||||
'ToolStripSeparator6
|
||||
'
|
||||
Me.ToolStripSeparator6.Name = "ToolStripSeparator6"
|
||||
Me.ToolStripSeparator6.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripLabel8
|
||||
'
|
||||
Me.ToolStripLabel8.Name = "ToolStripLabel8"
|
||||
Me.ToolStripLabel8.Size = New System.Drawing.Size(44, 22)
|
||||
Me.ToolStripLabel8.Text = "日期:"
|
||||
'
|
||||
'labDate
|
||||
'
|
||||
Me.labDate.Name = "labDate"
|
||||
Me.labDate.Size = New System.Drawing.Size(23, 22)
|
||||
Me.labDate.Text = "---"
|
||||
'
|
||||
'ToolStripSeparator7
|
||||
'
|
||||
Me.ToolStripSeparator7.Name = "ToolStripSeparator7"
|
||||
Me.ToolStripSeparator7.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripLabel13
|
||||
'
|
||||
Me.ToolStripLabel13.Name = "ToolStripLabel13"
|
||||
Me.ToolStripLabel13.Size = New System.Drawing.Size(44, 22)
|
||||
Me.ToolStripLabel13.Text = "数值:"
|
||||
'
|
||||
'labval
|
||||
'
|
||||
Me.labval.Name = "labval"
|
||||
Me.labval.Size = New System.Drawing.Size(23, 22)
|
||||
Me.labval.Text = "---"
|
||||
'
|
||||
'ToolStripSeparator8
|
||||
'
|
||||
Me.ToolStripSeparator8.Name = "ToolStripSeparator8"
|
||||
Me.ToolStripSeparator8.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripSeparator2
|
||||
'
|
||||
Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
|
||||
Me.ToolStripSeparator2.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripButton5
|
||||
'
|
||||
Me.ToolStripButton5.BackColor = System.Drawing.SystemColors.ActiveBorder
|
||||
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(132, 22)
|
||||
Me.ToolStripButton5.Text = "快速定位选中时间节点"
|
||||
Me.ToolStripButton5.Visible = False
|
||||
'
|
||||
'ToolStripSeparator5
|
||||
'
|
||||
Me.ToolStripSeparator5.Name = "ToolStripSeparator5"
|
||||
Me.ToolStripSeparator5.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'ToolStripSeparator9
|
||||
'
|
||||
Me.ToolStripSeparator9.Name = "ToolStripSeparator9"
|
||||
Me.ToolStripSeparator9.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'MySqlDataAdapter1
|
||||
'
|
||||
Me.MySqlDataAdapter1.DeleteCommand = Nothing
|
||||
Me.MySqlDataAdapter1.InsertCommand = Nothing
|
||||
Me.MySqlDataAdapter1.SelectCommand = Nothing
|
||||
Me.MySqlDataAdapter1.UpdateCommand = Nothing
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1557, 837)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "Form1"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.PerformLayout()
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.ToolStrip2.ResumeLayout(False)
|
||||
Me.ToolStrip2.PerformLayout()
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.PerformLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.ToolStrip3.ResumeLayout(False)
|
||||
Me.ToolStrip3.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents Grid_config As FlexCell.Grid
|
||||
Friend WithEvents ToolStrip2 As ToolStrip
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents ToolStripButton1 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton3 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton2 As ToolStripButton
|
||||
Friend WithEvents ToolStripLabel1 As ToolStripLabel
|
||||
Friend WithEvents ToolStripButton4 As ToolStripButton
|
||||
Friend WithEvents MySqlDataAdapter1 As MySql.Data.MySqlClient.MySqlDataAdapter
|
||||
Friend WithEvents ChartBar As Steema.TeeChart.TChart
|
||||
Friend WithEvents ScrollPager1 As Steema.TeeChart.Tools.ScrollPager
|
||||
Friend WithEvents Grid_Mysqldate As FlexCell.Grid
|
||||
Friend WithEvents ToolStrip3 As ToolStrip
|
||||
Friend WithEvents ToolStripLabel2 As ToolStripLabel
|
||||
Friend WithEvents labY1 As ToolStripLabel
|
||||
Friend WithEvents ToolStripLabel5 As ToolStripLabel
|
||||
Friend WithEvents labY2 As ToolStripLabel
|
||||
Friend WithEvents ToolStripLabel6 As ToolStripLabel
|
||||
Friend WithEvents lab1_2 As ToolStripLabel
|
||||
Friend WithEvents ToolStripSeparator1 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripLabel9 As ToolStripLabel
|
||||
Friend WithEvents labdevanme As ToolStripLabel
|
||||
Friend WithEvents ToolStripLabel8 As ToolStripLabel
|
||||
Friend WithEvents labDate As ToolStripLabel
|
||||
Friend WithEvents ToolStripLabel13 As ToolStripLabel
|
||||
Friend WithEvents labval As ToolStripLabel
|
||||
Friend WithEvents ToolStripButton5 As ToolStripButton
|
||||
Friend WithEvents ToolStripSeparator2 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator3 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator4 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator6 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator7 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator8 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator5 As ToolStripSeparator
|
||||
Friend WithEvents ToolStripSeparator9 As ToolStripSeparator
|
||||
End Class
|
||||
214
Form1.resx
Normal file
214
Form1.resx
Normal file
@@ -0,0 +1,214 @@
|
||||
<?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>303, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>415, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ToolStripButton1.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="ToolStripButton2.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="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>
|
||||
<metadata name="ScrollPager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>527, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStrip3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>652, 17</value>
|
||||
</metadata>
|
||||
<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="MySqlDataAdapter1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>25</value>
|
||||
</metadata>
|
||||
</root>
|
||||
815
Form1.vb
Normal file
815
Form1.vb
Normal file
@@ -0,0 +1,815 @@
|
||||
Imports FlexCell
|
||||
Imports Steema.TeeChart
|
||||
|
||||
Public Class Form1
|
||||
|
||||
|
||||
Public filepath As String
|
||||
|
||||
Public GdbConnString As String
|
||||
Public linglist As Dictionary(Of String, Steema.TeeChart.Styles.Line)
|
||||
|
||||
|
||||
Private _axis As List(Of Steema.TeeChart.Axis)
|
||||
Private _fastLine As Dictionary(Of String, Steema.TeeChart.Styles.FastLine)
|
||||
Private _curSor(1) As Steema.TeeChart.Tools.CursorTool
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
filepath = $"{Application.StartupPath }\config.flx"
|
||||
GdbConnString = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Port=3307;Database=mqqtmysql;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;"
|
||||
|
||||
_axis = New List(Of Axis)
|
||||
_fastLine = New Dictionary(Of String, Styles.FastLine)
|
||||
init_Grid_config()
|
||||
FileTo_Grid_config()
|
||||
linglist = New Dictionary(Of String, Steema.TeeChart.Styles.Line)
|
||||
'initChartBar(10, 1701747214, 1704822658)
|
||||
'Testfunction()
|
||||
'ksjfk()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub InitPieChart(kkdic As Dictionary(Of String, Dictionary(Of Long, Double)), starttime As Long, stoptime As Long)
|
||||
|
||||
|
||||
InitTeeChart(kkdic, starttime, stoptime)
|
||||
Dim fl As Steema.TeeChart.Styles.FastLine
|
||||
Dim tval As Dictionary(Of Long, Double)
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1970, 1, 1, 0, 0, 0))
|
||||
' 获取本地日期和时间
|
||||
Dim yt As DateTime
|
||||
|
||||
For t = starttime To stoptime
|
||||
For Each node In kkdic
|
||||
fl = _fastLine.Item(node.Key)
|
||||
tval = node.Value
|
||||
yt = (dtOffset.AddSeconds(t)).LocalDateTime
|
||||
|
||||
If tval.ContainsKey(t) Then
|
||||
If t = starttime OrElse Not (tval.Item(t) = tval.Item(t - 1)) Then
|
||||
Else
|
||||
fl.Add(yt.ToOADate, tval.Item(t - 1))
|
||||
'Console.WriteLine($"{yt.ToOADate}:{ tval.Item(t - 1)}")
|
||||
End If
|
||||
fl.Add(yt.ToOADate, tval.Item(t))
|
||||
'Console.WriteLine($"{yt.ToOADate}:{ tval.Item(t)}")
|
||||
''Console.WriteLine(DateTime.FromOADate(yt.ToOADate).ToString("yyyy-MM-dd HH:mm:ss"))
|
||||
|
||||
'#1/16/2024 01:09:47 AM#
|
||||
Else
|
||||
If t < tval.Keys(0) Then
|
||||
If tval.Values(0) = 1 Then
|
||||
fl.Add(yt.ToOADate, 0)
|
||||
tval.Add(t, 0)
|
||||
'Console.WriteLine($"{yt.ToOADate}:0")
|
||||
ElseIf tval.Values(0) = 0 Then
|
||||
fl.Add(yt.ToOADate, 1)
|
||||
tval.Add(t, 1)
|
||||
'Console.WriteLine($"{yt.ToOADate}:1")
|
||||
Else
|
||||
fl.Add(yt.ToOADate, 0.5)
|
||||
tval.Add(t, 0.5)
|
||||
'Console.WriteLine($"{yt.ToOADate}:0.5")
|
||||
End If
|
||||
Else
|
||||
If tval.Item(t - 1) = 1 Then
|
||||
fl.Add(yt.ToOADate, 1)
|
||||
tval.Add(t, 1)
|
||||
'Console.WriteLine($"{yt.ToOADate}:1")
|
||||
ElseIf tval.Item(t - 1) = 0 Then
|
||||
fl.Add(yt.ToOADate, 0)
|
||||
tval.Add(t, 0)
|
||||
'Console.WriteLine($"{yt.ToOADate}:0")
|
||||
Else
|
||||
fl.Add(yt.ToOADate, 0.5)
|
||||
tval.Add(t, 0.5)
|
||||
'Console.WriteLine($"{yt.ToOADate}:0.5")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
End Sub
|
||||
Public Sub initChartBar(tCounta As Integer, starttime As Double, stoptime As Double)
|
||||
|
||||
'Dim devline = AddTeeChartStylesLine()
|
||||
|
||||
ChartBar.Header.Text = "" '标题
|
||||
ChartBar.Header.Visible = True
|
||||
ChartBar.Legend.Transparent = False '刻印说明
|
||||
' ChartBar.Legend.Alignment = Steema.TeeChart.LegendAlignments.Top
|
||||
ChartBar.Aspect.View3D = False
|
||||
ChartBar.Axes.Left.Automatic = True
|
||||
ChartBar.Axes.Left.AutomaticMaximum = True
|
||||
ChartBar.Axes.Left.AutomaticMinimum = True
|
||||
ChartBar.Axes.Left.Labels.ValueFormat = "0.0"
|
||||
ChartBar.Axes.Left.Increment = 0.5
|
||||
ChartBar.Axes.Left.Labels.LabelHeight(10)
|
||||
|
||||
'ChartBar.Axes.Left.Scroll(15, True)
|
||||
|
||||
'ChartBar.Axes.Left.Labels.Exponent = True
|
||||
'Line1.Clear()
|
||||
'ChartBar.Axes.
|
||||
ChartBar.Axes.Bottom.AutomaticMaximum = False
|
||||
ChartBar.Axes.Bottom.AutomaticMinimum = False
|
||||
ChartBar.Axes.Bottom.Automatic = False
|
||||
ChartBar.Axes.Bottom.Increment = 1
|
||||
ChartBar.Axes.Bottom.Maximum = stoptime
|
||||
'ChartBar.Axes.Bottom.Minimum = starttime
|
||||
'ChartBar.Axes.Bottom.Labels.Width = 20
|
||||
'ChartBar.Axes.Bottom.Labels.DateTimeFormat = "HH:mm:ss"
|
||||
'ChartBar.Series(0).XValues.DateTime = False
|
||||
'ChartBar.Axes.Bottom.MaxXValue = stoptime
|
||||
'ChartBar.Axes.Bottom.ma = stoptime
|
||||
'ChartBar.Axes.Bottom.Scroll(1705386785, False)
|
||||
|
||||
'ChartBar.Axes.Bottom.Scroll()
|
||||
'ChartBar.Zoom.ZoomRect(New Rectangle(0, 0, 1000, 1000))
|
||||
|
||||
|
||||
|
||||
Dim ftemp = tCounta
|
||||
ChartBar.Axes.Left.Maximum = ftemp ' / 100
|
||||
ChartBar.Axes.Left.Minimum = 0 '/ 100
|
||||
|
||||
ChartBar.Axes.Bottom.Labels.Align = -45
|
||||
ChartBar.Axes.Bottom.Labels.MultiLine = True
|
||||
|
||||
|
||||
'Dim X As Integer = ChartBar
|
||||
|
||||
'Dim R As New Rectangle(X, Y, Width, Height)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
' ChartBar.Refresh()
|
||||
End Sub
|
||||
Public Sub Testfunction()
|
||||
|
||||
ChartBar.Header.Text = "" '标题
|
||||
ChartBar.Header.Visible = True
|
||||
ChartBar.Aspect.View3D = False
|
||||
|
||||
|
||||
ChartBar.Axes.Left.Automatic = False
|
||||
ChartBar.Axes.Left.AutomaticMaximum = False
|
||||
ChartBar.Axes.Left.AutomaticMinimum = False
|
||||
ChartBar.Axes.Left.Labels.ValueFormat = "0.0"
|
||||
ChartBar.Axes.Left.Increment = 0.5
|
||||
ChartBar.Axes.Left.Maximum = 10 ' / 100
|
||||
ChartBar.Axes.Left.Minimum = 0 '/ 100
|
||||
|
||||
ChartBar.Axes.Bottom.AutomaticMaximum = False
|
||||
ChartBar.Axes.Bottom.AutomaticMinimum = False
|
||||
ChartBar.Axes.Bottom.Automatic = False
|
||||
ChartBar.Axes.Bottom.Labels.Align = -45
|
||||
ChartBar.Axes.Bottom.Labels.MultiLine = True
|
||||
ChartBar.Axes.Bottom.Labels.DateTimeFormat = "yyyy-MM-dd"
|
||||
ChartBar.Series(0).XValues.DateTime = True
|
||||
|
||||
|
||||
|
||||
' 创建 DateTimeOffset 对象并设置其值为指定的 UTC 秒数
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1970, 1, 1), TimeSpan.Zero)
|
||||
' 获取本地日期和时间
|
||||
Dim yt As DateTime = (dtOffset + TimeSpan.FromSeconds(1704822366)).LocalDateTime
|
||||
Dim minValue As DateTime = New DateTime(yt.Year, yt.Month, yt.Day, yt.Hour, yt.Minute, yt.Second) '' 最小日期
|
||||
yt = (dtOffset + TimeSpan.FromSeconds(1704823530)).LocalDateTime
|
||||
Dim maxValue As DateTime = New DateTime(yt.Year, yt.Month, yt.Day, yt.Hour, yt.Minute, yt.Second) '' 最小日期
|
||||
|
||||
ChartBar.Axes.Bottom.Maximum = maxValue.ToOADate
|
||||
ChartBar.Axes.Bottom.Minimum = minValue.ToOADate
|
||||
'Dim dou As Double = 1 / (maxValue.ToOADate - minValue.ToOADate)
|
||||
'ChartBar.Axes.Bottom.Increment = TimeSpan.FromSeconds(1).TotalSeconds
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ksjfk()
|
||||
' 创建TeeChart控件对象
|
||||
Dim chart = ChartBar.Chart
|
||||
|
||||
' 添加Series到图表上(这里使用Line Series作示例)
|
||||
Dim series As New Steema.TeeChart.Styles.Line()
|
||||
'chart.Add(series)
|
||||
ChartBar.Series.Add(series)
|
||||
' 定义要显示的数据点及其相应的X轴标签
|
||||
Dim xDataPoints() As Double = {10, 20, 30, 40} ' X轴数据点
|
||||
Dim yDataPoints() As Double = {50, 60, 70, 80} ' Y轴数据点
|
||||
Dim labels() As String = {"Label1", "Label2", "Label3", "Label4"} ' X轴标签
|
||||
|
||||
' 遍历数据并设置每个数据点的值和标签
|
||||
For i As Integer = 0 To xDataPoints.Length - 1
|
||||
|
||||
Dim point As New PointF(xDataPoints(i), yDataPoints(i))
|
||||
|
||||
' 设置X轴标签
|
||||
point.X = labels(i)
|
||||
|
||||
' 向系列中添加数据点
|
||||
series.Add(point)
|
||||
Next
|
||||
|
||||
' 显示图表
|
||||
'chart.ShowDialog()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function AddTeeChartStylesLine() As Styles.Line
|
||||
Dim devline As Steema.TeeChart.Styles.Line = New Styles.Line
|
||||
ChartBar.Series.Add(devline)
|
||||
Dim minValue As DateTime = New DateTime(2024, 1, 10, 2, 35, 30) '' 最小日期
|
||||
|
||||
|
||||
Return devline
|
||||
' Dim chart As TChart = ChartBar
|
||||
End Function
|
||||
|
||||
Public Sub init_Grid_config()
|
||||
With Grid_config
|
||||
.NewFile()
|
||||
.Cols = 3
|
||||
.Rows = 3
|
||||
.DisplayRowNumber = False
|
||||
.Cell(0, 0).Text = "序号"
|
||||
.Cell(0, 1).Text = "属性"
|
||||
.Cell(0, 2).Text = "属性值"
|
||||
.Column(0).Width = 0
|
||||
.Column(1).Width = 150
|
||||
.Column(1).Locked = True
|
||||
.Column(2).Width = 200
|
||||
.Column(1).Alignment = AlignmentEnum.CenterCenter
|
||||
.Column(2).Alignment = AlignmentEnum.CenterCenter
|
||||
.Cell(1, 1).Text = "开始时间"
|
||||
.Cell(2, 1).Text = "结束时间"
|
||||
.Cell(1, 2).CellType = CellTypeEnum.DateTime
|
||||
.Cell(2, 2).CellType = CellTypeEnum.DateTime
|
||||
|
||||
|
||||
|
||||
End With
|
||||
End Sub
|
||||
Public Sub FileTo_Grid_config()
|
||||
If IO.File.Exists(filepath) Then
|
||||
Grid_config.OpenFile(filepath)
|
||||
End If
|
||||
End Sub
|
||||
Public Sub Grid_config_FileTo()
|
||||
|
||||
Grid_config.SaveFile(filepath)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
Grid_config_FileTo()
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
|
||||
Grid_config.AddItem("")
|
||||
Grid_config.Cell(Grid_config.Rows - 1, 1).Text = "机型"
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
|
||||
Grid_configDeleteRow(Grid_config.ActiveCell.Row)
|
||||
End Sub
|
||||
Public Sub Grid_configDeleteRow(erow As Integer)
|
||||
Dim devname As String = Grid_config.Cell(erow, 1).Text
|
||||
If devname.Equals("机型") Then
|
||||
Grid_config.Row(erow).Delete()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton2.Click
|
||||
init_Grid_config()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
|
||||
MysqlDataDispose()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub MysqlDataDispose()
|
||||
Dim selectstr As String = "SELECT `deviceName`,`eventName`,`timestamp`,`timemills`FROM `mqqtmysql`.`devicestate` WHERE"
|
||||
Dim cstrpar As String = String.Empty
|
||||
Dim starttime, stoptime As DateTime
|
||||
Dim dtZone As DateTime = New DateTime(1970, 1, 1, 0, 0, 0)
|
||||
Try
|
||||
|
||||
starttime = DateTime.Parse(Grid_config.Cell(1, 2).Text.Trim)
|
||||
stoptime = DateTime.Parse(Grid_config.Cell(2, 2).Text.Trim)
|
||||
If IsNothing(starttime) OrElse IsNothing(stoptime) Then
|
||||
MsgBox($"数据查询失败!!!{vbCrLf }原因:{vbCrLf }日期输入错误")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox($"数据查询失败!!!{vbCrLf }原因:{vbCrLf }日期输入错误")
|
||||
End Try
|
||||
|
||||
|
||||
For i = 1 To Grid_config.Rows - 1
|
||||
If i = 1 Then
|
||||
selectstr = $"{selectstr}`timestamp`>='{starttime.Subtract(dtZone).TotalSeconds }' And "
|
||||
ElseIf i = 2 Then
|
||||
selectstr = $"{selectstr}`timestamp`<='{stoptime.Subtract(dtZone).TotalSeconds}' And "
|
||||
Else
|
||||
cstrpar = $"{cstrpar}OR deviceName LIKE '%{Grid_config.Cell(i, 2).Text.Trim}%'{vbCrLf }"
|
||||
End If
|
||||
|
||||
Next
|
||||
If Not String.IsNullOrEmpty(cstrpar) Then
|
||||
cstrpar = cstrpar.Remove(0, 2)
|
||||
selectstr = $"{selectstr}({cstrpar.Trim }) ORDER BY (`timemills`) DESC"
|
||||
End If
|
||||
Dim rowdic As Dictionary(Of String, Dictionary(Of String, String)) = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
Dim colounmdic As Dictionary(Of String, String) = New Dictionary(Of String, String)
|
||||
Dim dt As DataTable
|
||||
|
||||
Try
|
||||
Using db As New DbExecutor(DbExecutor.DbTypeEnum.Mysql, GdbConnString)
|
||||
db.Open()
|
||||
dt = db.ExecuteDataTable(selectstr)
|
||||
If IsNothing(dt) OrElse dt.Rows.Count = 0 OrElse dt.Columns.Count = 0 Then
|
||||
MsgBox($"数据查询失败!!!{vbCrLf }原因:{vbCrLf }数据查询语句异常:{selectstr}")
|
||||
Else
|
||||
|
||||
|
||||
rowdic.Add("colounmdic", colounmdic)
|
||||
For i = 0 To dt.Rows.Count - 1
|
||||
Dim rownodedic As Dictionary(Of String, String) = New Dictionary(Of String, String)
|
||||
Dim celltext As String = String.Empty
|
||||
If dt(i)(1).ToString.Trim.Equals("EV_ONLINE") Then
|
||||
celltext = 1
|
||||
ElseIf dt(i)(1).ToString.Trim.Equals("EV_OFFLINE") Then
|
||||
celltext = 0
|
||||
End If
|
||||
If Not colounmdic.ContainsKey(dt(i)(0).ToString.Trim) Then
|
||||
colounmdic.Add(dt(i)(0).ToString.Trim, i)
|
||||
End If
|
||||
|
||||
rownodedic.Add(dt(i)(0).ToString.Trim, celltext)
|
||||
If rowdic.ContainsKey(dt(i)(3).ToString.Trim) Then
|
||||
'
|
||||
Else
|
||||
rowdic.Add(dt(i)(3).ToString.Trim, rownodedic)
|
||||
Console.WriteLine($"重复字段:{dt(i)(3).ToString.Trim}")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Using
|
||||
|
||||
initGrid_Mysqldate(rowdic)
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox($"数据查询失败!!!{vbCrLf }原因:{vbCrLf }{ex.Message }")
|
||||
Return
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub initGrid_Mysqldate(rowdic As Dictionary(Of String, Dictionary(Of String, String)))
|
||||
If IsNothing(rowdic) AndAlso rowdic.Count = 0 AndAlso (Not rowdic.ContainsKey("colounmdic")) Then
|
||||
MsgBox($"数据加载失败!!数据为空或未检测到列信息。")
|
||||
End If
|
||||
|
||||
Dim starttime As Long = 0
|
||||
Dim stoptime As Long = 0
|
||||
Dim kkdic As Dictionary(Of String, Dictionary(Of Long, Double)) = New Dictionary(Of String, Dictionary(Of Long, Double))
|
||||
Dim colounmdic As Dictionary(Of String, String) = rowdic.Item("colounmdic")
|
||||
With Grid_Mysqldate
|
||||
.NewFile()
|
||||
.AutoRedraw = False
|
||||
.Cols = colounmdic.Count + 3
|
||||
.Rows = 1
|
||||
.DisplayRowNumber = True
|
||||
.Cell(0, 0).Text = "序号"
|
||||
.Cell(0, 1).Text = "时间"
|
||||
.Cell(0, 2).Text = "时间戳"
|
||||
.Column(0).Width = 20
|
||||
.Column(1).Width = 150
|
||||
.Column(1).Alignment = AlignmentEnum.CenterCenter
|
||||
|
||||
For i = 0 To colounmdic.Count - 1
|
||||
.Cell(0, i + 3).Text = colounmdic.Keys(i)
|
||||
.Column(i + 3).Alignment = AlignmentEnum.CenterCenter
|
||||
Next
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1970, 1, 1), TimeSpan.Zero)
|
||||
' 获取本地日期和时间
|
||||
|
||||
|
||||
For Each node In rowdic
|
||||
If node.Key.Equals("colounmdic") Then Continue For
|
||||
.AddItem("")
|
||||
|
||||
Dim t As Long = Long.Parse(node.Key)
|
||||
t = t / 1000
|
||||
Dim yt As DateTime = (dtOffset + TimeSpan.FromSeconds(t)).LocalDateTime
|
||||
If starttime = 0 OrElse t < starttime Then
|
||||
starttime = t
|
||||
End If
|
||||
If stoptime = 0 OrElse t > stoptime Then
|
||||
stoptime = t
|
||||
End If
|
||||
|
||||
|
||||
.Cell(.Rows - 1, 1).Text = yt.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
.Cell(.Rows - 1, 2).Text = t.ToString
|
||||
For Each index In node.Value
|
||||
For j = 0 To colounmdic.Count - 1
|
||||
' 'Console.WriteLine(.Cell(0, j + 2).Text)
|
||||
If .Cell(0, j + 3).Text.Equals(index.Key) Then
|
||||
.Cell(.Rows - 1, j + 3).Text = index.Value
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
Dim datadic As Dictionary(Of Long, Double)
|
||||
If kkdic.ContainsKey(node.Value.Keys(0)) Then
|
||||
datadic = kkdic.Item(node.Value.Keys(0))
|
||||
If datadic.ContainsKey(t) Then
|
||||
datadic.Item(t) = CInt(node.Value.Values(0))
|
||||
Else
|
||||
datadic.Add(t, node.Value.Values(0))
|
||||
End If
|
||||
|
||||
Else
|
||||
datadic = New Dictionary(Of Long, Double)
|
||||
datadic.Add(t, node.Value.Values(0))
|
||||
kkdic.Add(node.Value.Keys(0), datadic)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End With
|
||||
Grid_Mysqldate.AutoRedraw = True
|
||||
Grid_Mysqldate.Refresh()
|
||||
|
||||
InitPieChart(kkdic, starttime, stoptime)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 初始化Chart控件
|
||||
''' </summary>
|
||||
Private Sub InitTeeChart(kkdic As Dictionary(Of String, Dictionary(Of Long, Double)), starttime As Long, stoptime As Long)
|
||||
ChartBar.AutoRepaint = False
|
||||
ChartBar.Header.Lines = New String() {""} 'TeeChart标题
|
||||
ChartBar.Panning.InsideBounds = True
|
||||
ChartBar.Panning.Allow = ScrollModes.Horizontal
|
||||
InitCustomAxies(kkdic, starttime, stoptime)
|
||||
InitFastLine(kkdic)
|
||||
InitCursor()
|
||||
ChartBar.AutoRepaint = True
|
||||
ChartBar.Refresh()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 初始化轴
|
||||
''' </summary>
|
||||
Private Sub InitCustomAxies(kkdic As Dictionary(Of String, Dictionary(Of Long, Double)), starttime As Long, stoptime As Long)
|
||||
|
||||
_axis.Clear()
|
||||
ChartBar.Axes.Custom.Clear()
|
||||
ChartBar.Walls.Visible = False '不显示立面(背景色将统一)
|
||||
|
||||
ChartBar.Axes.Bottom.Title.Caption = "时间轴"
|
||||
ChartBar.Axes.Bottom.Title.Visible = False
|
||||
ChartBar.Axes.Bottom.MaximumOffset = 4 '最大值偏移
|
||||
ChartBar.Axes.Bottom.MinimumOffset = 4 '最小值偏移
|
||||
ChartBar.Axes.Bottom.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash
|
||||
ChartBar.Axes.Bottom.Grid.Width = 2
|
||||
ChartBar.Axes.Bottom.Ticks.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
ChartBar.Axes.Bottom.Ticks.Length = 4 '标记长度
|
||||
ChartBar.Axes.Bottom.Ticks.Width = 4 '标记宽度
|
||||
ChartBar.Axes.Bottom.Grid.Transparency = 60
|
||||
' _axis.Add(ChartBar.Axes.Bottom)
|
||||
ChartBar.Axes.Bottom.Automatic = False
|
||||
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1970, 1, 1, 0, 0, 0))
|
||||
' 获取本地日期和时间
|
||||
Dim yt As DateTime
|
||||
yt = (dtOffset.AddSeconds(stoptime)).LocalDateTime
|
||||
ChartBar.Axes.Bottom.Maximum = yt.ToOADate
|
||||
Dim bvtOffset As New DateTimeOffset(New DateTime(1970, 1, 1, 0, 0, 0))
|
||||
yt = (dtOffset.AddSeconds(starttime )).LocalDateTime
|
||||
|
||||
ChartBar.Axes.Bottom.Minimum = yt.ToOADate
|
||||
' ChartBar.Axes.Bottom.Increment = 1
|
||||
ChartBar.Axes.Bottom.Logarithmic = False
|
||||
'ChartBar.Axes.Right.Title.Right = 20
|
||||
ChartBar.Axes.Bottom.Labels.DateTimeFormat = "yyyy-MM-dd HH"
|
||||
|
||||
ChartBar.Axes.Left.Title.Caption = "电流-电压轴"
|
||||
ChartBar.Axes.Left.Title.Visible = False
|
||||
ChartBar.Axes.Left.MaximumOffset = 4 '最大值偏移
|
||||
ChartBar.Axes.Left.MinimumOffset = 4 '最小值偏移
|
||||
ChartBar.Axes.Left.Grid.Style = System.Drawing.Drawing2D.DashStyle.Dash
|
||||
ChartBar.Axes.Left.Grid.Width = 2
|
||||
ChartBar.Axes.Left.Ticks.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
ChartBar.Axes.Left.Ticks.Length = 2 '标记长度
|
||||
ChartBar.Axes.Left.Ticks.Width = 2 '标记宽度
|
||||
ChartBar.Axes.Left.Grid.Transparency = 60
|
||||
ChartBar.Axes.Left.Automatic = False
|
||||
ChartBar.Axes.Left.Minimum = 0.001
|
||||
ChartBar.Axes.Left.Maximum = 1000
|
||||
ChartBar.Axes.Left.Logarithmic = True
|
||||
|
||||
|
||||
For i = 0 To kkdic.Count - 1
|
||||
|
||||
|
||||
|
||||
'_axis.Add(ChartBar.Axes.Left)
|
||||
'Case Else 'IO
|
||||
Dim idx As Integer = i
|
||||
_axis.Add(New Steema.TeeChart.Axis)
|
||||
_axis(i).Title.Caption = kkdic.Keys(i) '标题文本
|
||||
|
||||
_axis(i).Title.Font.Brush.Color = Color.GhostWhite
|
||||
|
||||
_axis(i).Title.Angle = 0 '标题角度
|
||||
_axis(i).AxisPen.Color = Color.FromArgb(255, idx * 12, 255 - idx * 10, idx * 6) '颜色
|
||||
_axis(i).OtherSide = True '右边显示
|
||||
|
||||
_axis(i).StartPosition = idx * 8.0R
|
||||
_axis(i).EndPosition = _axis(i).StartPosition + 4.0R
|
||||
_axis(i).Automatic = False
|
||||
_axis(i).Minimum = 0
|
||||
_axis(i).Maximum = 1
|
||||
_axis(i).Increment = 1.0R
|
||||
_axis(i).Grid.Visible = False
|
||||
_axis(i).Labels.Angle = 0 '角度
|
||||
|
||||
|
||||
ChartBar.Axes.Custom.Add(_axis(i))
|
||||
|
||||
'End Select
|
||||
Next
|
||||
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' 初始化线
|
||||
''' </summary>
|
||||
Private Sub InitFastLine(kkdic As Dictionary(Of String, Dictionary(Of Long, Double)))
|
||||
ChartBar.Series.Clear()
|
||||
_fastLine.Clear()
|
||||
For i = 0 To kkdic.Count - 1
|
||||
_fastLine.Add(kkdic.Keys(i), New Steema.TeeChart.Styles.FastLine)
|
||||
AddHandler _fastLine.Item(kkdic.Keys(i)).Click, AddressOf FastLine1_Click
|
||||
' _fastLine(i).Title = $"电流{i}" ' FastLineTitle(i) '标题
|
||||
_fastLine.Item(kkdic.Keys(i)).TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
|
||||
ChartBar.Series.Add(_fastLine.Item(kkdic.Keys(i)))
|
||||
_fastLine.Item(kkdic.Keys(i)).XValues.DateTime = True
|
||||
'Select Case i
|
||||
' Case 0
|
||||
' _fastLine(i).Title = $"电流"
|
||||
' ' FastLine(i).CustomVertAxis = ChartBar.Axes.Left '绑定电流轴
|
||||
' _fastLine(i).Transparency = 0 '线条透明度
|
||||
' _fastLine(i).LinePen.Color = Color.FromArgb(255, 255, 0, 0) '线条颜色
|
||||
'
|
||||
' Case 1 To 5
|
||||
' If i = 1 Then
|
||||
' _fastLine(i).Title = $"电压"
|
||||
' Else
|
||||
' _fastLine(i).Title = $"CH{i - 1}"
|
||||
' End If
|
||||
|
||||
' ' _fastLine(i).Visible = False
|
||||
' ' _fastLine(i).CustomVertAxis = _axis(0) '绑定电压
|
||||
' _fastLine(i).Transparency = 75 '线条透明度
|
||||
' _fastLine(i).LinePen.Color = Color.FromArgb(126, 0, 0, 255) '线条颜色
|
||||
' _fastLine(i).Legend.Visible = True '不在图例中显示
|
||||
' Case Else
|
||||
_fastLine.Item(kkdic.Keys(i)).Title = $"{kkdic.Keys(i)}"
|
||||
'_fastLine(i).Legend.Visible = True '不在图例中显示
|
||||
' _fastLine.Item(kkdic.Keys(i)).Visible = False
|
||||
_fastLine.Item(kkdic.Keys(i)).Transparency = 0 '线条透明度
|
||||
_fastLine.Item(kkdic.Keys(i)).CustomVertAxis = _axis(i) '绑定IO轴
|
||||
_fastLine.Item(kkdic.Keys(i)).Stairs = True '线条阶梯状
|
||||
Dim random As New Random()
|
||||
|
||||
_fastLine.Item(kkdic.Keys(i)).LinePen.Color = Color.GhostWhite '线条颜色
|
||||
'_fastLine.Item(kkdic.Keys(i)).LinePen.Color = Color.Blue
|
||||
_fastLine.Item(kkdic.Keys(i)).LinePen.Width = 2
|
||||
_fastLine.Item(kkdic.Keys(i)).Legend.Visible = False '不在图例中显示
|
||||
' _fastLine(i).LinePen.Color = _axis(i - 5).Labels.Color
|
||||
'End Select
|
||||
' FastLine(i).LinePen.Color = Color.FromArgb(12, 12, 12, 12) '颜色
|
||||
' FastLine(i).ColorEach = False '各点之间颜色不一
|
||||
Next
|
||||
End Sub
|
||||
Private Sub InitCursor()
|
||||
ChartBar.Tools.Clear()
|
||||
For i = 0 To _curSor.Length - 1
|
||||
_curSor(i) = New Steema.TeeChart.Tools.CursorTool
|
||||
ChartBar.Tools.Add(_curSor(i))
|
||||
_curSor(i).Style = Steema.TeeChart.Tools.CursorToolStyles.Vertical
|
||||
_curSor(i).OriginalCursor = System.Windows.Forms.Cursors.Default
|
||||
_curSor(i).Pen.Style = System.Drawing.Drawing2D.DashStyle.Dot
|
||||
_curSor(i).Pen.Width = 2
|
||||
_curSor(i).Tag = i
|
||||
_curSor(i).Active = True
|
||||
_curSor(i).FollowMouse = False
|
||||
AddHandler _curSor(i).Change, AddressOf CursorChange
|
||||
Select Case i
|
||||
Case 0
|
||||
_curSor(i).Pen.Color = System.Drawing.Color.Orange
|
||||
Case 1
|
||||
_curSor(i).Pen.Color = System.Drawing.Color.Lime
|
||||
Case 2
|
||||
_curSor(i).Pen.Color = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(255, Byte), Integer))
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' 光标位置改变触发事件
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
Private Sub CursorChange(sender As Object, e As Steema.TeeChart.Tools.CursorChangeEventArgs)
|
||||
Dim index As Integer = sender.tag
|
||||
CursorChangeDataDisplay(index)
|
||||
End Sub
|
||||
''' <summary>
|
||||
''' 光标移动显示数据
|
||||
''' </summary>
|
||||
''' <param name="index">当前移动的是第几个光标</param>
|
||||
Private Sub CursorChangeDataDisplay(index As Integer)
|
||||
|
||||
Dim X1 As Double = 0
|
||||
Dim X2 As Double = 0
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1900, 1, 1), TimeSpan.Zero)
|
||||
|
||||
' 获取本地日期和时间
|
||||
Dim yt As DateTime
|
||||
Dim ts As TimeSpan
|
||||
Select Case index
|
||||
Case 0
|
||||
X1 = _curSor(index).XValue.ToString("#0.0000")
|
||||
|
||||
'yt.too
|
||||
yt = DateTime.FromOADate(X1)
|
||||
'Console.WriteLine($"CursorChangeDataDisplay:X1 {X1}:{yt.ToString("yyyy-MM-dd HH:mm:ss")}")
|
||||
'yt = (dtOffset + TimeSpan.FromDays(X1)).LocalDateTime
|
||||
yt = yt + TimeSpan.FromHours(8)
|
||||
labY1.Text = yt.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
ts = New TimeSpan(yt.Ticks)
|
||||
labY1.Tag = ts.TotalSeconds
|
||||
Case 1
|
||||
X2 = _curSor(index).XValue.ToString("#0.0000")
|
||||
yt = DateTime.FromOADate(X2)
|
||||
|
||||
yt = yt + TimeSpan.FromHours(8)
|
||||
labY2.Text = yt.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
'Console.WriteLine($"CursorChangeDataDisplay:X2 {X2}:{yt.ToString("yyyy-MM-dd HH:mm:ss")}")
|
||||
ts = New TimeSpan(yt.Ticks)
|
||||
labY2.Tag = ts.TotalSeconds
|
||||
End Select
|
||||
Double.TryParse(labY1.Tag, X1)
|
||||
Double.TryParse(labY2.Tag, X2)
|
||||
|
||||
|
||||
Dim couinm As Double = X2 - X1
|
||||
lab1_2.Text = ""
|
||||
If couinm < 0 Then
|
||||
lab1_2.Text = " - "
|
||||
End If
|
||||
';'Console.WriteLine($"CursorChangeDataDisplay:{ _curSor(index).XValue.ToString("#0.00")}|{_curSor(index).XValue.ToString("#0.00")}|{couinm}")
|
||||
Dim timeval As TimeSpan = TimeSpan.FromSeconds(Math.Abs(couinm))
|
||||
' 'Console.WriteLine(couinm)
|
||||
If timeval.Days > 0 Then
|
||||
lab1_2.Text = $"{ lab1_2.Text}{timeval.Days }天 "
|
||||
End If
|
||||
lab1_2.Text = $"{ lab1_2.Text}{timeval.Hours }:{timeval.Minutes }:{timeval.Seconds }"
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private _curTool As Steema.TeeChart.Tools.CursorTool
|
||||
Private Sub ChartBar_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles ChartBar.MouseDoubleClick
|
||||
If e.Button = MouseButtons.Middle Then
|
||||
ChartBar.Zoom.Undo()
|
||||
ElseIf e.Button = MouseButtons.Left Then
|
||||
Dim idx As Integer
|
||||
Dim row As Integer
|
||||
|
||||
If _curTool Is Nothing Then
|
||||
idx = 0
|
||||
_curTool = _curSor(idx)
|
||||
_curTool.FollowMouse = True
|
||||
'row = _rowChart.Cursor + idx * (EnCursor.Width + 2) + 1 + EnCursor.FollowMouse + 1
|
||||
'GrdChartInfo.Cell(row, EnGridCol.Value).Text = $"1"
|
||||
|
||||
Else
|
||||
If _curTool.FollowMouse = False Then
|
||||
idx = _curTool.Tag
|
||||
' row = _rowChart.Cursor + idx * (EnCursor.Width + 2) + 1 + EnCursor.FollowMouse + 1
|
||||
'_isUserChange = False
|
||||
_curTool.FollowMouse = False
|
||||
'GrdChartInfo.Cell(row, EnGridCol.Value).Text = $"0"
|
||||
|
||||
idx += 1
|
||||
If idx >= _curSor.Length Then
|
||||
idx = 0
|
||||
_curTool = _curSor(idx)
|
||||
_curTool.FollowMouse = True
|
||||
Else
|
||||
_curTool = _curSor(idx)
|
||||
_curTool.FollowMouse = True
|
||||
' row = _rowChart.Cursor + idx * (EnCursor.Width + 2) + 1 + EnCursor.FollowMouse + 1
|
||||
'GrdChartInfo.Cell(row, EnGridCol.Value).Text = $"1"
|
||||
End If
|
||||
|
||||
|
||||
'_isUserChange = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ChartBar_MouseClick(sender As Object, e As MouseEventArgs) Handles ChartBar.MouseClick
|
||||
If e.Button = MouseButtons.Middle Then
|
||||
|
||||
ChartBar.Zoom.Undo()
|
||||
ElseIf e.Button = MouseButtons.Right Then
|
||||
If IsNothing(_curTool) Then Return
|
||||
_curTool.FollowMouse = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub FastLine1_Click(sender As Object, e As MouseEventArgs)
|
||||
Dim fl As Styles.FastLine = sender
|
||||
|
||||
|
||||
|
||||
|
||||
For Each node In _fastLine
|
||||
If node.Value.Title.Equals(fl.Title) Then
|
||||
fl = node.Value
|
||||
Dim x1 As Double = 0
|
||||
labdevanme.Text = fl.Title
|
||||
''Console.WriteLine($"{e.X} {fl.YValues.Value(e.X).ToString("#0.0.")} {e.Y} {fl.YValues.Value(e.Y).ToString("#0.00")}")
|
||||
Dim intcv As Integer = CInt(Math.Round(ChartBar.Series(0).YScreenToValue(e.Y)))
|
||||
labval.Text = intcv.ToString
|
||||
|
||||
|
||||
'Console.WriteLine(fl.XValues.Value.Length)
|
||||
x1 = ChartBar.Series(0).XScreenToValue(e.X)
|
||||
Dim stra As String = fl.XValues.AsDateTime(e.X)
|
||||
|
||||
|
||||
Dim dtOffset As New DateTimeOffset(New DateTime(1970, 1, 1), TimeSpan.Zero)
|
||||
' 获取本地日期和时间
|
||||
Dim yt As DateTime
|
||||
yt = DateTime.FromOADate(x1)
|
||||
yt = yt + TimeSpan.FromHours(8)
|
||||
'Console.WriteLine($"FastLine1_Click:{x1}:{ yt.ToString("yyyy-MM-dd HH:mm:ss")}")
|
||||
labDate.Text = yt.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
8
MssqlCmdHelper.vb
Normal file
8
MssqlCmdHelper.vb
Normal file
@@ -0,0 +1,8 @@
|
||||
Public Class MssqlCmdHelper
|
||||
Inherits DbCmdHelper
|
||||
|
||||
Sub New()
|
||||
FiledSuffix = "["c
|
||||
FiledPrefix = "]"c
|
||||
End Sub
|
||||
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.DataPresentationManager.Form1
|
||||
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("DataPresentationManager")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("DataPresentationManager")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("bbb82722-9bae-4ca6-8f10-8da5c8a591c1")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
72
My Project/Resources.Designer.vb
generated
Normal file
72
My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,72 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.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>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</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("DataPresentationManager.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 查找类似 的本地化字符串。
|
||||
'''</summary>
|
||||
Friend ReadOnly Property panlleft() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("panlleft", resourceCulture)
|
||||
End Get
|
||||
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>
|
||||
73
My Project/Settings.Designer.vb
generated
Normal file
73
My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <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
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.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 Auto-Save Functionality"
|
||||
#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(ByVal sender As Global.System.Object, ByVal 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
|
||||
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.DataPresentationManager.My.MySettings
|
||||
Get
|
||||
Return Global.DataPresentationManager.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
7
My Project/Settings.settings
Normal file
7
My Project/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
9
MysqlCmdHelper.vb
Normal file
9
MysqlCmdHelper.vb
Normal file
@@ -0,0 +1,9 @@
|
||||
Public Class MysqlCmdHelper
|
||||
Inherits DbCmdHelper
|
||||
|
||||
Sub New()
|
||||
FiledSuffix = "`"c
|
||||
FiledPrefix = "`"c
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
11
MysqlDataDispose.vb
Normal file
11
MysqlDataDispose.vb
Normal file
@@ -0,0 +1,11 @@
|
||||
Public Class MysqlDataDispose
|
||||
|
||||
Sub New()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
220
MysqlDataParam.vb
Normal file
220
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
|
||||
19
SqliteCmdHelper.vb
Normal file
19
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
SqliteDataParam.vb
Normal file
105
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
|
||||
BIN
bin/DataPresentationManager.rar
Normal file
BIN
bin/DataPresentationManager.rar
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.1.rar
Normal file
BIN
bin/DataPresentationManager_1.1.rar
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2.rar
Normal file
BIN
bin/DataPresentationManager_1.2.rar
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/BouncyCastle.Cryptography.dll
Normal file
BIN
bin/DataPresentationManager_1.2/BouncyCastle.Cryptography.dll
Normal file
Binary file not shown.
29053
bin/DataPresentationManager_1.2/BouncyCastle.Cryptography.xml
Normal file
29053
bin/DataPresentationManager_1.2/BouncyCastle.Cryptography.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/DataPresentationManager.exe
Normal file
BIN
bin/DataPresentationManager_1.2/DataPresentationManager.exe
Normal file
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
BIN
bin/DataPresentationManager_1.2/DataPresentationManager.pdb
Normal file
BIN
bin/DataPresentationManager_1.2/DataPresentationManager.pdb
Normal file
Binary file not shown.
1209
bin/DataPresentationManager_1.2/DataPresentationManager.xml
Normal file
1209
bin/DataPresentationManager_1.2/DataPresentationManager.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/FlexCell.dll
Normal file
BIN
bin/DataPresentationManager_1.2/FlexCell.dll
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/Google.Protobuf.dll
Normal file
BIN
bin/DataPresentationManager_1.2/Google.Protobuf.dll
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/Google.Protobuf.pdb
Normal file
BIN
bin/DataPresentationManager_1.2/Google.Protobuf.pdb
Normal file
Binary file not shown.
10465
bin/DataPresentationManager_1.2/Google.Protobuf.xml
Normal file
10465
bin/DataPresentationManager_1.2/Google.Protobuf.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.Streams.dll
Normal file
BIN
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.Streams.dll
Normal file
Binary file not shown.
1630
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.Streams.xml
Normal file
1630
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.Streams.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.dll
Normal file
BIN
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.dll
Normal file
Binary file not shown.
1211
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.xml
Normal file
1211
bin/DataPresentationManager_1.2/K4os.Compression.LZ4.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/K4os.Hash.xxHash.dll
Normal file
BIN
bin/DataPresentationManager_1.2/K4os.Hash.xxHash.dll
Normal file
Binary file not shown.
245
bin/DataPresentationManager_1.2/K4os.Hash.xxHash.xml
Normal file
245
bin/DataPresentationManager_1.2/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>
|
||||
Binary file not shown.
@@ -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/DataPresentationManager_1.2/MySql.Data.dll
Normal file
BIN
bin/DataPresentationManager_1.2/MySql.Data.dll
Normal file
Binary file not shown.
18611
bin/DataPresentationManager_1.2/MySql.Data.xml
Normal file
18611
bin/DataPresentationManager_1.2/MySql.Data.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/System.Buffers.dll
Normal file
BIN
bin/DataPresentationManager_1.2/System.Buffers.dll
Normal file
Binary file not shown.
38
bin/DataPresentationManager_1.2/System.Buffers.xml
Normal file
38
bin/DataPresentationManager_1.2/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>
|
||||
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/System.Data.SQLite.dll
Normal file
BIN
bin/DataPresentationManager_1.2/System.Data.SQLite.dll
Normal file
Binary file not shown.
21774
bin/DataPresentationManager_1.2/System.Data.SQLite.xml
Normal file
21774
bin/DataPresentationManager_1.2/System.Data.SQLite.xml
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
bin/DataPresentationManager_1.2/System.IO.Pipelines.dll
Normal file
BIN
bin/DataPresentationManager_1.2/System.IO.Pipelines.dll
Normal file
Binary file not shown.
341
bin/DataPresentationManager_1.2/System.IO.Pipelines.xml
Normal file
341
bin/DataPresentationManager_1.2/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/DataPresentationManager_1.2/System.Memory.dll
Normal file
BIN
bin/DataPresentationManager_1.2/System.Memory.dll
Normal file
Binary file not shown.
355
bin/DataPresentationManager_1.2/System.Memory.xml
Normal file
355
bin/DataPresentationManager_1.2/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/DataPresentationManager_1.2/System.Numerics.Vectors.dll
Normal file
BIN
bin/DataPresentationManager_1.2/System.Numerics.Vectors.dll
Normal file
Binary file not shown.
2621
bin/DataPresentationManager_1.2/System.Numerics.Vectors.xml
Normal file
2621
bin/DataPresentationManager_1.2/System.Numerics.Vectors.xml
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -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>
|
||||
Binary file not shown.
@@ -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/DataPresentationManager_1.2/TeeChart.dll
Normal file
BIN
bin/DataPresentationManager_1.2/TeeChart.dll
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/ZstdSharp.dll
Normal file
BIN
bin/DataPresentationManager_1.2/ZstdSharp.dll
Normal file
Binary file not shown.
BIN
bin/DataPresentationManager_1.2/config.flx
Normal file
BIN
bin/DataPresentationManager_1.2/config.flx
Normal file
Binary file not shown.
BIN
bin/Debug/BouncyCastle.Cryptography.dll
Normal file
BIN
bin/Debug/BouncyCastle.Cryptography.dll
Normal file
Binary file not shown.
29053
bin/Debug/BouncyCastle.Cryptography.xml
Normal file
29053
bin/Debug/BouncyCastle.Cryptography.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/DataPresentationManager.exe
Normal file
BIN
bin/Debug/DataPresentationManager.exe
Normal file
Binary file not shown.
18
bin/Debug/DataPresentationManager.exe.config
Normal file
18
bin/Debug/DataPresentationManager.exe.config
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
BIN
bin/Debug/DataPresentationManager.pdb
Normal file
BIN
bin/Debug/DataPresentationManager.pdb
Normal file
Binary file not shown.
1209
bin/Debug/DataPresentationManager.xml
Normal file
1209
bin/Debug/DataPresentationManager.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.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user