Ejemplo n.º 1
0
 public TestAppService(
     IRepository <Person> personRepository,
     IRepository <Animal> animalRepository,
     ICacheManager cacheManager,
     IPersonCache personCache,
     IEmailSender emailSender,
     ISettingManager settingManager,
     AppConfigurtaionService appConfigurtaionService,
     INewsRepository newsrepository,
     IFreeSqlRepository <News> freeSqlRepository,
     IFreeSqlRepository <Person> fpersonRepository,
     IFreeSqlRepository <Animal> fanimalRepository,
     IRemoteEventBus remoteEventBus
     )
 {
     _personRepository        = personRepository;
     _animalRepository        = animalRepository;
     _cacheManager            = cacheManager;
     _personCache             = personCache;
     _emailSender             = emailSender;
     _settingManager          = settingManager;
     _appConfigurtaionService = appConfigurtaionService;
     _newsrepository          = newsrepository;
     _freeSqlRepository       = freeSqlRepository;
     _fpersonRepository       = fpersonRepository;
     _fanimalRepository       = fanimalRepository;
     _remoteEventBus          = remoteEventBus;
 }
Ejemplo n.º 2
0
 public PersonAppService(IRepository <Person, Guid> personRepository, IRepository <Phone, long> phoneRepository, ICacheManager cacheManager, IPersonCache personCache)
 {
     _personRepository = personRepository ?? throw new ArgumentNullException(nameof(personRepository));
     _phoneRepository  = phoneRepository ?? throw new ArgumentNullException(nameof(phoneRepository));
     _cacheManager     = cacheManager;
     _personCache      = personCache;
 }
        public GalaxyGenerator(IPersonCache personCache, IProfessionCache professionCache, Random random)
        {
            _personCache = personCache;
            _professionCache = professionCache;
            _random = random;

            var assembly = Assembly.GetExecutingAssembly();
            using (
                var reader = new StreamReader(assembly.GetManifestResourceStream("WorldSimulation.Data.PlanetNames.txt"))
                )
            {
                _planetNames = reader.ReadToEnd()
                    .Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
            }
            using (
                var reader =
                    new StreamReader(assembly.GetManifestResourceStream("WorldSimulation.Data.CountryNames.txt")))
            {
                _countryNames = reader.ReadToEnd()
                    .Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
            }
            using (
                var reader =
                    new StreamReader(assembly.GetManifestResourceStream("WorldSimulation.Data.StationNames.txt")))
            {
                _stationNames = reader.ReadToEnd()
                    .Split(new[] {Environment.NewLine}, StringSplitOptions.RemoveEmptyEntries);
            }
        }
 public PopulationModule(PersonBuilder personBuilder,
     Territory rootTerritory,
     IPersonCache personCache)
 {
     _personBuilder = personBuilder;
     _rootTerritory = rootTerritory;
     _personCache = personCache;
 }
Ejemplo n.º 5
0
 public Territory(IProfessionCache professionCache,
     IPersonCache personCache,
     Territory parent = null)
 {
     _professionCache = professionCache;
     _personCache = personCache;
     _parent = parent;
 }
 public PopulationLifeCycle(IPersonCache personCache, IList<ILifeEvent> lifeEvents)
 {
     _personCache = personCache;
     _lifeEvents = lifeEvents;
 }