Building an event request
Version:
When the request configuration is complete, you can invoke the Build() method to get the request object.
When you build a request, you must observe the following rules:
-
You can define optional parameters in any order.
For example, the following two code samples are both correct requests:
-
The
Add…methods accumulate values, so you must consider the order in which you invoke them.For example, the following request will contain two custom values:
-
Methods that do not accumulate values should only be invoked once.
An example of a correct request:
An example of an incorrect request that throws an InvalidOperationException exception: