mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-10-21 01:28:19 -05:00
GenericInvokeCallFactory.Create to CreateAction
This commit is contained in:
@@ -43,7 +43,7 @@ namespace UniJSON
|
||||
");
|
||||
|
||||
// CreateWithThis
|
||||
w.WriteLine("//////////// Create");
|
||||
w.WriteLine("//////////// CreateAction");
|
||||
|
||||
// Create
|
||||
for (int i = 1; i <= ARGS && i< NET35MAX; ++i)
|
||||
@@ -54,7 +54,7 @@ namespace UniJSON
|
||||
|
||||
|
||||
var source = @"
|
||||
public static Action<S, $0> Create<S, $0>(MethodInfo m)
|
||||
public static Action<S, $0> CreateAction<S, $0>(MethodInfo m)
|
||||
{
|
||||
Action<S, $0> callback = null;
|
||||
if (m.IsStatic)
|
||||
@@ -88,7 +88,7 @@ namespace UniJSON
|
||||
var a = String.Join(", ", GetArgs("a", i).ToArray());
|
||||
|
||||
var source = @"
|
||||
public static Action<$0> CreateWithThis<S, $0>(MethodInfo m, S instance)
|
||||
public static Action<$0> CreateActionBindThis<S, $0>(MethodInfo m, S instance)
|
||||
{
|
||||
if (m.IsStatic)
|
||||
{
|
||||
@@ -130,8 +130,8 @@ namespace UniJSON
|
||||
}
|
||||
#endif
|
||||
|
||||
#region no arguments
|
||||
public static Action<S> Create<S>(MethodInfo m)
|
||||
#region zero arguments
|
||||
public static Action<S> CreateAction<S>(MethodInfo m)
|
||||
{
|
||||
return (s) =>
|
||||
{
|
||||
@@ -139,7 +139,15 @@ namespace UniJSON
|
||||
};
|
||||
}
|
||||
|
||||
public static Action CreateWithThis<S>(MethodInfo m, S instance)
|
||||
public static Func<S, T> CreateFunc<S, T>(MethodInfo m)
|
||||
{
|
||||
return (s) =>
|
||||
{
|
||||
return (T)m.Invoke(s, new object[] { });
|
||||
};
|
||||
}
|
||||
|
||||
public static Action CreateActionBindThis<S>(MethodInfo m, S instance)
|
||||
{
|
||||
return () =>
|
||||
{
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace UniJSON
|
||||
public static partial class GenericInvokeCallFactory
|
||||
{
|
||||
|
||||
//////////// Create
|
||||
//////////// CreateAction
|
||||
|
||||
public static Action<S, A0> Create<S, A0>(MethodInfo m)
|
||||
public static Action<S, A0> CreateAction<S, A0>(MethodInfo m)
|
||||
{
|
||||
Action<S, A0> callback = null;
|
||||
if (m.IsStatic)
|
||||
@@ -31,7 +31,7 @@ namespace UniJSON
|
||||
}
|
||||
|
||||
|
||||
public static Action<S, A0, A1> Create<S, A0, A1>(MethodInfo m)
|
||||
public static Action<S, A0, A1> CreateAction<S, A0, A1>(MethodInfo m)
|
||||
{
|
||||
Action<S, A0, A1> callback = null;
|
||||
if (m.IsStatic)
|
||||
@@ -52,7 +52,7 @@ namespace UniJSON
|
||||
}
|
||||
|
||||
|
||||
public static Action<S, A0, A1, A2> Create<S, A0, A1, A2>(MethodInfo m)
|
||||
public static Action<S, A0, A1, A2> CreateAction<S, A0, A1, A2>(MethodInfo m)
|
||||
{
|
||||
Action<S, A0, A1, A2> callback = null;
|
||||
if (m.IsStatic)
|
||||
@@ -74,7 +74,7 @@ namespace UniJSON
|
||||
|
||||
//////////// CreateWithThis
|
||||
|
||||
public static Action<A0> CreateWithThis<S, A0>(MethodInfo m, S instance)
|
||||
public static Action<A0> CreateActionBindThis<S, A0>(MethodInfo m, S instance)
|
||||
{
|
||||
if (m.IsStatic)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace UniJSON
|
||||
}
|
||||
|
||||
|
||||
public static Action<A0, A1> CreateWithThis<S, A0, A1>(MethodInfo m, S instance)
|
||||
public static Action<A0, A1> CreateActionBindThis<S, A0, A1>(MethodInfo m, S instance)
|
||||
{
|
||||
if (m.IsStatic)
|
||||
{
|
||||
@@ -126,7 +126,7 @@ namespace UniJSON
|
||||
}
|
||||
|
||||
|
||||
public static Action<A0, A1, A2> CreateWithThis<S, A0, A1, A2>(MethodInfo m, S instance)
|
||||
public static Action<A0, A1, A2> CreateActionBindThis<S, A0, A1, A2>(MethodInfo m, S instance)
|
||||
{
|
||||
if (m.IsStatic)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ namespace UniJSON
|
||||
}
|
||||
|
||||
|
||||
public static Action<A0, A1, A2, A3> CreateWithThis<S, A0, A1, A2, A3>(MethodInfo m, S instance)
|
||||
public static Action<A0, A1, A2, A3> CreateActionBindThis<S, A0, A1, A2, A3>(MethodInfo m, S instance)
|
||||
{
|
||||
if (m.IsStatic)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user