Class BodyToEventModel
- Namespace
- RustPlusApi.Fcm.Extensions
- Assembly
- RustPlusApi.Fcm.dll
Extension methods that project a Body into FCM event model types.
public static class BodyToEventModel
- Inheritance
-
BodyToEventModel
- Inherited Members
Methods
ToEntityEvent(Body)
Maps the notification body to an EntityEvent.
public static EntityEvent ToEntityEvent(this Body body)
Parameters
bodyBodyThe FCM notification body to map.
Returns
ToEntityId(Body)
Extracts the entity ID from the notification body.
public static ulong? ToEntityId(this Body body)
Parameters
bodyBodyThe FCM notification body to read from.
Returns
ToEntityType(Body)
Maps the raw numeric entity type to a known EntityType, or null when the value is absent or outside the defined set (e.g. a future or malformed type).
public static EntityType? ToEntityType(this Body body)
Parameters
bodyBodyThe FCM notification body to read from.
Returns
ToServerEvent(Body)
Maps the notification body to a ServerEvent.
public static ServerEvent ToServerEvent(this Body body)
Parameters
bodyBodyThe FCM notification body to map.