public static LazyCapability CreateBrokenCap(string message) { var cap = new LazyCapability(Task.FromException <Proxy>(new RpcException(message))); cap.AddRef(); // Instance shall be persistent return(cap); }
public static LazyCapability CreateCanceledCap(CancellationToken token) { var cap = new LazyCapability(Task.FromCanceled <Proxy>(token)); cap.AddRef(); // Instance shall be persistent return(cap); }