public Stream(StreamKey key, StreamRegistry streamReg, IPlacementDispatcher disp, ExceptionSink exceptions) { Key = key; _streamReg = streamReg; _disp = disp; _exceptions = exceptions; _dSubscriptions = new ConcurrentDictionary <Guid, Subscription>(); }
public StreamRegistry(IPlacementDispatcher disp, ExceptionSink exceptions, TypeMap typeMap) { _disp = disp; _exceptions = exceptions; _dStreams = new ConcurrentDictionary <StreamKey, Stream>(); _dImplicitSubTypes = new ConcurrentDictionary <string, ConcurrentBag <Type> >(); typeMap.AddTypeProcessor(DetectImplicitStreamSubs); }
public Subscription(SubKey key, Placement placement, Stream stream, IPlacementDispatcher disp, ExceptionSink exceptions, bool isImplicit) { Key = key; Placement = placement; Stream = stream; Dispatcher = disp; Exceptions = exceptions; IsImplicit = isImplicit; }
public void SetUp() { _key = new AbstractKey(typeof(ITestGrain), Guid.NewGuid()); _placement = new Placement(_key, typeof(TestGrain)); _innerDisp = Substitute.For <IPlacementDispatcher>(); _placer = Substitute.For <Func <AbstractKey, Placement> >(); _placer(Arg.Is(_key)).Returns(_placement); _disp = new Dispatcher(_placer, _innerDisp); _fn = a => Task.FromResult(true); }
public Dispatcher(Func <AbstractKey, Placement> placer, IPlacementDispatcher innerDisp) { _placer = placer; _innerDispatcher = innerDisp; }