Closed ArcturusZhang closed 1 month ago
So we decided to make the APIs simple and lightweighted, since it is quite simple to do something like:
public class MyTypeFactory
{
public override CSharpType CreateCSharpType(InputType inputType) => inputType switch {
InputModelType model => new MyModel(model),
_ => base.CreateCSharpType(inputType)
};
}
to override the behavior of how to get the model, to make it simple, we do not need a method to specifically get a TypeProvider from a InputModelType
.
We need to add a method such as
GetModel
orGetEnum
to construct a modeltypeprovider or enumtypeprovider, so that plugin writer to replace our default implementation.