Hello @Sebastian Januschewski,
In C#, a static
class cannot contain instance members, and you cannot create instances of a static class using the new
keyword. So, if the OutputType
class in the documentation is defined as static
but includes non-static members or is instantiated that would be incorrect.
Here's the correct approach:
- If you want to create an instance of
OutputType
(e.g., usingnew OutputType()
), then it must not be declared static. - If you intend to keep
OutputType
static, then all its members must also be static, and it should not be instantiated.
Output bindings like [SqlOutput]
require properly structured types, whether static or non-static, depending on how the function is written. Also, HttpResponseData
is typically constructed and returned from the function method itself.
To ensure your function runs correctly, please:
- Review your class definition to match C# static class rules.
- Check for any runtime errors when running the function.
- Review your
function.json
or attribute decorations if you're using attribute-based bindings.
Hope this helps. Do let us know if you any further queries.