public static MutatingEngine Create(WorkspaceSuperviser superviser, Func <Props, Props>?configurate = null) { var mutatorProps = Props.Create <MutationActor>(); mutatorProps = configurate?.Invoke(mutatorProps) ?? mutatorProps; var mutator = superviser.Create(mutatorProps, "Mutator"); return(new MutatingEngine(mutator, superviser)); }
public static ExtendedMutatingEngine <TData> From <TData>(IExtendedDataSource <TData> source, WorkspaceSuperviser superviser, Func <Props, Props>?configurate = null) where TData : class { var mutatorProps = Props.Create <MutationActor>(); mutatorProps = configurate?.Invoke(mutatorProps) ?? mutatorProps; var mutator = superviser.Create(mutatorProps, "Mutator"); return(new ExtendedMutatingEngine <TData>(mutator, source, superviser)); }
public static IAnalyzer <TWorkspace, TData> From <TWorkspace, TData>(Maybe <TWorkspace> workspace, WorkspaceSuperviser superviser) where TWorkspace : WorkspaceBase <TData> where TData : class { var evtSource = new SourceFabricator <TWorkspace, TData>(); var actor = superviser.Create(Props.Create(() => new AnalyzerActor <TWorkspace, TData>(workspace, evtSource.Send)).ToMaybe(), "AnalyzerActor"); evtSource.Init(actor, superviser); return(new Analyzer <TWorkspace, TData>(actor, evtSource.EventSource ?? throw new InvalidOperationException("Create Analyzer"))); }