Пример #1
0
        public async Task <bool> CardSettingsEdited(List <CardSetting> cardSettings)
        {
            var meta = await _metaFactory.Create();

            var edited = new User.Events.CardSettingsEdited(meta, cardSettings.ToFList());
            var userId = await _userProvider.ForceId();

            var state = await _dexie.GetUserState(userId);

            return(await _transact(userId, User.decideCardSettingsEdited(edited, state)));
        }
Пример #2
0
        public async Task <bool> ChangeCardSetting(Guid cardSettingId, CardTemplatePointer pointer, Guid stackId)
        {
            var meta = await _metaFactory.Create();

            var cardSettingChanged = new Stack.Events.CardSettingChanged(meta, cardSettingId, pointer);
            var userId             = await _userProvider.ForceId();

            var user = await _dexie.GetUserState(userId);

            var state = await _dexie.GetStackState(stackId);

            return(await _transact(stackId, Stack.decideChangeCardSetting(cardSettingChanged, user, state)));
        }
Пример #3
0
        public async Task <Meta> Create()
        {
            var userId = await _userProvider.ForceId();

            return(new (null, _clock.GetCurrentInstant(), null, Guid.NewGuid(), userId));
        }