// Constructor public MainPage() { InitializeComponent(); bottleRepository = new BottleRepository(); backgroundRepository = new BackgroundRepository(); SetStartValue(); }
public void VerifyCanOverride() { IFileSystem fileSystem = new FileSystem(); var root = Path.GetPathRoot(AppDomain.CurrentDomain.BaseDirectory); var settings = new DeploymentSettings(root.AppendPath("dev", "test-profile")); IBottleRepository bottles = new BottleRepository(fileSystem, new ZipFileService(fileSystem), settings); var initializer = new WebAppOfflineInitializer(fileSystem); var deployer = new IisWebsiteCreator(); var directive = new Website(); directive.WebsiteName = "fubu"; directive.WebsitePhysicalPath = root.AppendPath("dev", "test-web"); directive.VDir = "bob"; directive.VDirPhysicalPath = root.AppendPath("dev", "test-app"); directive.AppPool = "fubizzle"; directive.DirectoryBrowsing = Activation.Enable; initializer.Execute(directive, new HostManifest("something"), new PackageLog()); deployer.Create(directive); //override test directive.ForceWebsite = true; directive.VDirPhysicalPath = root.AppendPath("dev", "test-app2"); deployer.Create(directive); }
public void DeployHelloWorld() { IFileSystem fileSystem = new FileSystem(); var settings = new DeploymentSettings(@"C:\dev\test-profile\"); IBottleRepository bottles = new BottleRepository(fileSystem, new PackageExploder(new ZipFileService(fileSystem), new PackageExploderLogger(s => { }), fileSystem), settings); var initializer = new IisFubuInitializer(fileSystem, new DeploymentSettings()); var deployer = new IisFubuDeployer(fileSystem, bottles); var directive = new FubuWebsite(); directive.HostBottle = "test"; directive.WebsiteName = "fubu"; directive.WebsitePhysicalPath = @"C:\dev\test-web"; directive.VDir = "bob"; directive.VDirPhysicalPath = @"C:\dev\test-app"; directive.AppPool = "fubizzle"; directive.DirectoryBrowsing = Activation.Enable; initializer.Execute(directive, new HostManifest("something"), new PackageLog()); var host = new HostManifest("a"); deployer.Execute(directive, host, new PackageLog()); }
public Game() { InitializeComponent(); CurrentGamer = 1; AppSettings = IsolatedStorageSettings.ApplicationSettings; random = new Random(); backgroundRepository = new BackgroundRepository(); bottleRepository = new BottleRepository(); }
/// <summary> /// Initialize the database and repositories. Inject the database context to repositories. /// </summary> public BaseController() { var db = new BarContext(); BarRepository = new BarRepository(db); BottleRepository = new BottleRepository(db); DrinkRepository = new DrinkRepository(db); DrinkBarRepository = new DrinkBarRepository(db); EventRepository = new EventRepository(db); IngredientDrinkRepository = new IngredientDrinkRepository(db); IngredientRepository = new IngredientRepository(db); OrderDrinkRepository = new OrderDrinkRepository(db); OrderRepository = new OrderRepository(db); QuantityRepository = new QuantityRepository(db); UnitRepository = new UnitRepository(db); UserBarRepository = new UserBarRepository(db); UserRepository = new UserRepository(db); UserRoleRepository = new UserRoleRepository(db); }