/// <summary> /// Конструктор /// </summary> /// <param name="contextAccessor"></param> /// <param name="application"></param> /// <param name="principalCheker"></param> /// <param name="usersStorage"></param> public DayTasksService(ICrocoAmbientContextAccessor contextAccessor, ICrocoApplication application, PrincipalCheker principalCheker, IUsersStorage usersStorage) : base(contextAccessor, application, principalCheker) { UsersStorage = usersStorage; }
public UsersController(IUserService userService, IUsersStorage authorizedUsers, ILogger <UsersController> logger) { _authorizedUsers = authorizedUsers ?? throw new ArgumentNullException(nameof(authorizedUsers)); _userService = userService ?? throw new ArgumentNullException(nameof(UserService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public UsersService() { _usersStorage = new UsersStorage(); foreach (var user in _usersStorage.GetAllUsers()) { _listOfUsers.Add(user.EntityToDomain()); } }
public GameController( ISeriesStorage seriesStorage, IUsersStorage users, ILogger <GameController> logger) { _seriesStorage = seriesStorage; _users = users; _logger = logger; }
static void PrintUser(IUsersStorage storage, int id) { var user = storage.GetUser(id); if (user != null) { Console.WriteLine(user); } }
public UsersManager(IUsersStorage usersStorage, ISaver userSaver) { UsersStorage = usersStorage; UsersSaver = userSaver; }
public UsersLogic(IUsersStorage clientStorage) { _userStorage = clientStorage; }
public RelationsController(IUsersStorage usersStorage, ICurrentUserProvider currentUserProvider) { this.usersStorage = usersStorage; this.currentUserProvider = currentUserProvider; }
/// <summary> /// Create new instance of the Server class /// </summary> public ServerCore( XmlSettingsManager <ServerSettings> settingsManager, WorldGenerator worldGenerator, IUsersStorage usersStorage, IChunksStorage chunksStorage, IEntityStorage entityStorage, ICustomStorage customStorage, EntityFactory entityFactory, WorldParameters wp ) { // dependency injection SettingsManager = settingsManager; UsersStorage = usersStorage; EntityStorage = entityStorage; CustomStorage = customStorage; EntityFactory = entityFactory; WorldParameters = wp; if (SettingsManager.Settings == null) { SettingsManager.Load(); } var settings = SettingsManager.Settings; ConnectionManager = new ConnectionManager(SettingsManager.Settings.ServerPort); Scheduler = new ScheduleManager(); UtopiaTime startTime = CustomStorage.GetVariable <UtopiaTime>("GameTimeElapsed"); Clock = new Clock(this, startTime, TimeSpan.FromMinutes(20)); LandscapeManager = new ServerLandscapeManager( this, chunksStorage, worldGenerator, EntityFactory, settings.ChunkLiveTimeMinutes, settings.CleanUpInterval, settings.SaveInterval, settings.ChunksCountLimit, wp); EntityManager = new EntityManager(this); AreaManager = new AreaManager(this); DynamicIdHelper.SetMaxExistsId(EntityStorage.GetMaximumId()); Services = new ServiceManager(this); PerformanceManager = new PerformanceManager(AreaManager); CommandsManager = new CommandsManager(this); ChatManager = new ChatManager(this); GlobalStateManager = new GlobalStateManager(this); LoginManager = new LoginManager(this, EntityFactory); EntitySpawningManager = new EntitySpawningManager(this, worldGenerator.EntitySpawningControler); EntityGrowingManager = new Managers.EntityGrowingManager(this); }
public UsersHelper(IUsersStorage datastorage) { _datastorage = datastorage; }
public UsersService(IUsersServiceConfiguration configuration, IUsersStorage usersStorage) { _configuration = configuration; _usersStorage = usersStorage; }
public CustomAuthenticationService(IUsersStorage storage) { _storage = storage; }