(EventContext ctx, User oldValue, User newValue)
| 111 | /// Our `User.OnUpdate` callback: |
| 112 | /// print a notification about name and status changes. |
| 113 | void User_OnUpdate(EventContext ctx, User oldValue, User newValue) |
| 114 | { |
| 115 | if (oldValue.Name != newValue.Name) |
| 116 | { |
| 117 | Console.WriteLine($"{UserNameOrIdentity(oldValue)} renamed to {newValue.Name}"); |
| 118 | } |
| 119 | if (oldValue.Online != newValue.Online) |
| 120 | { |
| 121 | if (newValue.Online) |
| 122 | { |
| 123 | Console.WriteLine($"{UserNameOrIdentity(newValue)} connected."); |
| 124 | } |
| 125 | else |
| 126 | { |
| 127 | Console.WriteLine($"{UserNameOrIdentity(newValue)} disconnected."); |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | /// Our `Message.OnInsert` callback: print new messages. |
| 133 | void Message_OnInsert(EventContext ctx, Message insertedValue) |
nothing calls this directly
no test coverage detected
searching dependent graphs…