Files
mROA/mROA.Codegen/MethodRepo.cstmpl
T

55 lines
1.8 KiB
Plaintext

// <auto-generated/>
using System.Collections.Generic;
using System.Reflection;
using mROA.Abstract;
using mROA.Implementation;
using System;
using System.Collections;
using System.Threading;
namespace mROA.Codegen
{
public class GeneratedInvokersCollection : IReadOnlyList<IMethodInvoker>
{
private readonly List<IMethodInvoker> _invokers = 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>),
RequireCancellation = <!L cancellation>,
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 IEnumerator<IMethodInvoker> GetEnumerator()
{
return _invokers.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public int Count => _invokers.Count;
public IMethodInvoker this[int index] => _invokers[index];
}
}