コード例 #1
0
        internal StreamAction StartStream(DocumentSessionBase session, string streamKey, params object[] events)
        {
            EnsureAsStringStorage(session);

            var stream = StreamAction.Start(streamKey, events);

            session.UnitOfWork.Streams.Add(stream);

            return(stream);
        }
コード例 #2
0
        internal StreamAction StartStream(DocumentSessionBase session, Guid id, params object[] events)
        {
            EnsureAsGuidStorage(session);

            var stream = StreamAction.Start(this, id, events);

            session.WorkTracker.Streams.Add(stream);

            return(stream);
        }
コード例 #3
0
        internal StreamAction StartStream(DocumentSessionBase session, string streamKey, params object[] events)
        {
            EnsureAsStringStorage(session);

            if (streamKey.IsEmpty())
            {
                throw new ArgumentOutOfRangeException(nameof(streamKey), "The stream key cannot be null or empty");
            }


            var stream = StreamAction.Start(this, streamKey, events);

            session.WorkTracker.Streams.Add(stream);

            return(stream);
        }
コード例 #4
0
        internal StreamAction StartStream(DocumentSessionBase session, Guid id, params object[] events)
        {
            EnsureAsGuidStorage(session);

            if (id == Guid.Empty)
            {
                throw new ArgumentOutOfRangeException(nameof(id), "Cannot use an empty Guid as the stream id");
            }


            var stream = StreamAction.Start(this, id, events);

            session.WorkTracker.Streams.Add(stream);

            return(stream);
        }