public ComputationFactory(GameData gameData) { _builderFactories = new Lazy <Task <IBuilderFactories> >( () => BuilderFactories.CreateAsync(gameData)); _parser = new Lazy <Task <IParser> >( () => Parser <ParsingStep> .CreateAsync(gameData, _builderFactories.Value, ParsingData.CreateAsync(gameData, _builderFactories.Value))); }
public ComputationFactory(GameData gameData) { _calculator = new Lazy <ICalculator>(Calculator.Create); _builderFactories = new Lazy <Task <IBuilderFactories> >( () => BuilderFactories.CreateAsync(gameData)); _parser = new Lazy <Task <IParser> >( async() => await Parser <ParsingStep> .CreateAsync(gameData, _builderFactories.Value, ParsingData.CreateAsync(gameData, _builderFactories.Value))); }