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)); }
public List <StreamIdentifier> GetStreamIdentifiers() { return(Resource.Streams .Select(s => StreamIdentifier.Create(Owner.Owner.Id, Owner.Id, s.Map)) .ToList()); }