public AddRoomPresenter(IAddRoomView view, IRoomFactory roomFactory, IRoomsService roomsService, IImageUploader imageUploader) : base(view) { if (roomsService == null) { throw new ArgumentNullException("Rooms service cannot be null."); } if (roomFactory == null) { throw new ArgumentNullException("Room factory cannot be null."); } if (imageUploader == null) { throw new ArgumentNullException("Image uploader cannot be null."); } this.roomsService = roomsService; this.roomFactory = roomFactory; this.imageUploader = imageUploader; this.View.AddingRoom += OnAddingRoom; this.View.UploadingImage += OnUploadingImage; }
public RoomCollection(IRoomFactory roomFactory, int numberOfRooms, int singleRooms, int doubleRooms, int kingSizeRooms) { //todo class if (singleRooms + doubleRooms + kingSizeRooms > numberOfRooms) { throw new NotImplementedException(); } this.roomFactory = roomFactory; this.numberOfRooms = numberOfRooms; for (int i = 0; i < singleRooms; i++) { roomCollection.Add(i + 1, roomFactory.GetRoomType("Single")); } for (int i = singleRooms; i < singleRooms + doubleRooms; i++) { roomCollection.Add(i + 1, roomFactory.GetRoomType("Double")); } for (int i = singleRooms + doubleRooms; i < singleRooms + doubleRooms + kingSizeRooms; i++) { roomCollection.Add(i + 1, roomFactory.GetRoomType("KingSizeRoom")); } }
public StoryMaker(IRoomFactory roomFactory, IMonsterFactory monsterFactory, ILootFactory lootFactory) { _roomFactory = roomFactory; _monsterFactory = monsterFactory; _lootFactory = lootFactory; }
/// <summary> /// Initializes a new instance of the <see cref="MudZone"/> class. /// </summary> public MudZone(IRoomFactory roomFactory, IRealm owner) { this.WeatherUpdateFrequency = 15; this.rooms = new List<IRoom>(); this.weatherStates = new List<IWeatherState>(); this.Owner = owner; this.roomFactory = roomFactory; }
/// <summary> /// Initializes a new instance of the <see cref="MudZone"/> class. /// </summary> public MudZone(IRoomFactory roomFactory, IRealm owner) { this.WeatherUpdateFrequency = 15; this.rooms = new List <IRoom>(); this.weatherStates = new List <IWeatherState>(); this.Owner = owner; this.roomFactory = roomFactory; }
public AGSGameFactory(IGraphicsFactory graphics, IInventoryFactory inventory, IUIFactory ui, IRoomFactory room, IOutfitFactory outfit, IObjectFactory obj, IDialogFactory dialog, IAudioFactory sound) { Graphics = graphics; Inventory = inventory; UI = ui; Room = room; Outfit = outfit; Object = obj; Dialog = dialog; Sound = sound; }
void ShowRoomProject(IRoomFactory roomFactory) { Console.WriteLine(); Console.WriteLine("Budujemy pokoj w stylu " + roomFactory.GetType().Name); Console.WriteLine("Pokoj będzię się składał z:"); IChair chair = roomFactory.CreateChair(); Console.WriteLine(chair.Show()); ISofa sofa = roomFactory.CreateSofa(); Console.WriteLine(sofa.Show()); Console.WriteLine(); }
public AGSGameFactory(IGraphicsFactory graphics, IInventoryFactory inventory, IUIFactory ui, IRoomFactory room, IOutfitFactory outfit, IObjectFactory obj, IDialogFactory dialog, IAudioFactory sound, IFontLoader fontFactory) { Graphics = graphics; Inventory = inventory; UI = ui; Room = room; Outfit = outfit; Object = obj; Dialog = dialog; Sound = sound; Fonts = fontFactory; }
static void Main(string[] args) { Console.WriteLine("Enter flat style: (light or dark)"); string flatStyle = Console.ReadLine(); Flat flat = new Flat(); //todo IRoomFactory factory = CreateFactory(flatStyle); flat.Room1 = factory.CreateRoom(); flat.Room2 = factory.CreateRoom(); flat.Balcony = factory.CreateBalcony(); }
public NewRoomRequestHandler( IDispatchQueue centralDispatchQueue, IRoomRepository roomRepository, IRoomFactory roomFactory, IObserver <TransceiverMetadataUpdatedEvent> transceiverMetadataUpdatedObserver) { _centralDispatchQueue = centralDispatchQueue ?? throw new ArgumentNullException(nameof(centralDispatchQueue)); _roomRepository = roomRepository ?? throw new ArgumentNullException(nameof(roomRepository)); _roomFactory = roomFactory ?? throw new ArgumentNullException(nameof(roomFactory)); _transceiverMetadataUpdatedObserver = transceiverMetadataUpdatedObserver ?? throw new ArgumentNullException(nameof(transceiverMetadataUpdatedObserver)); }
public void Validate(IWorld world, IRoomFactory roomFactory, string title) { foreach (var blue in roomFactory.Blueprints) { try { var room = roomFactory.Create(world, blue); world.Map[new Point3(0, 0, 0)] = room; world.Player.CurrentLocation = room; ValidateRoom(world, room); } catch (Exception e) { AddError($"Error creating RoomBlueprint for RoomFactory '{title}'. Error was in {blue.Identifier?.ToString() ?? "Unamed Blueprint"}", e); } } }
public AGSGameFactory(IGraphicsFactory graphics, IInventoryFactory inventory, IUIFactory ui, IRoomFactory room, IOutfitFactory outfit, IObjectFactory obj, IDialogFactory dialog, IAudioFactory sound, IFontLoader fontFactory, IResourceLoader resources, IShaderFactory shaders, Resolver resolver) { Graphics = graphics; Inventory = inventory; UI = ui; Room = room; Outfit = outfit; Object = obj; Dialog = dialog; Sound = sound; Fonts = fontFactory; Resources = resources; TypedParameter gameFactoryParam = new TypedParameter(typeof(IGameFactory), this); Masks = resolver.Container.Resolve <IMaskLoader>(gameFactoryParam); Shaders = shaders; }
public StoryElements(IMonsterFactory monsterFactory, ILootFactory lootFactory, IRoomFactory roomFactory) { if (monsterFactory == null) { throw new ArgumentNullException("A monsterFactory must be supplied"); } if (lootFactory == null) { throw new ArgumentNullException("A lootFactory must be supplied"); } if (roomFactory == null) { throw new ArgumentNullException("A roomFactory must be supplied"); } this.monsterFactory = monsterFactory; this.lootFactory = lootFactory; this.roomFactory = roomFactory; }
static void Main() { Console.WriteLine("You are about to make home improvements."); Console.WriteLine("Now you have to choose a color scheme."); Console.WriteLine("Please, type 1 for light style or 2 for dark style."); Console.Write("Enter your choice: "); string choice = Console.ReadLine(); IRoomFactory factory = CreateFactory(choice); var flat = new Flat { Room1 = factory.CreateRoom(), Room2 = factory.CreateRoom() }; Console.WriteLine("Your Room1 wallpaper is {0}.", flat.Room1.Wallpaper.Color); Console.WriteLine("Your Room1 chandelier is {0}.", flat.Room1.Chandelier.Color); Console.WriteLine("Your Room2 wallpaper is {0}.", flat.Room2.Wallpaper.Color); Console.WriteLine("Your Room2 chandelier is {0}.", flat.Room2.Chandelier.Color); Console.Write("Press any key to close the application: "); Console.ReadLine(); }
/// <summary> /// Initializes a new instance of the <see cref="MudZone"/> class. /// </summary> /// <param name="weatherStates">The weather states that can be applied to this zone.</param> public MudZone(IRoomFactory roomFactory, IRealm owner, IEnumerable <IWeatherState> weatherStates) : this(roomFactory, owner) { this.weatherStates = new List <IWeatherState>(weatherStates); }
/// <summary> /// Initializes a new instance of the <see cref="MudZoneFactory"/> class. /// </summary> /// <param name="roomFactory">The room factory.</param> public MudZoneFactory(IRoomFactory roomFactory) { this.roomFactory = roomFactory; }
public RoomAreaService(IUnitOfWork unitOfWork, IRoomFactory roomFactory) { _unitOfWork = unitOfWork; _roomFactory = roomFactory; }
public RoomFactoryTests() { rf = new RoomFactory(); }
public RoomViewModel(IRoomFactory roomFactory) { _roomFactory = roomFactory; _charles = new Charles(); CleanRoom(); }
public RoomFactoryTest() { _roomFactory = new RoomFactory(); }
public DungeonFactory(IRoomFactory iRoomFactory, IHallwayFactory iHallwayFactory) { _iRoomFactory = iRoomFactory; _iHallwayFactory = iHallwayFactory; }
public RegularRoomService(IRoomFactory factory, IRoomRepository repository) { _repository = repository; _factory = factory; }
/// <summary> /// Initializes a new instance of the <see cref="MudZone"/> class. /// </summary> /// <param name="weatherStates">The weather states that can be applied to this zone.</param> public MudZone(IRoomFactory roomFactory, IRealm owner, IEnumerable<IWeatherState> weatherStates) : this(roomFactory, owner) { this.weatherStates = new List<IWeatherState>(weatherStates); }
public LevelLayout(IRoomFactory factory) { roomFactory = factory; _rooms = new Dictionary <Vector2Int, IRoom>(); }
public RoomCollection(int numberOfRooms, IRoomFactory roomFactory) : this(roomFactory, numberOfRooms, 0, 0, 0) { }
public MazeGeneratorTests() { mg = new MazeGenerator(); rf = new RoomFactory(); }