Hmm. This is quite ugly, but might work:
public interface ISomeInterface<TArgs, TOp>
where TArgs: AsyncEventArgs
where U: BaseOperation<TArgs, TOp> {
BaseOperation<TArgs, TOp> Operation { get; }
}
public class LoginWrapper : ISomeInterface<LoginEventArgs, LoginOperation> {
public BaseOperation<LoginEventArgs, LoginOperation> Operation { get { .... }}
}
public class QueryWrapper : ISomeInterface<EntityQueriedEventArgs, EntityQueryOperation> {
public BaseOperation<EntityQueriedEventArgs, EntityQueryOperation { get { .... }}
}
If not, you may need some sort of wrapper class over the DF *Operation classes to get the behavior you need.
I'll put a plug in for the new async/await API too. I know it can be work migrating to it, but it really does simplify one's code quite a bit.