예제 #1
0
 public DefaultStreamDispatcher(
     IServiceProvider provider,
     ConnectionSourceSettings sourceSettings = null,
     ConnectionSinkSettings sinkSettings     = null)
 {
     _provider       = provider;
     _sourceSettings = sourceSettings;
     _sinkSettings   = sinkSettings;
 }
예제 #2
0
 public TestStreamConnector(
     IPublishSinkSource connect,
     IHubClients clients,
     ConnectionSourceSettings sourceSettings = null,
     ConnectionSinkSettings sinkSettings     = null)
     : base(clients, sourceSettings, sinkSettings)
 {
     // Connect source and sink to external sink probes
     connect.Connect(Source, Sink);
 }
예제 #3
0
 public EchoStream(IHubClients clients, ConnectionSourceSettings sourceSettings = null, ConnectionSinkSettings sinkSettings = null)
     : base(clients, sourceSettings, sinkSettings)
 {
     Source
     .Collect(x => x as Received)
     // Tell everyone
     .Select(x => Signals.Broadcast(x.Data))
     // Or tell everyone else, except one-self
     // .Select(x => Signals.Broadcast(x.Data, new[] { x.Request.ConnectionId }))
     // Or just send it back to one-self
     // .Select(x => Signals.Send(x.Request.ConnectionId, x.Data.Payload))
     .To(Sink)
     .Run(AkkaLoad.Materializer);
 }
예제 #4
0
 public SignalRSourceStage(StreamConnection connection, ConnectionSourceSettings settings)
 {
     this.connection = connection;
     this.settings   = settings;
     this.Shape      = new SourceShape <ISignalREvent>(outlet);
 }
예제 #5
0
 public SignalRSourceStage(StreamConnector connection, ConnectionSourceSettings settings)
 {
     _connection = connection;
     _settings   = settings;
     Shape       = new SourceShape <ISignalREvent>(_outlet);
 }