forked from clockworklabs/SpacetimeDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClientConnected.g.cs
More file actions
50 lines (44 loc) · 1.62 KB
/
ClientConnected.g.cs
File metadata and controls
50 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
// This was generated using spacetimedb cli version 1.2.0 (commit fb41e50eb73573b70eea532aeb6158eaac06fae0).
#nullable enable
using System;
using SpacetimeDB.ClientApi;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace SpacetimeDB.Types
{
public sealed partial class RemoteReducers : RemoteBase
{
public delegate void ClientConnectedHandler(ReducerEventContext ctx);
public event ClientConnectedHandler? OnClientConnected;
public bool InvokeClientConnected(ReducerEventContext ctx, Reducer.ClientConnected args)
{
if (OnClientConnected == null)
{
if (InternalOnUnhandledReducerError != null)
{
switch (ctx.Event.Status)
{
case Status.Failed(var reason): InternalOnUnhandledReducerError(ctx, new Exception(reason)); break;
case Status.OutOfEnergy(var _): InternalOnUnhandledReducerError(ctx, new Exception("out of energy")); break;
}
}
return false;
}
OnClientConnected(
ctx
);
return true;
}
}
public abstract partial class Reducer
{
[SpacetimeDB.Type]
[DataContract]
public sealed partial class ClientConnected : Reducer, IReducerArgs
{
string IReducerArgs.ReducerName => "ClientConnected";
}
}
}