private INakedObjectAdapter Save(object toSave) { TransactionManager.StartTransaction(); var adapterForToSave = AdapterFor(toSave); LifecycleManager.MakePersistent(adapterForToSave); TransactionManager.EndTransaction(); return adapterForToSave; }
static DataTransferService() { LifecycleManager.SubscribeToWorldInit(() => { _service = null; }); }
static Patch_Game_FindSpawnPoint_PrintMaps() { LifecycleManager.SubscribeToWorldInit(() => { FirstTime = true; }); }
static LocationManager() { LifecycleManager.SubscribeToWorldInit(() => { _simpleLocationsByZone = null; }); }
private OrderFail CreateNewTransientOrderFail() { var spec = (IObjectSpec) Metamodel.GetSpecification(typeof (OrderFail)); var newOrderAdapter = LifecycleManager.CreateInstance(spec); var order = (OrderFail) newOrderAdapter.Object; order.OrderFailId = 0; return order; }
static Game_FindSpawnPoint_TriggerLifecycle_Patch() { LifecycleManager.SubscribeToWorldInit(() => { FirstTime = true; }); }
private static void TriggerLifecycle() { if (FirstTime) { FirstTime = false; LifecycleManager.InitFindSpawnPointFirstTime(); } }
private Pet CreateNewTransientPet() { var nextIndex = Persistor.Instances<Pet>().Select(p => p.PetId).Max() + 1; var spec = (IObjectSpec) Metamodel.GetSpecification(typeof (Pet)); var newPetAdapter = LifecycleManager.CreateInstance(spec); var pet = (Pet) newPetAdapter.Object; pet.PetId = nextIndex; return pet; }
public void SetUp() { _lifecycleManager = new LifecycleManager(); _testRxSchedulerFacade = new Mock <IRxSchedulersFacade>(); _testRxSchedulerFacade.Setup(facade => facade.Ui()).Returns(CurrentThreadScheduler.Instance); _testRxSchedulerFacade.Setup(facade => facade.Io()).Returns(CurrentThreadScheduler.Instance); }
static WorldSpawnerConfigurationService() { LifecycleManager.SubscribeToWorldInit(() => { IsConfigured = false; FirstRun = true; DetectedUnableToFindPrefab = false; }); }
private Product CreateNewTransientProduct() { var nextIndex = Persistor.Instances <Product>().Select(p => p.Id).Max() + 1; var spec = (IObjectSpec)Metamodel.GetSpecification(typeof(Product)); var newProductAdapter = LifecycleManager.CreateInstance(spec); var product = (Product)newProductAdapter.Object; product.Id = nextIndex; return(product); }
public AppKitApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { AppKitApplication.Current = this; // Handle activities lifecycle _lfcb = new AppKitApplication.LifecycleManager(); _lfcb.Resumed += App_Resumed; _lfcb.Paused += App_Paused; RegisterActivityLifecycleCallbacks(_lfcb); }
protected override void OnCreate(Bundle bundle) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(bundle); LifecycleManager.Init(this, bundle); Forms.Init(this, bundle); var initializer = new Initializer(); var application = new CoreApplication(initializer); LoadApplication(application); }
public override void Dispose() { lock (access_obj) { // Do not cleanup elements if we are shutting down Dynamo. if (DisposeLogic.IsShuttingDown || DisposeLogic.IsClosingHomeworkspace) { return; } //this function is not implemented for the moment bool didAdvanceSteelDelete = LifecycleManager <string> .GetInstance().IsAdvanceSteelDeleted(Handle); var elementManager = LifecycleManager <string> .GetInstance(); int remainingBindings = elementManager.UnRegisterAssociation(Handle, this); // Do not delete owned elements if (remainingBindings == 0 && !didAdvanceSteelDelete) { if (Handle != null) { //lock the document and start a transaction using (var ctx = new DocContext()) { var filerObject = Utils.GetObject(Handle); if (filerObject != null) { filerObject.DelFromDb(); } ObjectHandle = string.Empty; } } } else { //This element has gone ObjectHandle = string.Empty; } } }
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults) { base.OnRequestPermissionsResult(requestCode, permissions, grantResults); LifecycleManager.OnRequestPermissionsResult(requestCode, permissions, grantResults); }
private static void InitMultiplayer() => LifecycleManager.InitMultiplayer();
private static void InitDedicated() => LifecycleManager.InitDedicated();
private static void InitSingleplayer() => LifecycleManager.InitSingleplayer();
void InitPlaneController() { session = GameObject.FindObjectOfType <ARCoreSession>(); lifecycleManager = LifecycleManager.Instance; streamer = GetComponent <PlaneStreamer>(); }