public static void ScheduleUpdate(IUpdatable updatable) { UpdateScheduler currentSet = _currentSet.Value; if (currentSet != null) currentSet._updatables.Add(updatable); else if (_runOnUIThread != null) _runOnUIThread(updatable.UpdateNow); }
internal void DisposeProvider() { if (this.updateProvider != null) { WebUtil.Dispose(this.updateProvider); this.updateProvider = null; } }
// Use this for initialization public static void Reg(IUpdatable i) { if (Singleton == null) { GameObject go = new GameObject("HotFileDBFRAM_Updater"); Singleton = go.AddComponent<HotFileDBFRAM_Updater>(); Singleton.Updatables = new List<IUpdatable>(); Singleton.mMCU = INemoControlIOSinglton.Get(); Singleton.mMCU.EvtOpened += Singleton.Handle_MCU_Connect; } Singleton.Updatables.Add(i); }
internal IUpdatable GetOrLoadUpdateProvider() { if (this.updateProvider == null) { this.updateProvider = this.service.Provider.GetService<IDataServiceUpdateProvider2>(); if ((this.updateProvider == null) && this.service.Provider.IsV1Provider) { this.updateProvider = this.service.Provider.GetService<IUpdatable>(); } if (this.updateProvider == null) { this.updateProvider = this.service.Provider.GetService<IDataServiceUpdateProvider>(); } } return this.updateProvider; }
public UserAuthenticationProvider( ITranslate<User, UserAccount> translateDataUserToUserAccount, IRetrievable<ByUserEmail, User> retrieveUserByEmail, IBulkRetrievable<ByEncodedUserId, UserAuthentication> retrieveAllUserAuthenticationByEncodedUserId, IUpdatable<UserAuthentication> userAuthUpdater, ICreatable<UserAuthentication> userAuthCreator, IPasswords passwords, IDeletable<UserAuthentication> userAuthDeleter) { _translateDataUserToUserAccount = translateDataUserToUserAccount; _retrieveUserByEmail = retrieveUserByEmail; _retrieveAllUserAuthenticationByEncodedUserId = retrieveAllUserAuthenticationByEncodedUserId; _userAuthUpdater = userAuthUpdater; _userAuthCreator = userAuthCreator; _passwords = passwords; _userAuthDeleter = userAuthDeleter; }
public UserAccountProvider( IUserAuthenticationProvider userAuthProvider, ICreatable<User> userCreator, IRetrievable<ByUserId, User> userGetByUserId, IRetrievable<ByUserEmail, User> retrieveUserByEmail, IDeletable<User> userDeleter, IUpdatable<User> userUpdater, ITranslate<User, UserAccount> translateDataUserToUserAccount, ISystemTime systemTime) { _userAuthProvider = userAuthProvider; _userCreator = userCreator; _userGetByUserId = userGetByUserId; _retrieveUserByEmail = retrieveUserByEmail; _userDeleter = userDeleter; _userUpdater = userUpdater; _translateDataUserToUserAccount = translateDataUserToUserAccount; _systemTime = systemTime; }
/// <summary> /// Tries to load the update provider implementation if it has not already been loaded, then return the loaded IUpdatable implementation. /// </summary> /// <returns>Returns an IUpdatable implementation.</returns> internal IUpdatable GetOrLoadUpdateProvider() { if (this.updateProvider == null) { // We always attempt to load IDataServiceUpdateProvider2 first. This makes call order predictable. // And if the provider supports ServiceActions, we can be certain that the instance returned from // GetService<IDSUP2> can be casted to IDSUP, but the reverse might not be true. this.updateProvider = this.service.Provider.GetService<IDataServiceUpdateProvider2>(); if (this.updateProvider == null) { this.updateProvider = this.service.Provider.GetService<IDataServiceUpdateProvider>(); } // ObjectContextServiceProvider already must have given a non-null value. // Hence basically, this call is only for reflection service provider. if (this.updateProvider == null && this.service.Provider.HasReflectionOrEFProviderQueryBehavior) { this.updateProvider = this.service.Provider.GetService<IUpdatable>(); } } return this.updateProvider; }
protected GameObject(IVisible visible, IUpdatable updatable, ICollidable collidable) { _visible = visible; _updatable = updatable; _collidable = collidable; }
public static void AddToUpdateList( IUpdatable Updatable ) { updateList.AddLast( Updatable ); }
/// <summary> /// Concatenates <paramref name="updatables"/> whenever <paramref name="crunchTrigger"/> is updated for n <paramref name="interval"/> times. /// </summary> /// <param name="name">Name of the cruncher for debugging purposes.</param> /// <param name="crunchTrigger">The <see cref="IUpdatable"/> to observe for fires of <see cref="IUpdatable.Updated"/>.</param> /// <param name="interval">The interval for how many fires must <paramref name="crunchTrigger"/> trigger <see cref="IUpdatable.Updated"/> in order to trigger IndicatorRow's update event.</param> /// <param name="properties"> /// How many properties all of the <paramref name="updatables"/> emit. /// this can be less than their minimal properties. /// e.g. if <paramref name="updatables"/> emit <see cref="BarValue"/> (4 properties), selecting 1 will take only <see cref="BarValue.Close"/>. /// </param> /// <param name="indices">The index to use to call <paramref name="factory"/>.</param> /// <param name="factory">A factory to initialize new indicators using <paramref name="indices"/>.</param> /// <param name="triggerMustBeReady">Does <paramref name="crunchTrigger"/> must be ready to trigger IndicatorRow's update event?</param> /// <returns>A new cruncher configured.</returns> public static Concat OnSpecificUpdate(IEnumerable <int> indices, IndicatorFactoryHandler factory, IUpdatable crunchTrigger, int interval = 1, int properties = 1, string name = null, bool triggerMustBeReady = true) { return(BindToConcatenatingList(Concat.OnSpecificUpdate(Factory(indices, factory), crunchTrigger, interval, properties, name, triggerMustBeReady))); }
/// <summary> /// Unregisters an updatable object from the server timer pool. /// </summary> /// <param name="updatable">the object to unregister</param> public void UnregisterUpdatable(IUpdatable updatable) { AddMessage(() => m_updatables.Remove(updatable)); }
public void Add(IUpdatable updatable) { mBackQueue.Enqueue(updatable); }
public void AddUpdatable(IUpdatable updatable) { if (updatables.IsNull()) { updatables = new UpdatableList(); } updatables.Add(updatable); }
protected void RemoveUpdatable(IUpdatable updatable) { updatables.Remove(updatable); }
public UpdatableMetricCounter(IUpdatable updatable) { this.updatable = updatable; }
public static IDisposable EnterUpdateScope(this IUpdatable updatable, bool saveToDataSource = false) { return(new UpdateScope(updatable, saveToDataSource)); }
////////////////////////////////////////////////////////////////////////////// protected void AddUpdatable(IUpdatable updatable) { updatables.Add(updatable); }
private void handleUpdatableDied(IUpdatable obj) { ToRemove.Add(obj); }
protected void RemoveUpdatable(IUpdatable updatable) { updatables.Remove(updatable); }
////////////////////////////////////////////////////////////////////////////// protected void AddUpdatable(IUpdatable updatable) { updatables.Add(updatable); }
/// <summary> /// Poistaa olion päivitettävien joukosta. /// </summary> /// <param name="obj"></param> public static void RemoveFromUpdate(IUpdatable obj) { updatedObjects.Remove(obj); }
/// <summary> /// Invokes <see cref="TimeManager.RemoveUpdatable(IUpdatable)"/> /// </summary> /// <param name="updatable"></param> public static void DisableUpdates(this IUpdatable updatable) { TimeManager.RemoveUpdatable(updatable); }
/// <summary> /// Merkitsee olion päivitettäväksi. /// </summary> /// <param name="obj"></param> public static void AddToUpdate(IUpdatable obj) { updatedObjects.Add(obj); }
/// <summary> /// Invokes <see cref="IUpdatable.OnUpdate"/> /// </summary> /// <param name="updatable"></param> public static void OnUpdate(this IUpdatable updatable) { updatable.OnUpdate(); }
public void RemoveUpdatable(IUpdatable updatable) { if (updatables.Count() > 0) { updatables.Remove(updatable); } }
public virtual void SkipUpdate(IUpdatable element) { if (!this._elementsToUpdate.Contains(element)) return; this._elementsToUpdate.Remove(element); }
public override void Setup() { base.Setup(); this.update = this.nwnd as IUpdatable; AddUser(); }
public virtual void Update(IUpdatable element) { if (this.DisableUpdates) return; if (this._updateNestLevel == 0) { element.Update(); } else { if (this._elementsToUpdate.Contains(element) || element.Parent != null && this._elementsToUpdate.Contains(element.Parent)) return; this._elementsToUpdate.Add(element); } }
/// <summary> /// Registers an updatable object in the server timer pool. /// </summary> /// <param name="updatable">the object to register</param> public void RegisterUpdatable(IUpdatable updatable) { AddMessage(() => m_updatables.Add(updatable)); }
internal void Push(ISoulBinder soulBinder, IUpdatable handler) { _RequesterHandlers.Add(handler); lock(_Binders) { _Binders.Enqueue(soulBinder); } }
/// <summary> /// Registers the given Updatable during the next Map Tick /// </summary> public void RegisterUpdatableLater(IUpdatable updatable) { m_messageQueue.Enqueue(new Message(() => RegisterUpdatable(updatable))); }
public static bool UpdateListContains(IUpdatable updatable) { return updateList.Contains(updatable); }
public static void RemoveFromUpdateList( IUpdatable Updatable ) { updateRemoveList.AddLast( Updatable ); }
public void RemoveUpdatable(IUpdatable _updatable) { updatables.Remove(_updatable); }
public void Untick(IUpdatable obj) { updatables.Remove(obj); }
public Dat(IUpdatable another) { UpdateFrom(another); }
/// <summary>Constructs a updater for the given object</summary> /// <param name="obj">The object that will recieve updates</param> public Updater(IUpdatable obj) { Obj = obj; Interval = 1000; }
public void SubscribeUpdate(IUpdatable _updatable) { updatables.Add(_updatable); }
public void Tick(IUpdatable obj) { updatables.Add(obj); }
/// <summary> /// Removes a detailed IUpdatable item (AmusementsDetailForm). /// </summary> /// <param name="form"></param> public void RemoveClickIUpdatable(IUpdatable form) { clickForms.Remove(form); }
/// <summary> /// Adds an updatable object to be automatically updated every frame and will ignore duplicate objects. /// </summary> public void AddUpdatable(IUpdatable updatable) { try { if (!this.UpdatableModules.Contains(updatable)) { this.UpdatableModules.Add(updatable); } } catch (Exception ex) { MyLogger.Exception(ex); } }
public abstract IUpdatable <T> GetSet(IUpdatable <T> source, T entity);