This repository has been archived by the owner on Apr 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from mdsol/develop
Release of 3.2.0
- Loading branch information
Showing
23 changed files
with
1,083 additions
and
251 deletions.
There are no files selected for viewing
Binary file not shown.
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
394 changes: 329 additions & 65 deletions
394
src/Medidata.ZipkinTracer.Core/App_Packages/LibLog.4.2/LibLog.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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,41 @@ | ||
using System; | ||
using System.Globalization; | ||
|
||
namespace Medidata.ZipkinTracer.Core.Helpers | ||
{ | ||
internal static class ParserHelper | ||
{ | ||
/// <summary> | ||
/// Checks if string value can be converted to 128bit (Guid) or 64bit (long) | ||
/// </summary> | ||
/// <param name="value"></param> | ||
/// <returns></returns> | ||
internal static bool IsParsableTo128Or64Bit(this string value) | ||
{ | ||
if (value.IsParsableToGuid()) return true; | ||
return value.IsParsableToLong(); | ||
} | ||
|
||
/// <summary> | ||
/// Checks if hex string value is parsable to Guid | ||
/// </summary> | ||
/// <param name="value"></param> | ||
/// <returns></returns> | ||
internal static bool IsParsableToGuid(this string value) | ||
{ | ||
Guid result; | ||
return Guid.TryParseExact(value, "N", out result); | ||
} | ||
|
||
/// <summary> | ||
/// Checks if hex string value is parsable to long | ||
/// </summary> | ||
/// <param name="value"></param> | ||
/// <returns></returns> | ||
internal static bool IsParsableToLong(this string value) | ||
{ | ||
long result; | ||
return !string.IsNullOrWhiteSpace(value) && long.TryParse(value, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out result); | ||
} | ||
} | ||
} |
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
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
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
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
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
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
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
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.