Add base class for request parameter classes

This commit is contained in:
Haacked
2013-10-27 18:10:45 -07:00
parent 884efef814
commit 5cee6501db
8 changed files with 287 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
using System;
namespace Octokit
{
internal static class ReflectionExtensions
{
public static bool IsDateTimeOffset(this Type type)
{
return type == typeof(DateTimeOffset) || type == typeof(DateTimeOffset?);
}
public static bool IsNullable(this Type type)
{
return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>);
}
}
}