예제 #1
0
        public StreamIdentifier GetStreamIdentifier <TStreamType>()
            where TStreamType : class, IStream
        {
            var streamInReference = Resource.Streams.OfType <TStreamType>().FirstOrDefault();

            if (streamInReference == null)
            {
                throw new StreamNotFoundException(typeof(TStreamType));
            }

            return(StreamIdentifier.Create(Owner.Owner.Id, Owner.Id, streamInReference.Map));
        }
예제 #2
0
 public List <StreamIdentifier> GetStreamIdentifiers()
 {
     return(Resource.Streams
            .Select(s => StreamIdentifier.Create(Owner.Owner.Id, Owner.Id, s.Map))
            .ToList());
 }