Hi Vaibhav Malokar,
Your first line of code would now need to be done across multiple lines, such as the following:
That code is recommended to go in the Application class. Note that to capture platform specific information, you'd also need the following:
In the Android MainActivity.OnCreate method:
In the iOS AppDelegate.FinishedLaunching method:
The documentation is a bit more detailed, showing where that code generally sits. (That documentation is Crash Reporting specific, so you just need to also include the EnableRealUserMonitoring method that I mentioned).
For sending a crash report in a background thread, the Raygun4Xamarin.Forms provider does not have an equivalent of this. I'll mention this to the provider team, but don't know if/when this functionality would be implemented. For now, you'd need to call the RaygunClient.Current.Send method in a thread to achieve the same functionality. If you do this often, you may want to wrap this up in an extension method.
I hope that further helps you out.