/// <summary> /// Registers a new method to be invoked to get information about the current state of the application. /// </summary> /// <param name="title">The title of the new state entry.</param> /// <param name="stateGetter">The method to be invoked to get the state value.</param> /// <exception cref="ArgumentNullException">The <paramref name="title"/> is null.</exception> /// <exception cref="ArgumentException">A state getter with the specified <paramref name="title"/> is already registered.</exception> public static void RegisterStateGetter(string title, StateGetter stateGetter) { lock (stateGetters) { stateGetters.Add(title, stateGetter); } }
public ActionEvaluator( HashAlgorithmGetter hashAlgorithmGetter, IAction?policyBlockAction, StateGetter <T> stateGetter, BalanceGetter <T> balanceGetter, Func <BlockHash, ITrie>?trieGetter) { _hashAlgorithmGetter = hashAlgorithmGetter; _policyBlockAction = policyBlockAction; _stateGetter = stateGetter; _balanceGetter = balanceGetter; _trieGetter = trieGetter; }
public static void Resume(AbstractLogger logger, IGetStateResponseParser getStateResponseParser, IEpochTime epochTime, string clientVersion, INotificationQueue notificationQueue, IMixWebCallFactory mixWebCallFactory, IInternalLocalUser localUser, IDatabase database, IUserDatabase userDatabase, INotificationPoller notificationPoller, Action <IResumeSessionResult> callback) { epochTime.OffsetMilliseconds = (database.GetServerTimeOffsetMillis() ?? 0); logger.Debug("Initial time offset: " + epochTime.Offset); SessionDocument sessionDocument = database.GetSessionDocument(localUser.Swid); long lastNotificationTime = sessionDocument.LastNotificationTime; StateGetter.GetState(logger, epochTime, clientVersion, database, userDatabase, notificationQueue, mixWebCallFactory, localUser.Swid, lastNotificationTime, delegate(GetStateResponse response) { HandleGetStateSuccess(logger, getStateResponseParser, response, mixWebCallFactory, localUser, userDatabase, notificationPoller, callback); }, delegate { callback(new ResumeSessionResult(success: false)); }); }
/// <summary> /// Registers a new method to be invoked to get information about the current state of the application. /// </summary> /// <param name="title">The title of the new state entry.</param> /// <param name="stateGetter">The method to be invoked to get the state value.</param> /// <exception cref="ArgumentNullException">The <paramref name="title"/> is null.</exception> /// <exception cref="ArgumentException">A state getter with the specified <paramref name="title"/> is already registered.</exception> public static void RegisterStateGetter(string title, StateGetter stateGetter) { lock(stateGetters) { stateGetters.Add(title, stateGetter); } }
new AccountStateDeltaImplV0(StateGetter, BalanceGetter, Signer) { UpdatedStates = UpdatedStates, UpdatedFungibles = updatedFungibleAssets, };
public ExpireAction(StateMachine machine, StateGetter toState, float time) { stateMachine = machine; targetState = toState; stunTime = time; }
public LogisticsManager(StateGetter StateGetter, ProductGetter ProductGetter) { _states = StateGetter; _products = ProductGetter; }