System.Collections.Concurrent.ConcurrentBag.Add(dynamic)

Here are the examples of the csharp api class System.Collections.Concurrent.ConcurrentBag.Add(dynamic) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Example 7

1. Example

Project: dotnet-fake-json-server
Source File: MessageBus.cs
public void Subscribe<T>(string topic, Action<T> handler)
        {
            if (!_subscriptions.ContainsKey(topic))
                _subscriptions.TryAdd(topic, new ConcurrentBag<dynamic>());

            _subscriptions[topic].Add(handler);
        }