VNRequestCompletionHandler Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A delegate that is called once for each feature detected in a VNRequest.
public delegate void VNRequestCompletionHandler(VNRequest request, NSError error);
type VNRequestCompletionHandler = delegate of VNRequest * NSError -> unit
Parameters
- error
- NSError
If not null
, an error that occurred during vision processing.
Remarks
Developers will typically downcast the to the expected subtype and retrieve relevant data from the downcast value:
var findFacesRequest = new VNDetectFaceRectanglesRequest((request, error) =>
{
if (error != null)
{
HandleError(error);
}
else
{
var frs = request as VNDetectFaceRectanglesRequest;
// Assert frs == findFacesRequest
var rs = frs.GetResults<VNFaceObservation>();
foreach (var fo in rs)
{ // ... etc ...