public void FilesProcessing() { string[] fileNames = Directory.GetFiles(Constants.DataFilesFolder); var recordCollector = RecordCollector.GetInstance(); foreach (var fileName in fileNames) { using (container = new UnityContainer()) { var menuConfiguration = new MenuConfiguration(container); menuConfiguration.Configure(); var menu = container.Resolve <IMenu>(); var configurator = new ReportConfigurator(container, fileName, menu); configurator.Setup(); if (configurator.IsSuccesfulConfiguration) { var record = new OfficerProcessingRecord(); record.FileName = fileName; recordCollector.AddRecord(record); Run(); } } } recordCollector.WriteRecordList(); }
public SmartPowerTreads(IServiceContext serviceContext) { _hero = serviceContext.Owner as Hero; _updateHandler = UpdateManager.Subscribe(OnGameUpdate, 200); _random = new Random(); _configs = new MenuConfiguration(); }
public static Menu FromConfig(MenuConfiguration config, IActionFactory actionFactory) { return(new Menu( CommandBindingCollection.FromCollection(config.CommandBindings, actionFactory), config.Pages.Select((p, i) => MenuPage.FromConfig(p, i, actionFactory)), config.Help, config.Help2)); }
public MenuScene(Microsoft.Xna.Framework.Game game) : base(game) { camera = new Camera2D(Game); //Game.Components.Add((IGameComponent)camera); screen = EntityFactory.CreateSprite("default"); MenuConfiguration menuConfiguration = Game.Content.Load <MenuConfiguration>("Menu.Config"); screen.LoadContent(menuConfiguration.AssetName); screen.Scale = menuConfiguration.Scale; }
public void MenuConfiguration_ConstructorParameterContainerNotNullReturnsMenuConfiguration() { IUnityContainer fakeUnityContainer = new UnityContainer(); var menuConfiguration = new MenuConfiguration(fakeUnityContainer); menuConfiguration.Configure(); var isRegistered = fakeUnityContainer.IsRegistered <IMenu>(); Assert.True(isRegistered); }
static void Main(string[] args) { MainMenu mainMenu = new MainMenu(); mainMenu.Handle(); MenuConfiguration menuConfiguration = new MenuConfiguration(); }
public MainMenu() { eq = new Dictionary<string, Equipment>(); menuConfiguration = new MenuConfiguration(); }
public ConfigurationController(IOptions <SiteConfiguration> siteConfiguration, IOptions <MenuConfiguration> menuConfiguration) { _siteConfiguration = siteConfiguration.Value; _menuConfiguration = menuConfiguration.Value; }