I've just been handed an API that seems to be a step up from what I'm used to, as everything appears to be implemented using interfaces, and I'm struggling to get my head around them.
public partial class Form1 : Form, IFoo
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Guid jobID = AddBarToFoo(fooID, barPath);
}
public Guid IFoo.AddBarToFoo(string fooID, string barPath)
{
throw new NotImplementedException();
}
So that's a basic structure. Visual Studio has kindly implemented the interface in its entirety and I can call the AddBarToFoo method. Great.
But now what? Evidently the method is a void that requires some code, but what code? Should I be scouring the API for objects to instantiate with that method? Or am I going down completely the wrong path?