Beispiel #1
0
        private void SetConnectionResult()
        {
            var connection = CreateConnection(handle.Value);

            if (connection == null)
            {
                throw new InvalidOperationException("The connection was not created.");
            }

            completionSource.SetResult(connection);
            FlagRequestAsCompleted();
        }
 public void SetResult(T res)
 {
     source.SetResult(res);
 }
Beispiel #3
0
 public bool SetResult(object?result) =>
 _taskSource.SetResult(result);