Skip to content

Commit

Permalink
instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky committed Apr 12, 2021
1 parent 539a96b commit 0f5a03b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,21 @@ private static Version GetICUVersion()
int version = 0;
try
{
Console.WriteLine("INSTR: grabbing ICU version");
Type interopGlobalization = Type.GetType("Interop+Globalization");
if (interopGlobalization != null)
{
Console.WriteLine("INSTR: grabbing method info");
MethodInfo methodInfo = interopGlobalization.GetMethod("GetICUVersion", BindingFlags.NonPublic | BindingFlags.Static);
if (methodInfo != null)
{
Console.WriteLine("INSTR: got method");
version = (int)methodInfo.Invoke(null, null);
}
}
Console.WriteLine("Grabbed version {0}", version);
}
catch { }
catch (Exception ex) { Console.WriteLine(ex); }

return new Version(version >> 24,
(version >> 16) & 0xFF,
Expand Down

0 comments on commit 0f5a03b

Please sign in to comment.