PlayerIO

The fastest way to build online games without breaking a sweat.

Multiplayer Reference

Multiplayer  class documentationClass BuyItemInfo

Namespace: PlayerIO.GameLibrary
Language: C# / .NET

Represents information about the purchase of a PayVault item.

The minimum information necessary to create an instance of this class is an itemKey representing the PayVaultItem that should be purchased.

It is also possible to add a custom payload, and this data will always be present when reading the item from the user's Vault. For example: Imagine that we have a racing game and users should be able to buy different cars of different colors, but that color doesn't affect the price of the car. Instead of creating one PayVaultItem for each combination of type and color, we need only create one item for each type and give them a different price, and color can then be added in the payload when buying a car.

Setting the payload works exactly like manipulating a DatabaseObject from BigDB.

Properties

 
public int
Count  [read-only]

Returns the number of properties on this object

public ICollection<string>
Properties  [read-only]

Get the names of all properties on this object

Methods

 
public void
Clear ()

Removes all properties on this object

public bool
Contains (string propertyExpression)

Returns true if the given property exists on this object

public DatabaseArray
GetArray (string propertyExpression)

Get the given array property

public bool
GetBool (string propertyExpression)

Get the given bool property

public bool
GetBool (string propertyExpression, bool defaultValue)

Get the given bool property, falling back to the given default value if the bool property does not exist

public Byte[]
GetBytes (string propertyExpression)

Get the given byte array property

public Byte[]
GetBytes (string propertyExpression, Byte[] defaultValue)

Get the given byte array property, falling back to the given default value if the byte array property does not exist

public DateTime
GetDateTime (string propertyExpression)

Get the given datetime property

public DateTime
GetDateTime (string propertyExpression, DateTime defaultValue)

Get the given datetime property, falling back to the given default value if the datetime property does not exist

public Double
GetDouble (string propertyExpression)

Get the given double property

public Double
GetDouble (string propertyExpression, Double defaultValue)

Get the given double property, falling back to the given default value if the double property does not exist

public Single
GetFloat (string propertyExpression, Single defaultValue)

Get the given float property, falling back to the given default value if the float property does not exist

public Single
GetFloat (string propertyExpression)

Get the given float property

public int
GetInt (string propertyExpression, int defaultValue)

Get the given int property, falling back to the given default value if the int property does not exist

public int
GetInt (string propertyExpression)

Get the given int property

public Int64
GetLong (string propertyExpression)

Get the given long property

public Int64
GetLong (string propertyExpression, Int64 defaultValue)

Get the given long property, falling back to the given default value if the long property does not exist

public DatabaseObject
GetObject (string propertyExpression)

Get the given object property

public string
GetString (string propertyExpression, string defaultValue)

Get the given string property, falling back to the given default value if the string property does not exist

public string
GetString (string propertyExpression)

Get the given string property

public uint
GetUInt (string propertyExpression)

Get the given uint property

public uint
GetUInt (string propertyExpression, uint defaultValue)

Get the given uint property, falling back to the given default value if the uint property does not exist

public object
GetValue (string propertyExpression)

Get the given property as an object

public BuyItemInfo
Remove (string propertyExpression)

Removes the value of the given property from this object

public BuyItemInfo
Set (string propertyExpression, DateTime value)

Set the given property to the given datetime value

public BuyItemInfo
Set (string propertyExpression, Byte[] value)

Set the given property to the given byte array value

public BuyItemInfo
Set (string propertyExpression, DatabaseObject value)

Set the given property to the given object

public BuyItemInfo
Set (string propertyExpression, Single value)

Set the given property to the given float value

public BuyItemInfo
Set (string propertyExpression, DatabaseArray value)

Set the given property to the given array

public BuyItemInfo
Set (string propertyExpression, Int64 value)

Set the given property to the given long value

public BuyItemInfo
Set (string propertyExpression, uint value)

Set the given property to the given uint value

public BuyItemInfo
Set (string propertyExpression, int value)

Set the given property to the given int value

public BuyItemInfo
Set (string propertyExpression, Double value)

Set the given property to the given double value

public BuyItemInfo
Set (string propertyExpression, string value)

Set the given property to the given string value

public BuyItemInfo
Set (string propertyExpression, bool value)

Set the given property to the given bool value

BuyItemInfo.Count

public int
Count  [read-only]

Returns the number of properties on this object

BuyItemInfo.Properties

public ICollection<string>
Properties  [read-only]

Get the names of all properties on this object

BuyItemInfo.Clear

public void
Clear ()

Removes all properties on this object

BuyItemInfo.Contains

public bool
Contains (string propertyExpression)

Returns true if the given property exists on this object

Arguments

string propertyExpression

BuyItemInfo.GetArray

public DatabaseArray
GetArray (string propertyExpression)

Get the given array property

Arguments

string propertyExpression

BuyItemInfo.GetBool

public bool
GetBool (string propertyExpression)

Get the given bool property

Arguments

string propertyExpression

BuyItemInfo.GetBool

public bool
GetBool (string propertyExpression, bool defaultValue)

Get the given bool property, falling back to the given default value if the bool property does not exist

Arguments

string propertyExpression
bool defaultValue

BuyItemInfo.GetBytes

public Byte[]
GetBytes (string propertyExpression)

Get the given byte array property

Arguments

string propertyExpression

BuyItemInfo.GetBytes

public Byte[]
GetBytes (string propertyExpression, Byte[] defaultValue)

Get the given byte array property, falling back to the given default value if the byte array property does not exist

Arguments

string propertyExpression
Byte[] defaultValue

BuyItemInfo.GetDateTime

public DateTime
GetDateTime (string propertyExpression)

Get the given datetime property

Arguments

string propertyExpression

BuyItemInfo.GetDateTime

public DateTime
GetDateTime (string propertyExpression, DateTime defaultValue)

Get the given datetime property, falling back to the given default value if the datetime property does not exist

Arguments

string propertyExpression
DateTime defaultValue

BuyItemInfo.GetDouble

public Double
GetDouble (string propertyExpression)

Get the given double property

Arguments

string propertyExpression

BuyItemInfo.GetDouble

public Double
GetDouble (string propertyExpression, Double defaultValue)

Get the given double property, falling back to the given default value if the double property does not exist

Arguments

string propertyExpression
Double defaultValue

BuyItemInfo.GetFloat

public Single
GetFloat (string propertyExpression, Single defaultValue)

Get the given float property, falling back to the given default value if the float property does not exist

Arguments

string propertyExpression
Single defaultValue

BuyItemInfo.GetFloat

public Single
GetFloat (string propertyExpression)

Get the given float property

Arguments

string propertyExpression

BuyItemInfo.GetInt

public int
GetInt (string propertyExpression, int defaultValue)

Get the given int property, falling back to the given default value if the int property does not exist

Arguments

string propertyExpression
int defaultValue

BuyItemInfo.GetInt

public int
GetInt (string propertyExpression)

Get the given int property

Arguments

string propertyExpression

BuyItemInfo.GetLong

public Int64
GetLong (string propertyExpression)

Get the given long property

Arguments

string propertyExpression

BuyItemInfo.GetLong

public Int64
GetLong (string propertyExpression, Int64 defaultValue)

Get the given long property, falling back to the given default value if the long property does not exist

Arguments

string propertyExpression
Int64 defaultValue

BuyItemInfo.GetObject

public DatabaseObject
GetObject (string propertyExpression)

Get the given object property

Arguments

string propertyExpression

BuyItemInfo.GetString

public string
GetString (string propertyExpression, string defaultValue)

Get the given string property, falling back to the given default value if the string property does not exist

Arguments

string propertyExpression
string defaultValue

BuyItemInfo.GetString

public string
GetString (string propertyExpression)

Get the given string property

Arguments

string propertyExpression

BuyItemInfo.GetUInt

public uint
GetUInt (string propertyExpression)

Get the given uint property

Arguments

string propertyExpression

BuyItemInfo.GetUInt

public uint
GetUInt (string propertyExpression, uint defaultValue)

Get the given uint property, falling back to the given default value if the uint property does not exist

Arguments

string propertyExpression
uint defaultValue

BuyItemInfo.GetValue

public object
GetValue (string propertyExpression)

Get the given property as an object

Arguments

string propertyExpression

BuyItemInfo.Remove

public BuyItemInfo
Remove (string propertyExpression)

Removes the value of the given property from this object

Arguments

string propertyExpression

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, DateTime value)

Set the given property to the given datetime value

Arguments

string propertyExpression
DateTime value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, Byte[] value)

Set the given property to the given byte array value

Arguments

string propertyExpression
Byte[] value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, DatabaseObject value)

Set the given property to the given object

Arguments

string propertyExpression
DatabaseObject value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, Single value)

Set the given property to the given float value

Arguments

string propertyExpression
Single value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, DatabaseArray value)

Set the given property to the given array

Arguments

string propertyExpression
DatabaseArray value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, Int64 value)

Set the given property to the given long value

Arguments

string propertyExpression
Int64 value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, uint value)

Set the given property to the given uint value

Arguments

string propertyExpression
uint value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, int value)

Set the given property to the given int value

Arguments

string propertyExpression
int value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, Double value)

Set the given property to the given double value

Arguments

string propertyExpression
Double value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, string value)

Set the given property to the given string value

Arguments

string propertyExpression
string value

BuyItemInfo.Set

public BuyItemInfo
Set (string propertyExpression, bool value)

Set the given property to the given bool value

Arguments

string propertyExpression
bool value