namespace Connected.ServiceModel { internal class CancellationContext : ICancellationContext { public CancellationContext(IContext context) { Context = context; } public CancellationToken CancellationToken => Context is null ? CancellationToken.None : Context.CancellationToken; private IContext Context { get; } } }