Files
mROA/mROA.Codegen/MethodRepo.cstmpl
T

55 lines
1.8 KiB
Plaintext
Raw Normal View History

// <auto-generated/>
using System.Collections.Generic;
using System.Reflection;
using mROA.Abstract;
using mROA.Implementation;
using System;
2025-07-03 17:37:25 +03:00
using System.Collections;
using System.Threading;
namespace mROA.Codegen
{
2025-07-03 17:37:25 +03:00
public class GeneratedInvokersCollection : IReadOnlyList<IMethodInvoker>
{
2025-07-03 17:37:25 +03:00
private readonly List<IMethodInvoker> _invokers = new()
{
<!I invoker r sep invokerSep><!D invokerSep>,
<!D>
<!T asyncInvoker>
new mROA.Implementation.AsyncMethodInvoker
{
IsVoid = <!L isVoid>,
2025-05-03 23:09:32 +03:00
IsTrusted = <!L isTrusted>,
ReturnType = typeof(<!L returnType>),
ParameterTypes = new Type[] { <!L parametersType> },
SuitableType = typeof(<!L suitableType>),
2025-08-16 19:51:35 +03:00
RequireCancellation = <!L cancellation>,
Invoking = (i, parameters, special, post) => <!L funcInvoking>,
}<!T>
<!T syncInvoker>
new mROA.Implementation.MethodInvoker
{
IsVoid = <!L isVoid>,
2025-05-03 23:09:32 +03:00
IsTrusted = <!L isTrusted>,
ReturnType = typeof(<!L returnType>),
ParameterTypes = new Type[] { <!L parametersType> },
SuitableType = typeof(<!L suitableType>),
Invoking = (i, parameters, special) => <!L funcInvoking>,
2025-07-03 17:37:25 +03:00
}<!T>
};
2025-07-03 17:37:25 +03:00
public IEnumerator<IMethodInvoker> GetEnumerator()
{
2025-07-03 17:37:25 +03:00
return _invokers.GetEnumerator();
}
2025-07-03 17:37:25 +03:00
IEnumerator IEnumerable.GetEnumerator()
{
2025-07-03 17:37:25 +03:00
return GetEnumerator();
}
2025-07-03 17:37:25 +03:00
public int Count => _invokers.Count;
public IMethodInvoker this[int index] => _invokers[index];
}
}