Skip to content

Commit

Permalink
code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed May 6, 2024
1 parent 5e23083 commit ecbf822
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Persistence/ByDataSourceReferenceHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class ByDataSourceReferenceHandler : ReferenceHandler
/// <summary>
/// The data source.
/// </summary>
private IDataSource<GameConfiguration> _dataSource;
private readonly IDataSource<GameConfiguration> _dataSource;

/// <summary>
/// Initializes a new instance of the <see cref="ByDataSourceReferenceHandler"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Persistence/ByDataSourceReferenceResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public ByDataSourceReferenceResolver(IDataSource<GameConfiguration> dataSource)
/// <inheritdoc />
public override void AddReference(string referenceId, object value)
{
//throw new NotImplementedException();
// do nothing here, because the data source is the source of truth.
}

/// <inheritdoc />
Expand Down
4 changes: 2 additions & 2 deletions src/Startup/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ private async Task<IHost> CreateHostAsync(string[] args)
var dataSource = new GameConfigurationDataSource(
provider.GetService<ILogger<GameConfigurationDataSource>>()!,
persistenceContextProvider!);
var configId = persistenceContextProvider!.CreateNewConfigurationContext().GetDefaultGameConfigurationIdAsync(default).GetAwaiter().GetResult();
dataSource.GetOwnerAsync(configId!.Value).GetAwaiter().GetResult();
var configId = persistenceContextProvider!.CreateNewConfigurationContext().GetDefaultGameConfigurationIdAsync(default).AsTask().WaitAndUnwrapException();
dataSource.GetOwnerAsync(configId!.Value).AsTask().WaitAndUnwrapException();
var referenceHandler = new ByDataSourceReferenceHandler(dataSource);
return referenceHandler;
})
Expand Down

0 comments on commit ecbf822

Please sign in to comment.