protected override CSharpIdentifier GetImplementation(FunctionEndpoint endpoint, ITypeList typeList) => new CSharpIdentifier(Namespace.Name, "FunctionEndpoint") { TypeArguments = { typeList.For(endpoint.RequestSchema), typeList.For(endpoint.ResponseSchema) } };
public override CSharpIdentifier GetInterface(TEndpoint endpoint, ITypeList typeList) { var identifier = new CSharpIdentifier(TypeNamespace, TypeName).ToInterface(); identifier.TypeArguments.Add(typeList.For(endpoint.Schema)); if (endpoint.Element != null) { identifier.TypeArguments.Add(typeList.InterfaceFor(endpoint.Element)); } return(identifier); }
protected override CSharpIdentifier GetImplementation(TEndpoint endpoint, ITypeList typeList) { var identifier = new CSharpIdentifier(TypeNamespace, TypeName); identifier.TypeArguments.Add(typeList.For(endpoint.Schema)); if (endpoint.Element != null) { identifier.TypeArguments.Add(typeList.ImplementationFor(endpoint.Element)); } return(identifier); }
protected override CSharpIdentifier GetImplementation(ElementEndpoint endpoint, ITypeList typeList) => new CSharpIdentifier(Namespace.Name, "ElementEndpoint") { TypeArguments = { typeList.For(endpoint.Schema) } };