I have base and derived classes:
public abstract class DataServiceBase {
public abstract List<Data> GetData(String name);
}
public class DataService : DataServiceBase {
public override List<Data> GetData(String name) {
// GetData from API
// Call Interceptor.Register(List<Data> data)
return data;
}
}
I would like the derived classes to call Interceptor.Register(List<Data> data)
in GetData
before returning the data.
Is there a way to make sure that this always happens?