Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Buffered overloads of GetSubscriber, GetPublisher to GlobalMessagePipe #83

Merged
merged 3 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> GetBufferedPublisher<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedPublisher<TMessage>>();
}

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

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

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

#if !UNITY_2018_3_OR_NEWER

public static IDistributedPublisher<TKey, TMessage> GetDistributedPublisher<TKey, TMessage>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.cysharp.messagepipe",
"displayName": "MessagePipe",
"author": { "name": "Cysharp, Inc.", "url": "https://cysharp.co.jp/en/" },
"version": "1.7.3",
"version": "1.7.4",
"unity": "2018.4",
"description": "High performance messaging pipeline.",
"keywords": [ "pubsub", "event", "Scripting", "DI" ],
Expand Down
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> GetBufferedPublisher<TMessage>()
{
ThrowIfNotInitialized();
return provider.GetRequiredService<IBufferedPublisher<TMessage>>();
}

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

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

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

#if !UNITY_2018_3_OR_NEWER

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