Skip to content

Commit ec87132

Browse files
committed
release130.19
1 parent 2cf4ea8 commit ec87132

File tree

79 files changed

+7605
-2013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+7605
-2013
lines changed

README_CN.md

Lines changed: 642 additions & 66 deletions
Large diffs are not rendered by default.

dolphindb_csharpapi_net_core.csproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
6+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
7+
<AssemblyName>dolphindb_csharpapi</AssemblyName>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<Compile Remove="test\**" />
12+
<EmbeddedResource Remove="test\**" />
13+
<None Remove="test\**" />
14+
</ItemGroup>
15+
16+
</Project>

dolphindb_csharpapi_net_core.sln

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.1.32210.238
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dolphindb_csharpapi_net_core", "dolphindb_csharpapi_net_core.csproj", "{5233ED95-F919-4FA3-8BD9-193E066A8F27}"
7+
EndProject
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dolphindb_csharpapi_net_core_test", "test\dolphindb_csharpapi_net_core_test.csproj", "{6D88F097-9FEC-4636-BBA6-A3E59DB0BB7E}"
9+
ProjectSection(ProjectDependencies) = postProject
10+
{5233ED95-F919-4FA3-8BD9-193E066A8F27} = {5233ED95-F919-4FA3-8BD9-193E066A8F27}
11+
EndProjectSection
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|Any CPU = Debug|Any CPU
16+
Release|Any CPU = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{5233ED95-F919-4FA3-8BD9-193E066A8F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{5233ED95-F919-4FA3-8BD9-193E066A8F27}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{5233ED95-F919-4FA3-8BD9-193E066A8F27}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{5233ED95-F919-4FA3-8BD9-193E066A8F27}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{6D88F097-9FEC-4636-BBA6-A3E59DB0BB7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{6D88F097-9FEC-4636-BBA6-A3E59DB0BB7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{6D88F097-9FEC-4636-BBA6-A3E59DB0BB7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{6D88F097-9FEC-4636-BBA6-A3E59DB0BB7E}.Release|Any CPU.Build.0 = Release|Any CPU
27+
EndGlobalSection
28+
GlobalSection(SolutionProperties) = preSolution
29+
HideSolutionNode = FALSE
30+
EndGlobalSection
31+
GlobalSection(ExtensibilityGlobals) = postSolution
32+
SolutionGuid = {FB1A5801-604F-4CB4-B4AB-ED370B77C83F}
33+
EndGlobalSection
34+
EndGlobal

examples/StreamingData.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ public void doEvent(IMessage msg)
112112
double price = ((BasicDouble)msg.getEntity(4)).getValue();
113113
Console.WriteLine("price:" + price + " \n");
114114
}
115+
116+
void MessageHandler.batchHandler(List<IMessage> msgs)
117+
{
118+
throw new NotImplementedException();
119+
}
115120
}
116121

117122
public void ThreadedClient()

src/BasicDBTask.cs

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,25 @@ public class BasicDBTask:IDBTask
2020
private List<IEntity> args;
2121
private DBConnection conn;
2222
private WaitHandle waitHandle = new AutoResetEvent(false);
23+
private Semaphore semaphore = new Semaphore(1,1);
2324

24-
public WaitHandle WaitFor()
25+
public void waitFor()
2526
{
26-
return waitHandle;
27+
semaphore.WaitOne();
2728
}
28-
public void Finish()
29+
public void finish()
2930
{
30-
((AutoResetEvent)waitHandle).Set();
31+
semaphore.Release();
3132
}
3233
public BasicDBTask(string script, List<IEntity> args)
3334
{
35+
semaphore.WaitOne();
3436
this.script = script;
3537
this.args = args;
3638
}
3739
public BasicDBTask(string script)
3840
{
41+
semaphore.WaitOne();
3942
this.script = script;
4043
}
4144
public IEntity call()
@@ -74,5 +77,17 @@ public bool isSuccessful()
7477
{
7578
return successful;
7679
}
80+
81+
public bool isFinished()
82+
{
83+
if(successful || errMsg != null)
84+
{
85+
return true;
86+
}
87+
else
88+
{
89+
return false;
90+
}
91+
}
7792
}
7893
}

0 commit comments

Comments
 (0)