I have the following method (3rd party sdk method being implemented in my dll):
public void PlaceItem(myItemData item, IRequest request)
{
var item = (ItemClassData)item; //**myItemData is the base class for ItemClassData**
item.Id = 101;
request.Succeeded(item.Id);
}
The interface parameter is as below:
public interface IRequest
{
void Failed(string Error);
void Succeeded(string ItemId);
}
I want to call this method from a function. I know how to pass an object as the first parameter when I call this method. But how do I pass the second parameter (Interface). Any help is greatly appreciated.
Just create a class that implements this interface like
create instance of it and pass it to the method