Browse Source

test

tags/v1.0.0
yitter 3 years ago
parent
commit
abea1071ee
2 changed files with 7 additions and 4 deletions
  1. +6
    -4
      C#.NET/source/Yitter.IdGenTest/Program.cs
  2. +1
    -0
      C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj

+ 6
- 4
C#.NET/source/Yitter.IdGenTest/Program.cs View File

@@ -55,8 +55,8 @@ namespace Yitter.OrgSystem.TestA
while (true)
{
RunSingle();
//CallDll();
//RunSingle();
CallDll();
//Go(options);
Thread.Sleep(1000); // 每隔1秒执行一次Go
}
@@ -65,7 +65,10 @@ namespace Yitter.OrgSystem.TestA
//[DllImport("yitidgenc.dll", CallingConvention = CallingConvention.StdCall)]
//public static extern long NextId();
[DllImport("yitidgengo.dll", CallingConvention = CallingConvention.StdCall)]
[DllImport("yitidgengo.dll", EntryPoint = "NextId", CallingConvention = CallingConvention.StdCall)]
public static extern long NextId2();
[DllImport("yitidgengo.so", EntryPoint = "NextId", CallingConvention = CallingConvention.StdCall)]
public static extern long NextId();
[DllImport("yitidgen.dll", CallingConvention = CallingConvention.StdCall)]
@@ -78,7 +81,6 @@ namespace Yitter.OrgSystem.TestA
{
try
{
int i = 0;
long id = 0;
DateTime start = DateTime.Now;


+ 1
- 0
C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj View File

@@ -10,6 +10,7 @@
<Version>1.0.2</Version>
<PackageProjectUrl>https://gitee.com/yitter/idgenerator</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<StartupObject>Yitter.OrgSystem.TestA.Program</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">


Loading…
Cancel
Save