mirror of
https://github.com/FabInfra/capnproto-dotnetcore_Runtime.git
synced 2025-03-12 23:01:44 +01:00
19 lines
494 B
C#
19 lines
494 B
C#
using System.Collections.Generic;
|
|
namespace CapnpC.Model
|
|
{
|
|
static class HasGenericParameters
|
|
{
|
|
public static IEnumerable<GenericParameter> GetLocalTypeParameters(this IHasGenericParameters me)
|
|
{
|
|
for (int i = 0; i < me.GenericParameters.Count; i++)
|
|
{
|
|
yield return new GenericParameter()
|
|
{
|
|
DeclaringEntity = me,
|
|
Index = i
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|