コード例 #1
0
        private async Task ChangeGameProfileAsync(AggregateId gameProfileId)
        {
            using (new ProcessingScope(_processable))
            {
                _package = await _findGamePackageByIdQuery.FindByGameProfileIdAsync(gameProfileId);

                await InitializeInjectorModeAsync();

                Rebind();

                await _actionBuilder.Dispatch(new UpdateLastEditedGameProfileCommand(_package.GameProfile.Id))
                .CompleteFor <ActionSucceededNotification>(async(context, @event) => await PublishUpdateStatusEventAsync(StatusType.Ok, "GameProfileChanged", GameName, GameProfileName))
                .CompleteFor <ErrorOccuredNotification>(async(context, @event) => await PublishUnknownErrorEventAsync())
                .OnTimeout(async() => await PublishTimeoutEventAsync())
                .Execute();
            }
        }
コード例 #2
0
 public async Task <GamePackage> FindAsync()
 {
     using (await IsolatedDatabaseAccess.Open())
     {
         var id = _database.LastEditedGameProfileId;
         return(id.HasValue
                    ? await _query.FindByGameProfileIdAsync(id.Value)
                    : null);
     }
 }