I'm converting a project that uses WCF to WebApi. AsyncCallback objects can easily be passed on as if it's a normal method call. However, when trying to deserialize the result in my .NET Core WebApi, it produces errors.
public class AsyncRequest {
[JsonConstructor]
public AsyncRequest () {}
public AsyncCallback Callback { get; set; }
}
// The object is being used in methods like this:
[HttpPost]
[Route("action")]
public IActionResult Action ([FromBody]AsyncRequest request) {
}
I have several other WebApi methods working, including with objects to send information. So it's not an issue with WebApi in general.