Beispiel #1
0
 public Connection(
     TIdentifier modelId,
     ISubject <IObservable <TModel>, TModel> stream)
 {
     _modelId      = modelId;
     _stream       = stream;
     _observer     = new Subject <TModel>();
     _subscription = WeakSubscription.Create(_stream, _observer);
 }
Beispiel #2
0
            public Connection(Stream stream)
            {
                if (null == stream)
                {
                    throw new ArgumentNullException(nameof(stream));
                }

                _stream       = stream;
                _observer     = new Subject <TModel>();
                _subscription = WeakSubscription.Create(_stream, _observer);
            }