You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
should result in the following C# (namespace and preamble excluded for brevity):
publicclassGetResult:ResultBase{privateGetResult(ActionResultresult):base(result){}/// <summary>/// 200 - Ok response./// </summary>publicstaticGetResultOk(IEnumerable<string>response)=>newGetResult(newOkObjectResult(response??Enumerable.Empty<string>()));}
I am considering removing the implicit conversion method, since C# doesnt allow implicit conversion from an interface to a concrete type. The alternative is to keep it, but define it as List<T>, e.g.:
publicclassGetResult:ResultBase{privateGetResult(ActionResultresult):base(result){}/// <summary>/// 200 - Ok response./// </summary>publicstaticGetResultOk(IEnumerable<string>response)=>newGetResult(newOkObjectResult(response??Enumerable.Empty<string>()));/// <summary>/// Performs an implicit conversion from GetResult to ActionResult./// </summary>publicstaticimplicitoperatorGetResult(List<string>response)=>Ok(response);}
This spec:
should result in the following C# (namespace and preamble excluded for brevity):
I am considering removing the implicit conversion method, since C# doesnt allow implicit conversion from an interface to a concrete type. The alternative is to keep it, but define it as
List<T>
, e.g.:Part of #93.
The text was updated successfully, but these errors were encountered: