using System.Threading; namespace ScreenConnect; public class GrandchildRunContext : ChildRunContext, IConvertible where TGrandparentRunContext : RunContext where TParentRunContext : ChildRunContext { public GrandchildRunContext(TParentRunContext parentRunContext, params CancellationToken[] auxiliaryCancellationTokens) : base(parentRunContext, auxiliaryCancellationTokens) { } TGrandparentRunContext IConvertible.Convert() { return base.Parent.Parent; } public static implicit operator TGrandparentRunContext(GrandchildRunContext @this) { return @this.Parent.Parent; } }