protected override void OnResume() { // Handle when your app resumes base.OnResume(); DependencyLocator.Resolve <INavigationService>().InitAfterResumeApp(); }
public TranslateExtension() { if (Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Android) { ci = DependencyLocator.Get <ILocalize>().GetCurrentCultureInfo(); } }
void Start() { this.timelineController = DependencyLocator.getTimelineController(); this.timerLabel = this.GetComponent <TextMeshProUGUI>(); this.timelineController.Events.onTimerChange += this.RenderTimer; }
public void Test_Locator_finds_single_dependency() { _locator = new DependencyLocator(Path.Combine(TestDataExtracted, "x64")); var result = _locator.LocateDependencies(new [] { "DependencyA.dll" }); Assert.That(result, Has.Exactly(1).Items); }
public ActivePlayableState(ActorFacade actor) { this.actor = actor; this.combatActionsMapping = DependencyLocator.GetActionsMapper <CombatActionsMapping>(); this.skillQueueResolver = DependencyLocator.GetSkillQueueResolver(); this.tilemapManager = DependencyLocator.getTilemapManager(); }
public static void RegisterViews() { DependencyLocator.Register <MasterViewModel>(DependencyLocatorTarget.GlobalInstance); DependencyLocator.Register <MainViewModel>(DependencyLocatorTarget.GlobalInstance); DependencyLocator.Register <OldMainViewModel>(DependencyLocatorTarget.GlobalInstance); DependencyLocator.Register <DetailViewModel>(DependencyLocatorTarget.GlobalInstance); DependencyLocator.Register <CheckViewModel>(DependencyLocatorTarget.GlobalInstance); }
public void SetViewModel <T>(object initialData = null) where T : BasePageViewModel { try { BindingContext = ViewModel = DependencyLocator.Resolve <T>(initialData); } catch (Exception e) { } }
public void Test_Locator_accept_filter_include_rules() { var path = _createDummyStructure(); _locator = new DependencyLocator(path); _locator.Includes.Add(@"\\B\\"); Assert.That(() => _locator.LocateDependencies(new[] { "foo.dll" }), Throws.Nothing); }
public static Finder <TileFacade> getTileFinder() { if (instance.tileFinder == null) { TilemapManager tilemap = DependencyLocator.getTilemapManager(); instance.tileFinder = new Finder <TileFacade>(tilemap.TilesMap); } return(instance.tileFinder); }
protected override void OnSleep() { base.OnSleep(); BaseSingleton <GlobalSetting> .Instance.SaveState(); MessagingCenter.Unsubscribe <object, INotificationMessage>(this, NotificationService.RESIDENT_VEHICLE_DETAIL_RECEIVED_NOTIFICATION); DependencyLocator.Resolve <INavigationService>().UnsubscribeAfterSleepApp(); }
public CombatGameState(GameStateMachine gameStateMachine) { this.gameStateMachine = gameStateMachine; this.tilemapManager = DependencyLocator.getTilemapManager(); this.timelineController = DependencyLocator.getTimelineController(); this.skillQueueResolver = DependencyLocator.GetSkillQueueResolver(); this.combatActionsMapping = DependencyLocator.GetActionsMapper <CombatActionsMapping>(); this.spawner = DependencyLocator.GetSpawner(); }
public void Test_Locator_accept_filter_exclude_and_include_regex_rules() { // Create a valid exclude and a valid include var path = _createDummyStructure(); _locator = new DependencyLocator(path); _locator.Excludes.Add(@".*B\\"); _locator.Includes.Add(@".*"); Assert.That(() => _locator.LocateDependencies(new[] { "foo.dll" }), Throws.Nothing); }
public static void PrioritizeAndThrottleDataJobs(int maxJobs = 5) { var jm = DependencyLocator.Get <JobManager>(); //jm.AddQueueWithPrioritizer<HistoricalDataJobPrioritizer>(); jm.AddQueue(new JobQueue { MaxConcurrentJobs = 5, Prioritizer = new HistoricalDataJobPrioritizer(), }); }
/// <summary> /// ctor(). /// </summary> public StepBaseViewModel() { _validationObjectFactory = DependencyLocator.Resolve <IValidationObjectFactory>(); ActionBarViewModel = DependencyLocator.Resolve <IdentityAccountingActionBarViewModel>(); ((IdentityAccountingActionBarViewModel)ActionBarViewModel).InitializeAsync(this); _mainInput = _validationObjectFactory.GetValidatableObject <string>(); ResetValidationObjects(); }
private void Awake() { if (instance != null && instance != this) { Destroy(this); } else { instance = this; } }
public NewPostViewModel( IPickMediaService pickMediaService, IValidationObjectFactory validationObjectFactory) { _pickMediaService = pickMediaService; _validationObjectFactory = validationObjectFactory; ResetValidationObjects(); AttachedPostMedias = new ObservableCollection <AttachedAnnounceMediaBase>(); ActionBarViewModel = DependencyLocator.Resolve <NewPostActionBarViewModel>(); }
/// <summary> /// ctor(); /// </summary> public DriveAutoDetailsViewModel(IPickMediaService pickMediaService, IVisionService visionService, IDriveAutoService driveAutoService) { _visionService = visionService; _pickMediaService = pickMediaService; _driveAutoService = driveAutoService; ActionBarViewModel = DependencyLocator.Resolve <CommonActionBarViewModel>(); IsBackButtonAvailable = NavigationService.IsBackButtonAvailable; }
/// <summary> /// ctor(). /// </summary> public App() { InitializeComponent(); InitApp(); #if DEBUG //TrackMemoryUsage(); #endif MessagingCenter.Subscribe <object, INotificationMessage>(this, NotificationService.RESIDENT_VEHICLE_DETAIL_RECEIVED_NOTIFICATION, (sender, args) => { DependencyLocator.Resolve <INotificationService>().InvokeReceivedResidentVehicleDetailInfo(args); }); }
public SkillEffect(SkillInput skillInput, Skill skill, int effectDuration) { this.skillQueueResolver = DependencyLocator.GetSkillQueueResolver(); this.timelineController = DependencyLocator.getTimelineController(); this.uniqId = (this.timelineController.CurrentPassAgent.UniqId.groupId, ++SkillEffect.selfIdCount); int atb = (int)Mathf.Floor(100 - this.timelineController.CurrentPassPriorityScore * this.Speed) % 100; atb = (atb + 100) % 100; this.Atb = atb; this.skillInput = skillInput; this.skill = skill; this.effectDuration = effectDuration; }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (rootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page rootFrame = new Frame(); rootFrame.NavigationFailed += OnNavigationFailed; var rendererAssemblies = new[] { typeof(HtmlLabelRenderer).GetTypeInfo().Assembly }; Xamarin.Forms.Forms.Init(e, rendererAssemblies); HtmlLabelRenderer.Initialize(); DependencyLocator.Register <IInfoProvider, InfoProvider>(); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = rootFrame; } if (rootFrame.Content == null) { // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter rootFrame.Navigate(typeof(MainPage), e.Arguments); } // Ensure the current window is active Window.Current.Activate(); }
public override bool Process() { DependencyLocator.getTimelineController().EndPass(); return(true); }
public ClassActivator(DependencyLocator activator, DependencyInjector injector) { Activator = activator; Injector = injector; }
public BaseViewModel() { navigationService = DependencyLocator.Resolve <INavigationService>(); userDialogService = DependencyLocator.Resolve <IUserDialogService>(); }
public override bool Process() { DependencyLocator.getTimelineController().AddAgentInPasses(new SkillEffect(this.skillInput, this.skill, this.effectDuration)); return(true); }
public MapPage() { InitializeComponent(); BindingContext = DependencyLocator.Resolve <MapViewModel>(); }
void Start() { this.timelineController = DependencyLocator.getTimelineController(); this.timelineController.Events.onPassesChange += this.RenderTurns; }
public MoveProcess(ActorFacade actor, TileFacade dest, ITopology topology, IFilter filter) { HashSet <TileFacade> path = DependencyLocator.getTileFinder().findPath(actor.GetTile(), dest, topology, filter); this.moveAlongPathProcess = new MoveAlongPathProcess(actor, path, null, this.moveSpeed, this.treshold); }
public void RegisterTypes() { DependencyLocator.Register <ILocalize, Localize>(DependencyLocatorTarget.GlobalInstance); }
public void SetUp() { _locator = new DependencyLocator(TestDataExtracted); }
public void Test_Locator_throws_if_no_dependencies_found() { _locator = new DependencyLocator(Path.Combine(TestDataExtracted, "x64")); Assert.That(() => _locator.LocateDependencies(new[] { "Does_not_Exist.dll" }), Throws.TypeOf <DependencyLocatorException>()); }