Skip to content

Commit e51e272

Browse files
authored
Merge pull request #77 from maikebing/main
支持.Net 4.6.1 和 .Net Standard 2.0
2 parents 1241fde + 732679d commit e51e272

File tree

10 files changed

+196
-358
lines changed

10 files changed

+196
-358
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,17 @@ This is the C# client of Apache IoTDB.
3131
Apache IoTDB website: https://iotdb.apache.org
3232
Apache IoTDB Github: https://github.com/apache/iotdb
3333

34-
## Starting from `.net framework 4.x`
35-
In order to adapt to `.net framework 4.x`, we have packaged a nuget package separately, the package name is [`Apache.IoTDB.framework`](https://www.nuget.org/packages/Apache.IoTDB.framework/).
36-
37-
You can install it through Package Manager (PM), .NET CLI, etc. For example (.NET CLI):
38-
39-
```sh
40-
dotnet add package Apache.IoTDB.framework --version 0.12.1.2
41-
```
42-
4334
## Installation
4435

4536
### Install from NuGet Package
4637

47-
We have prepared Nuget Package for C# users who are using `.net 5.0` or higher version. Users can directly install the client through .NET CLI. [The link of our NuGet Package is here](https://www.nuget.org/packages/Apache.IoTDB/). Run the following command in the command line to complete installation
38+
We have prepared Nuget Package for C# users. Users can directly install the client through .NET CLI. [The link of our NuGet Package is here](https://www.nuget.org/packages/Apache.IoTDB/). Run the following command in the command line to complete installation
4839

4940
```sh
5041
dotnet add package Apache.IoTDB
5142
```
5243

53-
Note that the `Apache.IoTDB` package only supports `.net 5.0` or higher version. If you are using `.net framework 4.x`, please refer to the section [starting from .net framework 4.x](#starting-from-net-framework-4x).
44+
Note that the `Apache.IoTDB` package only supports `.net 5.0`. If you are using `.net framework 4.x`, please refer to the section [starting from .net framework 4.x](#starting-from-net-framework-4x).
5445

5546
## Prerequisites
5647

@@ -76,4 +67,13 @@ NLog >= 4.7.9
7667
### Command Line Tools
7768

7869
## Publish your own client on nuget.org
79-
You can find out how to publish from this [doc](./PUBLISH.md).
70+
You can find out how to publish from this [doc](./PUBLISH.md).
71+
72+
## Starting from `.net framework 4.x`
73+
In order to adapt to `.net framework 4.x`, we have packaged a nuget package separately, the package name is [`Apache.IoTDB.framework`](https://www.nuget.org/packages/Apache.IoTDB.framework/).
74+
75+
You can install it through Package Manager (PM), .NET CLI, etc. For example (.NET CLI):
76+
77+
```sh
78+
dotnet add package Apache.IoTDB.framework --version 0.12.1.2
79+
```

src/Apache.IoTDB.Data/Apache - Backup (1).IoTDB.Data.csproj

Lines changed: 0 additions & 160 deletions
This file was deleted.

src/Apache.IoTDB.Data/Apache - Backup.IoTDB.Data.csproj

Lines changed: 0 additions & 162 deletions
This file was deleted.

src/Apache.IoTDB.Data/Apache.IoTDB.Data.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
Apache.IoTDB.Data.IoTDBParameter
1717
Apache.IoTDB.Data.IoTDBTransaction
1818
</Description>
19-
<TargetFrameworks>net5;net6;netstandard2.1</TargetFrameworks>
19+
<TargetFrameworks>net5.0;net6.0;netstandard2.1;netstandard2.0;net461</TargetFrameworks>
2020
<LangVersion>10</LangVersion>
2121
<PackageReleaseNotes>Apache.IoTDB.Data 是一个TDengine 的ADO.Net 提供器。 这将允许你通过.Net 访问IoTDB数据库。 </PackageReleaseNotes>
2222
</PropertyGroup>

src/Apache.IoTDB.Data/IoTDBConnection.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,11 @@ public override void Close()
188188
{
189189
CloseAsync().GetAwaiter().GetResult(); ;
190190
}
191+
#if NET461_OR_GREATER || NETSTANDARD2_0
192+
public async Task CloseAsync()
193+
#else
191194
public override async Task CloseAsync()
195+
#endif
192196
{
193197
if (State != ConnectionState.Closed)
194198
await _IoTDB.Close();

0 commit comments

Comments
 (0)