1- //HintName: FFI.cs
1+ //HintName: FFI.cs
22// <auto-generated />
33#nullable enable
44// The runtime already defines SpacetimeDB.Internal.LocalReadOnly in Runtime\Internal\Module.cs as an empty partial type.
@@ -17,7 +17,6 @@ namespace SpacetimeDB
1717{
1818 public sealed record ReducerContext : DbContext < Local > , Internal . IReducerContext
1919 {
20- public readonly Identity Sender ;
2120 public readonly ConnectionId ? ConnectionId ;
2221 public readonly Random Rng ;
2322 public readonly Timestamp Timestamp ;
@@ -29,6 +28,8 @@ public sealed record ReducerContext : DbContext<Local>, Internal.IReducerContext
2928 // We need this property to be non-static for parity with client SDK.
3029 public Identity Identity => Internal . IReducerContext . GetIdentity ( ) ;
3130
31+ private readonly Identity _sender ;
32+
3233 internal ReducerContext (
3334 Identity identity ,
3435 ConnectionId ? connectionId ,
@@ -37,14 +38,19 @@ internal ReducerContext(
3738 AuthCtx ? senderAuth = null
3839 )
3940 {
40- Sender = identity ;
41+ _sender = identity ;
4142 ConnectionId = connectionId ;
4243 Rng = random ;
4344 Timestamp = time ;
4445 SenderAuth = senderAuth ?? AuthCtx . BuildFromSystemTables ( connectionId , identity ) ;
4546 CounterUuid = 0 ;
4647 }
4748
49+ /// <summary>
50+ /// The identity of the client that invoked the reducer.
51+ /// </summary>
52+ public Identity Sender ( ) => _sender ;
53+
4854 /// <summary>
4955 /// Create a new random <see cref="Uuid"/> `v4` using the built-in RNG.
5056 /// </summary>
@@ -199,13 +205,18 @@ public sealed class Local : global::SpacetimeDB.LocalBase
199205
200206 public sealed record ViewContext : DbContext < Internal . LocalReadOnly > , Internal . IViewContext
201207 {
202- public Identity Sender { get ; }
208+ private readonly Identity _sender ;
203209
204210 internal ViewContext ( Identity sender , Internal . LocalReadOnly db )
205211 : base ( db )
206212 {
207- Sender = sender ;
213+ _sender = sender ;
208214 }
215+
216+ /// <summary>
217+ /// The identity of the client that invoked the view.
218+ /// </summary>
219+ public Identity Sender ( ) => _sender ;
209220 }
210221
211222 public sealed record AnonymousViewContext
0 commit comments