/// <summary> /// Opens the specified stream for reading and (or returns null if nonexistent). /// </summary> /// <typeparam name="T">The expected type of the stream to open.</typeparam> /// <param name="store">Store containing stream.</param> /// <param name="name">The name of the stream to open.</param> /// <returns>Stream instance that can be used to consume the messages (or null if nonexistent).</returns> internal static IProducer <T> OpenStreamOrDefault <T>(this PsiImporter store, string name) => store.Contains(name) ? store.OpenStream <T>(name) : null;