예제 #1
0
 public long GetStreamLastEventNumber(TStreamId streamId)
 {
     if (_metastreams.IsMetaStream(streamId))
     {
         return(GetStreamLastEventNumber(_metastreams.OriginalStreamOf(streamId)));
     }
     return(_isStreamDeleted(streamId) ? EventNumber.DeletedStream : 1000000);
 }
예제 #2
0
        public string LookupName(long streamId)
        {
            string name;

            if (_metastreams.IsMetaStream(streamId))
            {
                streamId = _metastreams.OriginalStreamOf(streamId);
                name     = LookupName(streamId);
                name     = SystemStreams.MetastreamOf(name);
                return(name);
            }

            if (LogV3SystemStreams.TryGetVirtualStreamName(streamId, out name))
            {
                return(name);
            }

            name = _wrapped.LookupName(streamId);
            return(name);
        }
        public bool TryGetName(StreamId streamId, out string name)
        {
            if (_metastreams.IsMetaStream(streamId))
            {
                streamId = _metastreams.OriginalStreamOf(streamId);
                if (!TryGetName(streamId, out name))
                {
                    return(false);
                }
                name = SystemStreams.MetastreamOf(name);
                return(true);
            }

            if (LogV3SystemStreams.TryGetVirtualStreamName(streamId, out name))
            {
                return(true);
            }

            return(_wrapped.TryGetName(streamId, out name));
        }
예제 #4
0
 public StreamId OriginalStreamOf(StreamId streamId) => _metastreams.OriginalStreamOf(streamId);
예제 #5
0
 public long OriginalStreamOf(long streamId) => _metastreams.OriginalStreamOf(streamId);