/// <summary> /// Creates a connector that exposes the messages it receives as a stream rather than calling a delegate. /// This allows the owning component to apply stream operators to this input. /// </summary> /// <typeparam name="T">The type of messages accepted by this connector</typeparam> /// <param name="self">The subpipeline</param> /// <param name="pipeline">The pipeline to which to connect.</param> /// <param name="owner">The owning component</param> /// <param name="name">The name of this connector</param> /// <returns>The newly created connector.</returns> public static Connector <T> CreateOutputConnector <T>(this Subpipeline self, Pipeline pipeline, object owner, string name) { if (self == pipeline) { throw new ArgumentException("Output connections should be from be from a subpipeline to a parent pipeline."); } return(new Connector <T>(self, pipeline, owner, name)); }
/// <summary> /// Creates a connector that exposes the messages it receives as a stream rather than calling a delegate. /// This allows the owning component to apply stream operators to this input. /// </summary> /// <typeparam name="T">The type of messages accepted by this connector</typeparam> /// <param name="parent">The pipeline</param> /// <param name="subpipeline">The pipeline to which to connect.</param> /// <param name="owner">The owning component</param> /// <param name="name">The name of this connector</param> /// <returns>The newly created connector.</returns> public static Connector <T> CreateInputConnector <T>(this Pipeline parent, Subpipeline subpipeline, object owner, string name) { if (parent == subpipeline) { throw new ArgumentException("Input connections should be from be from a parent pipeline to a subpipeline."); } return(new Connector <T>(parent, subpipeline, owner, name)); }