Class DefaultSerializer
Standard serializer used by the GameNotificationsManager if no others are provided. Saves a simple binary format.
Namespace: NotificationSamples
Syntax
public class DefaultSerializer : IPendingNotificationsSerializer
Constructors
DefaultSerializer(String)
Instantiate a new instance of DefaultSerializer.
Declaration
public DefaultSerializer(string filename)
Parameters
Type | Name | Description |
---|---|---|
String | filename | The filename to save to. This should be an absolute path. |
Methods
Deserialize(IGameNotificationsPlatform)
Retrieve a saved list of pending notifications.
Declaration
public IList<IGameNotification> Deserialize(IGameNotificationsPlatform platform)
Parameters
Type | Name | Description |
---|---|---|
IGameNotificationsPlatform | platform |
Returns
Type | Description |
---|---|
IList<IGameNotification> | The deserialized collection of pending notifications, or null if the file did not exist. |
Implements
Serialize(IList<PendingNotification>)
Save a list of pending notifications.
Declaration
public void Serialize(IList<PendingNotification> notifications)
Parameters
Type | Name | Description |
---|---|---|
IList<PendingNotification> | notifications | The collection notifications to save. |