public void initialize(Transform rectParent, Transform worldParent) { _gameObject = TutorialPrefabStorage.Instance.getUiMask(); _gameObject.transform.SetParent(rectParent); InitializeHelper.initializeObject(_gameObject.GetComponent <ISetupAble>(), _parameters); }
/// <summary> /// Initialize the list of objects and save them into database table and do the transactions process. /// </summary> public static async Task MainProcess(CancellationToken cancellationToken = default) { try { // Initialize the list of objects and save them into database table. await InitializeHelper.SaveDataAsync().ConfigureAwait(false); // Transaction Processes. await Transactions.TransactionProcessAsync().ConfigureAwait(false); Console.WriteLine("The Transaction Processes were done\n\n\n\n"); // Delation Process. Console.WriteLine("To execute the program again, you must delete the data from database tables."); Console.WriteLine("Do you want to delete the data from database tables? (Y/N)"); var request = Console.ReadLine(); if (request.Length > 1) { request = request.Substring(0, 1); } if (request.ToLowerInvariant().Equals("y")) { await RepositoryDelation.DeleteData().ConfigureAwait(false); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void initialize(Transform rectParent, Transform worldParent) { _gameObject = TutorialPrefabStorage.Instance.getHelpDisplayByType(_helpDisplayType); _gameObject.transform.SetParent( _helpDisplayType == HelpDisplayType.ElementHighlight ? worldParent : rectParent); InitializeHelper.initializeObject(_gameObject.GetComponent <ISetupAble>(), _parameters); }
public AuthorizationValidator() { if (!InitializeHelper.IsInitialized) { InitializeHelper.Initialize(); } _userManager = IoCContainer.Instance.Resolve <IUserManager>(); }
public static async Task Main(string[] args) { var host = CreateHostBuilder(args).Build(); using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; try { var rolesManager = services.GetRequiredService <RoleManager <IdentityRole> >(); await InitializeHelper.InitializeAsync(rolesManager); var userManager = services.GetRequiredService <UserManager <Model.WarehouseUser> >(); await InitializeHelper.InitializeRootUser(userManager); } catch (Exception ex) { } } host.Run(); }
public static async Task Main(string[] args) { var host = BuildWebHost(args); using (var scope = host.Services.CreateScope()) { var services = scope.ServiceProvider; try { var userManager = services.GetRequiredService <UserManager <ApplicationUser> >(); var rolesManager = services.GetRequiredService <RoleManager <IdentityRole> >(); await InitializeHelper.InitializeRolesAsync(userManager, rolesManager); } catch (Exception ex) { var logger = services.GetRequiredService <ILogger <Program> >(); logger.LogError(ex, "An error occurred while seeding the database."); } } host.Run(); }
public async Task Fixture() { // Initialize the list of objects and save them into database table. await InitializeHelper.SaveDataAsync(); }
protected FeatureBase() { InitializeHelper.AddSetupToScenarioContext(ScenarioContext); }
protected override void Seed(ApplicationDbContext context) { InitializeHelper.SeedMembership(context); InitializeHelper.SeedItems((ApplicationDbContext)context); }