In the future, could we give users C# objects directly? But since user could specify multiple event filters in a single subscription, there is no way to determine the exact type of a notification payload in compile time (unless user only subscribes to one and only one event filter). However, in run time, we could check the payload and determine the payload type. And possibly convert the payload to corresponding C# objects. As the end user, he would get a stream of "Events", he he could check the type of the events to determine their specific types.
Discussion with the team is required before implementation.
For now, developer received notification payload string. and they need to manually convert those string to C# objects: https://github.com/ringcentral/RingCentral.Net/blob/master/RingCentral.Tests/SubscriptionTest.cs#L66
In the future, could we give users C# objects directly? But since user could specify multiple event filters in a single subscription, there is no way to determine the exact type of a notification payload in compile time (unless user only subscribes to one and only one event filter). However, in run time, we could check the payload and determine the payload type. And possibly convert the payload to corresponding C# objects. As the end user, he would get a stream of "Events", he he could check the type of the events to determine their specific types.
Discussion with the team is required before implementation.