public abstract class Base<T>
protected abstract InnerFooBase<InnerBarBase<T>> GetInnerFoo();
protected abstract class InnerFooBase<TFoo> where TFoo : InnerBarBase<T>
protected abstract class InnerBarBase<TBar>
public class Implementation : Base<string>
protected override InnerFooBase<InnerBarBase<string>> GetInnerFoo()
class InnerFoo : InnerFooBase<InnerBar>
class InnerBar : InnerBarBase<string>