Initial Commit
This commit is contained in:
parent
53eb92e9af
commit
270ab7d11f
15341 changed files with 700234 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
|
||||
namespace MLAPI.Reflection
|
||||
{
|
||||
internal static class TypeExtensions
|
||||
{
|
||||
internal static bool HasInterface(this Type type, Type interfaceType)
|
||||
{
|
||||
var ifaces = type.GetInterfaces();
|
||||
for (int i = 0; i < ifaces.Length; i++)
|
||||
{
|
||||
if (ifaces[i] == interfaceType) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool IsNullable(this Type type)
|
||||
{
|
||||
if (!type.IsValueType) return true; // ref-type
|
||||
return Nullable.GetUnderlyingType(type) != null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3e168a2bc1a1e2642af0369780fb560c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue