public IReactiveQubject <I, O> Create(Uri streamUri, object state) { if (typeof(I) == typeof(O)) { var res = new NotSoSimpleUntypedSubject <I>(_parent, streamUri); _parent.AddArtifact(streamUri, res); return((IReactiveQubject <I, O>)res); } throw new NotImplementedException(); }
public IReactiveQubject <I, O> Create(Uri streamUri, A argument, object state) { if (typeof(I) == typeof(O) && typeof(A) == typeof(Expression)) { var res = new SimpleBridge <I>(_parent, streamUri, (Expression)(object)argument); _parent.AddArtifact(streamUri, res); return((IReactiveQubject <I, O>)res); } throw new NotImplementedException(); }
public IReactiveQubject <I, O> Create(Uri streamUri, A argument, object state) { if (typeof(I) == typeof(O)) { var uri = (Tuple <Uri, Uri>)(object) argument; var refCountSubject = (IMultiSubject <bool, bool>)_parent._artifacts[uri.Item1]; var refCount = refCountSubject.CreateObserver(); var res = new SimpleTunnel <I>(_parent, streamUri, refCount); _parent.AddArtifact(streamUri, res); return((IReactiveQubject <I, O>)res); } throw new NotImplementedException(); }