Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
lcodes committed Sep 19, 2024
1 parent 521ef70 commit 8468e56
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public sealed class RemoteTables

public sealed class RemoteReducers : RemoteBase<DbConnection>
{
internal RemoteReducers(DbConnection conn) : base(conn) {}

public delegate void SendMessageHandler(EventContext ctx, string text);
public event SendMessageHandler? OnSendMessage;

Expand Down Expand Up @@ -73,11 +75,11 @@ public partial class EventContext : EventContextBase<RemoteTables, RemoteReducer
public class DbConnection : DbConnectionBase<DbConnection, EventContext>
{
public readonly RemoteTables RemoteTables = new();
public readonly RemoteReducers RemoteReducers = new();
public readonly RemoteReducers RemoteReducers;

public DbConnection()
{
RemoteReducers.Init(this);
RemoteReducers = new(this);

clientDB.AddTable<Message>();
clientDB.AddTable<User>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

<ItemGroup>
<ProjectReference Include="../../../SpacetimeDB.ClientSDK.csproj" />
<ProjectReference Include="..\..\..\..\stdb-module-cs\crates\bindings-csharp\BSATN.Codegen\BSATN.Codegen.csproj" OutputItemType="Analyzer" />
<ProjectReference Include="..\..\..\..\stdb-module-cs\crates\bindings-csharp\BSATN.Runtime\BSATN.Runtime.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/SpacetimeDBClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ struct ProcessedMessage
public ServerMessage message;
public List<DbOp> dbOps;
public DateTime timestamp;
public EventContext reducerEvent;
public EventContext? reducerEvent;
}

struct PreProcessedMessage
Expand Down
2 changes: 1 addition & 1 deletion src/Stubs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public EventContextBase(RemoteTables db, RemoteReducers reducers, TransactionUpd
}

public abstract class RemoteBase<DbConnection> {
protected DbConnection conn;
protected readonly DbConnection conn;

protected RemoteBase(DbConnection conn) {
this.conn = conn;
Expand Down

0 comments on commit 8468e56

Please sign in to comment.