Exemple #1
0
            /// <summary>
            /// INTERNAL API.
            /// This is only used by the materialization-importing apply methods of Source,
            /// Flow, Sink and Graph.
            /// </summary>
            internal TShape Add <TShape, TMat, TMat2>(IGraph <TShape, TMat> graph, Func <TMat, TMat2> transform) where TShape : Shape
            {
                if (StreamLayout.IsDebug)
                {
                    StreamLayout.Validate(graph.Module);
                }

                var copy = graph.Module.CarbonCopy();

                _moduleInProgress = _moduleInProgress.Compose(copy.TransformMaterializedValue(transform));
                return((TShape)graph.Shape.CopyFromPorts(copy.Shape.Inlets, copy.Shape.Outlets));
            }
 public static void RegisterModule(this Container container, IModule module)
 {
     module.Compose(container);
 }
Exemple #3
0
    public static IServiceCollection AddModule(this IServiceCollection serviceCollection, IModule module)
    {
        module.Compose(serviceCollection);

        return(serviceCollection);
    }