예제 #1
0
 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)));
 }
예제 #2
0
 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)));
 }