Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
667 B
C#
Raw Permalink Normal View History

2016-02-24 13:25:05 -08:00
using System;
namespace API.Test
{
public static class Utils
{
public static void ThrowStringArgException(string value, string paramName)
{
if (string.IsNullOrEmpty(paramName))
{
throw new ArgumentException("string cannot be null or empty", nameof(paramName));
}
if (string.IsNullOrEmpty(value))
{
throw new ArgumentException("string cannot be null or empty", paramName);
}
}
public static string GetNewGUID()
{
return Guid.NewGuid().ToString("d").Substring(0, 4).Replace("-", "");
}
}
}