mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
Add base class for request parameter classes
This commit is contained in:
@@ -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<>);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user