private void RegisterServices() { container .PerRequest <IProjectRepository, ProjectRepository>() .PerRequest <ISeedDatabase, SeedDatabase>() .PerRequest <IFactory <IProjectRepository>, Factory <IProjectRepository> >(); }
private async Task RegisterServices() { StorageFolder localFolder = ApplicationData.Current.LocalFolder; var folder = await localFolder.CreateFolderAsync("WarColorsData", CreationCollisionOption.OpenIfExists); container .RegisterHandler(typeof(IDatabase), container => new Database(container.GetInstance <IPlatform>(), folder.Path)); container .PerRequest <IPlatform, MarcelloDB.uwp.Platform>(); }
private void RegisterServices() { string path = Path.Combine( System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "WarColorsData"); if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } container .RegisterHandler(typeof(IDatabase), container => new Database(container.GetInstance <IPlatform>(), path)); container .PerRequest <IPlatform, MarcelloDB.netfx.Platform>(); }