Skip to content

Commit af421c6

Browse files
committed
GeneratorKind: add FindGeneratorKindByID method
1 parent 056aa80 commit af421c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Generator/GeneratorKind.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ public GeneratorKind(string id, string name, System.Type generatorType, System.T
3838
Registered.Add(this);
3939
}
4040

41+
public static GeneratorKind FindGeneratorKindByID(string id)
42+
{
43+
return Registered.Where(kind => kind.ID == id).First();
44+
}
45+
4146
public Generator CreateGenerator(BindingContext context)
4247
{
4348
return (Generator)Activator.CreateInstance(GeneratorType, context);

0 commit comments

Comments
 (0)