Some code in the samples and docs still used old C# API.

Change-Id: I7914c88ad7b31baa7586771423069dc2b90d534f
Tested: on Linux.
2 files changed