-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add platform property fix assignment error * add bench, add methods to safehandle * replace c interface uses of size_t with uint64_t * clean up uses of long in c# classes * fix a few missed size_t * missed another one * explicitly state calling convention for native api's * fix compiler warnings * add a targets file and explicitly place package output * do not error on old style cast * fix typo
- Loading branch information
1 parent
a29c8b4
commit e9803d0
Showing
30 changed files
with
1,338 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
bindings/netstandard/ElectionGuard/ElectionGuard.Encryption.Bench/BenchManifest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Diagnostics; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace ElectionGuard.Encryption.Bench | ||
{ | ||
class BenchManifest | ||
{ | ||
public static bool Bench_Can_Construct_Internationalized_Text() | ||
{ | ||
Stopwatch sw = new Stopwatch(); | ||
sw.Start(); | ||
// Arrange | ||
var language_1 = new Language("some words", "en"); | ||
var language_2 = new Language("algunas palabras", "es"); | ||
var languages = new[] { language_1, language_2 }; | ||
|
||
// Act | ||
var subject = new InternationalizedText(languages); | ||
|
||
// Assert | ||
var actual = subject.GetTextAt(0); | ||
Console.WriteLine($"actual.Value: {actual.Value}"); | ||
sw.Stop(); | ||
Console.WriteLine("Elapsed={0}", sw.Elapsed); | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.