53 lines
1.6 KiB
Plaintext
53 lines
1.6 KiB
Plaintext
// <auto-generated/>
|
|
using System.Collections.Generic;
|
|
using System.Reflection;
|
|
using mROA.Abstract;
|
|
using mROA.Implementation;
|
|
using System;
|
|
using System.Threading;
|
|
|
|
namespace mROA.Codegen
|
|
{
|
|
public class CoCodegenMethodRepository : IMethodRepository
|
|
{
|
|
private readonly List<IMethodInvoker> _methods = new () {
|
|
<!I invoker r sep invokerSep><!D invokerSep>,
|
|
<!D>
|
|
<!T asyncInvoker>
|
|
new mROA.Implementation.AsyncMethodInvoker
|
|
{
|
|
IsVoid = <!L isVoid>,
|
|
IsTrusted = <!L isTrusted>,
|
|
ReturnType = typeof(<!L returnType>),
|
|
ParameterTypes = new Type[] { <!L parametersType> },
|
|
SuitableType = typeof(<!L suitableType>),
|
|
Invoking = (i, parameters, special, post) => <!L funcInvoking>,
|
|
}<!T>
|
|
<!T syncInvoker>
|
|
new mROA.Implementation.MethodInvoker
|
|
{
|
|
IsVoid = <!L isVoid>,
|
|
IsTrusted = <!L isTrusted>,
|
|
ReturnType = typeof(<!L returnType>),
|
|
ParameterTypes = new Type[] { <!L parametersType> },
|
|
SuitableType = typeof(<!L suitableType>),
|
|
Invoking = (i, parameters, special) => <!L funcInvoking>,
|
|
}<!T>
|
|
};
|
|
|
|
public IMethodInvoker GetMethod(int id)
|
|
{
|
|
if (id == -1)
|
|
return mROA.Implementation.MethodInvoker.Dispose;
|
|
|
|
if (_methods.Count <= id)
|
|
return null;
|
|
|
|
return _methods[id];
|
|
}
|
|
|
|
public void Inject<T>(T dependency)
|
|
{
|
|
}
|
|
}
|
|
} |