Could it be that the ‘completed’ event handler won’t be called due to resource freeing by the GC?
public void StartVideo(WerCamera camera)
{
Credential creadential = new Credential() { Email = CurrentUser.Email, Password = CurrentUser.Password, SessionNumber = SessionNumber};
CommandsClient client = new CommandsClient();
client.StartVideoCompleted += client_StartVideoCompleted;
client.StartVideoAsync(int.Parse(camera.Id), creadential, ClientInfo);
client.CloseAsync();
}
Yes, that is possible since you are losing all references to client once the function returns.
client.StartVideoCompleted += client_StartVideoCompleted;ends up holding a reference to the object with the client_StartVideoCompleted function but that is not reciprocated. You’ll need to keep a reference to the created client somehow.