예제 #1
0
        public async Task ChangeGameProfileAsync(AggregateId profileId)
        {
            using (await IsolatedDatabaseAccess.Open())
            {
                if (_context.Games.All(game => game.Profiles.All(profile => profile.Id != profileId)))
                {
                    throw new AggregateRootNotFoundException($"game profile with id: {profileId} could not be found");
                }

                _context.LastEditedProfileId = profileId;
                _context.Commit();
            }
        }
 public async Task SaveAsync(TextureManagementSettings textureManagementSettings)
 {
     using (await IsolatedDatabaseAccess.Open())
     {
         _context.TextureConverterSettings = textureManagementSettings.Clone();
         _context.Commit();
     }
 }
예제 #3
0
 public async Task SaveAsync(ApplicationSettings applicationSettings)
 {
     using (await IsolatedDatabaseAccess.Open())
     {
         _context.ApplicationSettings = applicationSettings.Clone();
         _context.Commit();
     }
 }
예제 #4
0
 public async Task SaveAsync(UsageStatistics usageStatistics)
 {
     using (await IsolatedDatabaseAccess.Open())
     {
         _context.UsageStatistics = usageStatistics.Clone();
         _context.Commit();
     }
 }