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)));
 }
示例#3
0
 public CompositionRoot()
 {
     _gameData = new Lazy <GameData>(
         () => new GameData(PassiveTreeDefinition.CreateKeystoneDefinitions(), true));
     _builderFactories = new Lazy <Task <IBuilderFactories> >(
         () => Builders.BuilderFactories.CreateAsync(_gameData.Value));
     _parser = new Lazy <Task <IParser> >(
         () => Parser <ParsingStep> .CreateAsync(_gameData.Value, _builderFactories.Value,
                                                 ParsingData.CreateAsync(_gameData.Value, _builderFactories.Value)));
 }
 public CompositionRoot()
 {
     _gameData = new Lazy <GameData>(
         () => new GameData(PassiveTreeDefinition.CreateKeystoneDefinitions(), true));
     _calculator       = new Lazy <ICalculator>(Core.Calculator.Create);
     _builderFactories = new Lazy <Task <IBuilderFactories> >(
         () => Builders.BuilderFactories.CreateAsync(_gameData.Value));
     _parser = new Lazy <Task <IParser> >(
         async() => await Parser <ParsingStep> .CreateAsync(_gameData.Value, _builderFactories.Value,
                                                            ParsingData.CreateAsync(_gameData.Value, _builderFactories.Value)).ConfigureAwait(false));
 }