From abea1071ee55c10471d602457a752fb5fca4cd85 Mon Sep 17 00:00:00 2001 From: yitter Date: Sat, 3 Apr 2021 18:22:19 +0800 Subject: [PATCH] test --- C#.NET/source/Yitter.IdGenTest/Program.cs | 10 ++++++---- C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/C#.NET/source/Yitter.IdGenTest/Program.cs b/C#.NET/source/Yitter.IdGenTest/Program.cs index 42e9d69..73e5905 100644 --- a/C#.NET/source/Yitter.IdGenTest/Program.cs +++ b/C#.NET/source/Yitter.IdGenTest/Program.cs @@ -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; diff --git a/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj b/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj index 9ce00e5..409f0d3 100644 --- a/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj +++ b/C#.NET/source/Yitter.IdGenTest/Yitter.IdGenTest.csproj @@ -10,6 +10,7 @@ 1.0.2 https://gitee.com/yitter/idgenerator MIT + Yitter.OrgSystem.TestA.Program