The code that we will use for image classification cannot be shared between the iOS and Android projects. However, to be able to carry out classifications from shared code (the HotDogOrNot project), we will create an interface. First, however, we will create a class for the EventArgs that we will use in the interface, by going through the following steps:
- In the HotDogOrNot project, create a new class called ClassificationEventArgs.
- Add EventArgs as a base class, as shown in the following code block:
using System;
using System.Collections.Generic;
public class ClassificationEventArgs : EventArgs
{
public Dictionary<string, float> Classifications { get; private
set; }
public ClassificationEventArgs(Dictionary<string, float>
classifications)
{
Classifications = classifications;
}
}
Now that we have created the ClassificationEventArgs class, we can create the interface by going through...