Beispiel #1
0
        public static async ValueTask <Maybe <ITransportChannel> > TryCreateChannelAsync(this ITransportConnection connection)
        {
            var maybeChannel = await connection.TryCreateChannelSafeAsync().ConfigureAwait(false);

            if (!maybeChannel.HasValue)
            {
                await connection.Completion.ConfigureAwait(false);
            }
            return(maybeChannel);
        }
Beispiel #2
0
 public ValueTask <Maybe <ITransportChannel> > TryCreateChannelSafeAsync()
 {
     return(_transportConnection.TryCreateChannelSafeAsync());
 }