Armed with FrameGrabber, let's return to our AssistantItemFinderMain class and put it to use. Start by opening up the AssistantItemFinderMain class in Visual Studio and add the variable:
FrameGrabber frameGrabber;
Next, make the following amendments to the SetHolographicSpace method:
public void SetHolographicSpace(HolographicSpace holographicSpace){// ... InitServices();// ...}async void InitServices(){frameGrabber = await FrameGrabber.CreateAsync(this);}
If you remember, FrameGrabber.CreateAsync is excepting a class conforming to the interface IFrameGrabberDataSource. Make the necessary update (adding the IFrameGrabberDataSource interface to the AssistantItemFinderMain class). Conveniently, our AssistantItemFinderMain ...