Skip to content

Commit

Permalink
added Buffered overloads of GetSubscriber, GetPublisher to GlobalMess…
Browse files Browse the repository at this point in the history
…agePipe
  • Loading branch information
AGeorgy authored May 30, 2022
1 parent 1ff8f63 commit 08e8f8b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/MessagePipe/GlobalMessagePipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,30 @@ public static IAsyncRequestAllHandler<TRequest, TResponse> GetAsyncRequestAllHan
return provider.GetRequiredService<IAsyncRequestAllHandler<TRequest, TResponse>>();
}

public static IBufferedPublisher<TMessage> GetPublisher<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedPublisher<TMessage>>();
}

public static IBufferedSubscriber<TMessage> GetSubscriber<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedSubscriber<TMessage>>();
}

public static IBufferedAsyncPublisher<TMessage> GetPublisher<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedAsyncPublisher<TMessage>>();
}

public static IBufferedAsyncSubscriber<TMessage> GetSubscriber<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedAsyncSubscriber<TMessage>>();
}

#if !UNITY_2018_3_OR_NEWER

public static IDistributedPublisher<TKey, TMessage> GetDistributedPublisher<TKey, TMessage>()
Expand Down

0 comments on commit 08e8f8b

Please sign in to comment.