CultPong/Serverside Code/Multiplayer/Player.IO GameLibrary.xml
2020-09-25 07:12:38 +01:00

3331 lines
219 KiB
XML

<?xml version="1.0"?>
<doc>
<assembly>
<name>Player.IO GameLibrary</name>
</assembly>
<members>
<member name="T:PlayerIO.GameLibrary.PublishingNetwork">
<summary>
PlayerIO Publishing Network
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetwork.Profiles">
<summary>Access to the PlayerIO Publishing Network profiles</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetwork.Relations">
<summary>Access to the users PlayerIO Publishing Network relations</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetwork.UserToken">
<summary> A UserToken that can be used to authenticate as the current user.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetwork.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>Refresh Profiles and Relations.</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetwork.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Refresh Profiles and Relations.</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
<param name="errorCallback">Callback that will be called if the refresh fails.</param>
</member>
<member name="T:PlayerIO.GameLibrary.PublishingNetworkProfiles">
<summary>
The PlayerIO Publishing Network profile service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfiles.MyProfile">
<summary>The profile of the current user</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetworkProfiles.LoadProfiles(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PublishingNetworkProfile[]})">
<summary>Load a set of PlayerIO Publishing Network profiles</summary>
<param name="userIds">The userIds of the profiles to load.</param>
<param name="successCallback">Callback that will be called with the loaded profiles.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetworkProfiles.LoadProfiles(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PublishingNetworkProfile[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Load a set of PlayerIO Publishing Network profiles</summary>
<param name="userIds">The userIds of the profiles to load.</param>
<param name="successCallback">Callback that will be called with the loaded profiles.</param>
<param name="errorCallback">Callback that will be called if the load fails.</param>
</member>
<member name="T:PlayerIO.GameLibrary.PublishingNetworkProfile">
<summary>A PlayerIO Publishing Network profile </summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfile.UserId">
<summary>The userId of the user</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfile.DisplayName">
<summary>The displayname of the user</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfile.AvatarUrl">
<summary>The url to the avatar of the user</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfile.LastOnline">
<summary>When was this user last seen</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkProfile.CountryCode">
<summary>The country code of the user</summary>
</member>
<member name="T:PlayerIO.GameLibrary.PublishingNetworkRelations">
<summary>
The PlayerIO Publishing Network relations service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PublishingNetworkRelations.Friends">
<summary>List of all friends</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetworkRelations.IsFriend(System.String)">
<summary>Check if a specific user is a friend</summary>
<param name="userId">The userId of the user to check.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PublishingNetworkRelations.IsBlocked(System.String)">
<summary>Check if a specific user is blocked</summary>
<param name="userId">The userId of the user to check.</param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)">
<summary>
Inserts a cache entry into the cache by using a key and a value. A cache entry will never expire based on an absolute point in time, but it can be evicted from the cache by memory pressure in the server.
Will always put a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated.
</summary>
<param name="key">A unique identifier for the cache entry to insert.</param>
<param name="value">The data for the cache entry. Please note that you cannot store any PlayerIO objects with the only exception of DatabaseObject and DatabaseArray.</param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object,System.TimeSpan)">
<summary>
Inserts a cache entry into the cache by using a key and a value. A cache entry will expire based on an absolute point in time, but it can be evicted before that from the cache by memory pressure in the server.
Will always put a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated.
</summary>
<param name="key">A unique identifier for the cache entry to insert.</param>
<param name="value">The data for the cache entry. Please note that you cannot store any PlayerIO objects with the only exception of DatabaseObject and DatabaseArray.</param>
<param name="expiration">The amount of time the cache should be kept in memory.</param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Get(System.String)">
<summary>
Returns an entry from the cache.
</summary>
<param name="key">A unique identifier for the cache entry to get.</param>
<returns>A reference to the cache entry that is identified by key, if the entry exists; otherwise, null.</returns>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Get(System.String,System.Action{System.Action{System.Object}},System.Action{System.Object})">
<summary>
Reads a value from cache. If value is available in the cache <paramref name="done"/> is called at once (<paramref name="load"/> is not called in this case).
If value is not available in cache <paramref name="load"/> is called. Inside load you need to call the delegate Action{System.Object} you receive as parameter when value is finally retrieved
(you will likely retrieve value from an external asynchronous data source like BigDB or Web)
At this point <paramref name="done"/> delegate will be called. It will receive the retrieved value as a parameter.
If multiple calls to Get are received while the cache key is not available, delegate <paramref name="load"/> is guaranteed to be called only once.
Each call to Get will have its <paramref name="done"/> delegate called when data is finally retrieved by your logic in <paramref name="load"/> delegate.
</summary>
<example>
This example loads a value from ServerCache if available. Otherwise it loads it from BigDB
<code>
<![CDATA[
class MyGame : PlayerIO.GameLibrary.Game<PlayerIO.GameLibrary.BasePlayer> {
public override void GameStarted() {
ServerCache.Get("myKey", loaded => {
//myKey was not found in ServerCache. Go and key value from outside source, in this case BigDB.
PlayerIO.BigDB.LoadOrCreate("myTable", "myKey", dbObj => {
//got value now. call loaded so it is stored in ServerCache and have 'done' delegate called (see below)
loaded(dbObj);
}, bigdbError => {
//could not get value from BigDB. Call loaded(null) to clean resources
loaded(null);
});
}, TimeSpan.FromMinutes(30), cachedVal => {
//got value! run logic that uses value.
//no need to check for cachedVal != null since this callback will not be called in this case.
//...
}, error => {
//this code will never be executed. would only execute if 'loaded' delegate is called with a value not allowed in ServerCache.
//We called 'loaded' delegate with a DatabaseObject, which is allowed in ServerCache
});
}
}
]]>
</code>
</example>
<param name="key">A unique identifier for the cache entry to get.</param>
<param name="load">This delegate is called if <paramref name="key"/> is not found in the cache. You need to provide code to load a value from an external source, i.e. BigDB or web resource.
When you receive this value you need to call the parameter of type Action{System.Object} that you receive in <paramref name="load"/></param>
<see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)"/> will be called to permanently store value in cache/>
<param name="done">Called at once if <paramref name="key"/> exists in cache or when it is finally retrieved via <paramref name="load"/> delegate</param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Get(System.String,System.Action{System.Action{System.Object}},System.Action{System.Object},System.Action{System.Exception})">
<summary>
Provides an extra param for <see cref="M:PlayerIO.GameLibrary.ServerCache.Get(System.String,System.Action{System.Action{System.Object}},System.Action{System.Object})"/>.
</summary>
<param name="key">A unique identifier for the cache entry to get.</param>
<param name="load">This delegate is called if <paramref name="key"/> is not found in the cache. You need to provide code to load a value from an external source, i.e. BigDB or web resource.
When you receive this value you need to call the parameter of type Action{System.Object} that you receive in <paramref name="load"/></param>
<see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)"/> will be called to permanently store value in cache/>
<param name="done">Called at once if <paramref name="key"/> exists in cache or when it is finally retrieved via <paramref name="load"/> delegate</param>
<param name="error">Called if value retrieved from <paramref name="load"/> is not permitted in cache. See <see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)"/></param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Get(System.String,System.Action{System.Action{System.Object}},System.TimeSpan,System.Action{System.Object},System.Action{System.Exception})">
<summary>
Provides an extra param for <see cref="M:PlayerIO.GameLibrary.ServerCache.Get(System.String,System.Action{System.Action{System.Object}},System.Action{System.Object},System.Action{System.Exception})"/>.
</summary>
<param name="key">A unique identifier for the cache entry to get.</param>
<param name="load">This delegate is called if <paramref name="key"/> is not found in the cache. You need to provide code to load a value from an external source, i.e. BigDB or web resource.
When you receive this value you need to call the parameter of type Action{System.Object} that you receive in <paramref name="load"/></param>
<see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)"/> will be called to permanently store value in cache/>
<param name="expiration">Use to call <see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object,System.TimeSpan)"/> with the value retrieved from <paramref name="load"/></param>
<param name="done">Called at once if <paramref name="key"/> exists in cache or when it is finally retrieved via <paramref name="load"/> delegate</param>
<param name="error">Called if value retrieved from <paramref name="load"/> is not permitted in cache. See <see cref="M:PlayerIO.GameLibrary.ServerCache.Set(System.String,System.Object)"/></param>
</member>
<member name="M:PlayerIO.GameLibrary.ServerCache.Remove(System.String)">
<summary>
Removes entry from cache.
</summary>
<param name="key">A unique identifier for the cache entry to get.</param>
<returns>A reference to the cache entry that is identified by key, if the entry exists; otherwise, null.</returns>
</member>
<member name="T:PlayerIO.GameLibrary.Achievements">
<summary>
The Player.IO Achievements service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievements.MyAchievements">
<summary>The list of all achievements; the values of Progress and ProgressGoal will indicate whether the achievement is started/pending/complete.</summary>
</member>
<member name="E:PlayerIO.GameLibrary.Achievements.OnComplete">
<summary>Event fired whenever an achievement is completed by a call to ProgressXXX().</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.AddOnComplete(PlayerIO.GameLibrary.AchievementCompletedEventHandler)">
<summary>Add a handler to the OnComplete event</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.Get(System.String)">
<summary>
This method gets the specified achievement
</summary>
<param name="achievementId">The id of the achievement to get</param>
<returns>The achievement, if found, otherwise null.</returns>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>
Refreshes MyAchievements
</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Refreshes MyAchievements
</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.Load(System.String[],PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,PlayerIO.GameLibrary.Achievement[]}})">
<summary>Load achivements for the specified users.</summary>
<param name="userIds">Array of userIds to load achivements for.</param>
<param name="successCallback">Callback that will be called with a dictionary where the keys are userIds and the values are their achievments.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.Load(System.String[],PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,PlayerIO.GameLibrary.Achievement[]}},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Load achivements for the specified users.</summary>
<param name="userIds">Array of userIds to load achivements for.</param>
<param name="successCallback">Callback that will be called with a dictionary where the keys are userIds and the values are their achievments.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressSet(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement})">
<summary>Sets the progress of the specified achievement.</summary>
<param name="achievementId">The id of the achievement to add progress to.</param>
<param name="progress">The new progress value for the achievement.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressSet(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Sets the progress of the specified achievement.</summary>
<param name="achievementId">The id of the achivement to add progress to.</param>
<param name="progress">The new progress value for the achievement.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressAdd(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement})">
<summary>Add or subtract from the current progress of an achievement.</summary>
<param name="achievementId">The id of the achievement to add progress to.</param>
<param name="progressDelta">The delta value that will be added to the current progress of the achievement.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressAdd(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Add or subtract from the current progress of an achievement.</summary>
<param name="achievementId">The id of the achivement to add progress to.</param>
<param name="progressDelta">The delta value that will be added to the current progress of the achievement.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressMax(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement})">
<summary>Sets the current progress value to the bigger value of progress or the current value, i.e; newProgress = Max(currentProgress,progress)</summary>
<param name="achievementId">The id of the achievement to work on.</param>
<param name="progress">The possible new progress value that should be compared to the current progress value</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressMax(System.String,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Sets the current progress value to the bigger value of progress or the current value, i.e; newProgress = Max(currentProgress,progress)</summary>
<param name="achievementId">The id of the achivement to work on.</param>
<param name="progress">The possible new progress value that should be compared to the current progress value</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressComplete(System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement})">
<summary>Complete the specified achievement, by setting the progress to the maximum (ProgressGoal) of the achievement.</summary>
<param name="achievementId">The id of the achievement to complete.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Achievements.ProgressComplete(System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.Achievement},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Complete the specified achievement, by setting the progress to the maximum (ProgressGoal) of the achievement.</summary>
<param name="achievementId">The id of the achivement to complete.</param>
<param name="successCallback">Callback that will be called with the updated Achievement.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="T:PlayerIO.GameLibrary.Achievement">
<summary>An Achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.Id">
<summary>The id of the achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.Title">
<summary>The title of the achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.Description">
<summary>The description</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.ImageUrl">
<summary>A url to the image of the achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.Progress">
<summary>Current progress made towards the ProgressGoal of this achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.ProgressGoal">
<summary>The progress value to reach to complete the achievement</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.LastUpdated">
<summary>Last updated time, in UTC</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.ProgressRatio">
<summary>A value in the range [0:1] indicating the progress made towards completion.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Achievement.Completed">
<summary>True when Progress==ProgressGoal</summary>
</member>
<member name="T:PlayerIO.GameLibrary.BigDB">
<summary>
The Player.IO BigDB service.
<para>This class is used to create, load, and delete database objects. All database objects are stored in tables and have a unique key.
You can set up tables in your admin panel, and you can also set up indexes there for when you want to load objects by properties
or ranges of properties. Please note that all methods are asynchronous and any handling of results have to be done in a callback.
If you don't care about the results of a method call, typically for create or delete functions, you can just pass in a null callback.</para>
<para>Here's how to store and update an object:</para>
<code>
//Make new object and set some properties
DatabaseObject obj = new DatabaseObject();
obj.Set("username", "Adam");
obj.Set("location", "London");
obj.Set("age", 20);
//Create object in table Users with ConnectUserId as key
PlayerIO.BigDB.CreateObject("Users", ConnectUserId, obj,
delegate (DatabaseObject result){
//Change a property and store the update when created
result.Set("location", "Paris");
result.Save(null);
}
);
</code>
<para>This is how you load an object:</para>
<code>
PlayerIO.BigDB.Load("Users", ConnectUserId, delegate (DatabaseObject result){
if (result != null) {
//Change a property and save back.
result.Set("location", "Amsterdam");
result.Save(null);
}
});
</code>
<para>In case you always want to modify an object, you can use the LoadOrCreate method to ensure you get an object back:</para>
<code>
PlayerIO.BigDB.LoadOrCreate("Users", ConnectUserId,
delegate (DatabaseObject result){
if (!result.Contains("username")) {
//Empty object, initialize it
result.Set("username", "Charlie");
result.Set("age", 20);
}
result.Set("location", "London");
result.Save();
}
);
</code>
<para>
BigDB also supports indexes for retrieving objects by a specific property, a range of properties,
or to sort objects by properties. Indexes need to be set up in the admin panel for each table,
each index needs a name, and a list of properties, and for each property you also need to specify a
sort order.
</para>
<para>Imagine that we have objects that look like this:</para>
<code>
{
username:"Adam",
created:2010-05-12 15:28
location:"London",
age:20,
}
</code>
<para>That we have defined an index called "ByUsername" that looks like this:
<ul>
<li>{Property:"username", Type:String, Order:Ascending}</li>
</ul>
</para>
<para>And an index called "ByCreated" that looks like this:
<ul>
<li>{Property:"created", Type:Datetime, Order:Descending}</li>
</ul>
</para>
<para>Then we can do lookups like these:</para>
<code>
//Get the object where username="Adam"
PlayerIO.BigDB.LoadSingle("Users", "ByUsername", new object[]{"Adam"},
delegate(DatabaseObject result) {
//...
}
);
//Get all users with usernames between "Adam" and "Charlie".
//This would retrieve users named "Adamsson" and "Barney",
//but not users named "Abel" or "Charlotte".
PlayerIO.BigDB.LoadRange("Users", "ByUsername", null, "Adam", "Charlie", 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Get all users up to and including "Adam". This would retrieve
//users named "Aaron" and "Ackerman", but not "Adamsson" or "Barney".
PlayerIO.BigDB.LoadRange("Users", "ByUsername", null, null, "Adam", 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Get all users from "Xerxes". This would retrieve users named
//"Yngwie" and "Zed", but not "Charlie" or "Xantippa".
PlayerIO.BigDB.LoadRange("Users", "ByUsername", null, "Xerxes", null, 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Retrieve the ten first objects by the ByCreated index.
//Since that index is sorted in descending order, this will actually
//retrieve the 10 latest created users.
PlayerIO.BigDB.LoadRange("Users", "ByCreated", null, null, null, 10,
delegate(DatabaseObject[] result) {
//...
}
);
//Get the 10 latest users that were created more than 7 days ago.
var weekago = DateTime.Now.AddDays(-7);
PlayerIO.BigDB.LoadRange("Users", "ByCreated", null, weekago, null, 10,
delegate(DatabaseObject[] result) {
//...
}
);
</code>
<para>
BigDB also supports compound indexes, that is indexes with more than one property. Given our example object above, we can create an index called "ByLocationAgeCreated" that looks like this:
<ul>
<li>{Property:"location", Type:String, Order:Ascending}</li>
<li>{Property:"age", Type:Integer, Order:Ascending}</li>
<li>{Property:"created", Type:Datetime, Order:Descending}</li>
</ul>
</para>
<para>
With this index, we can then lookup on either location, or location and age, or location and age and created. If we use more than one property in the lookup, we can only specify the range for the last one, the preceding ones have to be fixed and are sent in via the path parameter.
</para>
<code>
//Load all users where location is "London"
PlayerIO.BigDB.LoadRange("Users", "ByLocationAgeCreated", null, "London",
"London", 100, delegate(DatabaseObject[] result) {
//...
}
);
//Load all users from London between 20 and 30 years of age
PlayerIO.BigDB.LoadRange("Users", "ByLocationAgeCreated",
new object[]{"London"}, 20, 30, 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Load all users from London that are above 50
PlayerIO.BigDB.LoadRange("Users", "ByLocationAgeCreated",
new object[]{"London"}, 50, null, 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Load all users from Paris that are 30 years old, and were created in April
PlayerIO.BigDB.LoadRange("Users", "ByLocationAgeCreated",
new object[]{"Paris", 30}, new DateTime(2010, 4, 1),
new DateTime(2010, 4, 30), 100,
delegate(DatabaseObject[] result) {
//...
}
);
//Load the 10 latest 20-year old users from Amsterdam
PlayerIO.BigDB.LoadRange("Users", "ByLocationAgeCreated",
new object[]{"Amsterdam", 20}, null, null, 10,
delegate(DatabaseObject[] result) {
//...
}
);
</code>
<para>Finally, deleting objects is as easy as calling the DeleteKeys method, or DeleteRange if you want to delete by an index.</para>
<code>
//Delete current Users object.
PlayerIO.BigDB.DeleteKeys("Users", ConnectUserId, null);
//Delete all objects with usernames between "Adam" and "Charle"
PlayerIO.BigDB.DeleteRange("Users", "ByUsername", null, "Adam",
"Charlie", null);
//Delete all objects with created older than one year
PlayerIO.BigDB.DeleteRange("Users", "ByUsername", null,
DateTime.Now.AddYear(-1), null, null);
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.CreateObject(System.String,System.String,PlayerIO.GameLibrary.DatabaseObject,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject})">
<summary>Creates a new database object in the given table with the specified key. If no key is specified (null), the object will receive an autogenerated id.</summary>
<param name="table">The name of the table to create the database object in</param>
<param name="key">The key to assign to the database object</param>
<param name="obj">The database object to create in the table</param>
<param name="successCallback">Callback to execute when the object has been created with a new instance of DatabaseObject from which .Save() can be called for future modifications.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.CreateObject(System.String,System.String,PlayerIO.GameLibrary.DatabaseObject,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Creates a new database object in the given table with the specified key. If no key is specified (null), the object will receive an autogenerated id.</summary>
<param name="table">The name of the table to create the database object in</param>
<param name="key">The key to assign to the database object</param>
<param name="obj">The database object to create in the table</param>
<param name="successCallback">Callback that will be called with a new instance of DatabaseObject from which .Save() can be called for future modifications when the object has been created.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the object creation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.Load(System.String,System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject})">
<summary>Load the database object with the given key from the given table.</summary>
<param name="table">The table to load the database object from</param>
<param name="key">The key of the database object to load</param>
<param name="successCallback">Callback with the loaded database object</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.Load(System.String,System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Load the database object with the given key from the given table.</summary>
<param name="table">The table to load the database object from</param>
<param name="key">The key of the database object to load</param>
<param name="successCallback">Callback with the loaded database object or null if no object exists with the given key</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadOrCreate(System.String,System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject})">
<summary>Loads or creates the database object with the given key from the given table.</summary>
<param name="table">The table from which to load or create the database object</param>
<param name="key">The key of the database object to load or create</param>
<param name="successCallback">Callback with the database object</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadOrCreate(System.String,System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Loads or creates the database object with the given key from the given table.</summary>
<param name="table">The table from which to load or create the database object</param>
<param name="key">The key of the database object to load or create</param>
<param name="successCallback">Callback with the database object</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load or create.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadKeys(System.String,System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]})">
<summary>Loads the database objects with the given keys from the given table.</summary>
<param name="table">The table to load the database objects from</param>
<param name="keys">They keys of the database objects to load</param>
<param name="successCallback">Callback with an array of database objects in the same order as the keys array, with null values for non-existant database objects</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadKeys(System.String,System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Loads the database objects with the given keys from the given table.</summary>
<param name="table">The table to load the database objects from</param>
<param name="keys">They keys of the database objects to load</param>
<param name="successCallback">Callback with an array of database objects in the same order as the keys array, with null values for non-existant database objects</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadKeysOrCreate(System.String,System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]})">
<summary>Loads or creates database objects with the given keys from the given table. New objects are created if there are no existing objects for the given keys.</summary>
<param name="table">The table to load the database objects from</param>
<param name="keys">They keys of the database objects to load</param>
<param name="successCallback">Callback with an array of database objects in the same order as the keys array</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadKeysOrCreate(System.String,System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Loads or creates database objects with the given keys from the given table. New objects are created if there are no existing objects for the given keys.</summary>
<param name="table">The table to load the database objects from</param>
<param name="keys">They keys of the database objects to load</param>
<param name="successCallback">Callback with an array of database objects in the same order as the keys array</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load or create.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadSingle(System.String,System.String,System.Object[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject})">
<summary>Load a database object from a table using the specified index.</summary>
<param name="table">The table to load the database object from</param>
<param name="index">The name of the index to query for the database object</param>
<param name="indexValue">An array of objects of the same types as the index properties, specifying which object to load</param>
<param name="successCallback">Callback with the database object found, or null if no object was found</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadSingle(System.String,System.String,System.Object[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Load a database object from a table using the specified index.</summary>
<param name="table">The table to load the database object from</param>
<param name="index">The name of the index to query for the database object</param>
<param name="indexValue">An array of objects of the same types as the index properties, specifying which object to load</param>
<param name="successCallback">Callback with the database object found, or null if no object was found</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadRange(System.String,System.String,System.Object[],System.Object,System.Object,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]})">
<summary>Load a range of database objects from a table using the specified index.</summary>
<param name="table">The table to load the database object from</param>
<param name="index">The name of the index to query for the database object</param>
<param name="indexPath">Where in the index to start the range search: An array of objects of the same types as the index properties, specifying where in the index to start loading database objects from. For instance, in the index [Mode,Map,Score] you might use new object[]{"expert","skyland"} as the indexPath and use the start and stop arguments to determine the range of scores you wish to return. IndexPath can be set to null if there is only one property in the index.</param>
<param name="start">Where to start the range search. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then start defines the minimum score to include in the results</param>
<param name="stop">Where to stop the range search. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then stop defines the maximum score to include in the results</param>
<param name="limit">The max amount of objects to return</param>
<param name="successCallback">Callback with the database objects found.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.LoadRange(System.String,System.String,System.Object[],System.Object,System.Object,System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Load a range of database objects from a table using the specified index.</summary>
<param name="table">The table to load the database object from</param>
<param name="index">The name of the index to query for the database object</param>
<param name="indexPath">Where in the index to start the range search: An array of objects of the same types as the index properties, specifying where in the index to start loading database objects from. For instance, in the index [Mode,Map,Score] you might use new object[]{"expert","skyland"} as the indexPath and use the start and stop arguments to determine the range of scores you wish to return. IndexPath can be set to null if there is only one property in the index.</param>
<param name="start">Where to start the range search. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then start defines the minimum score to include in the results</param>
<param name="stop">Where to stop the range search. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then stop defines the maximum score to include in the results</param>
<param name="limit">The max amount of objects to return</param>
<param name="successCallback">Callback with the database objects found.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the load.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.SaveChanges(System.Boolean,System.Boolean,PlayerIO.GameLibrary.DatabaseObject[],PlayerIO.GameLibrary.Callback)">
<summary>Save changes to one or more database objects in one go.</summary>
<param name="useOptimisticLocks">Should the save only go through, if no other process has modified the object since it was loaded?</param>
<param name="fullOverwrite">Overwrite the stored object with the data from this object instead of only sending in the changed properties</param>
<param name="objects">The objects with changes to save</param>
<param name="successCallback">Callback with true if the save succeded and false if it failed (only if using optimistic locking and newer version exists in database)</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.SaveChanges(System.Boolean,System.Boolean,PlayerIO.GameLibrary.DatabaseObject[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Save changes to one or more database objects in one go.</summary>
<param name="useOptimisticLocks">Should the save only go through, if no other process has modified the object since it was loaded?</param>
<param name="fullOverwrite">Overwrite the stored object with the data from this object instead of only sending in the changed properties</param>
<param name="objects">The objects with changes to save</param>
<param name="successCallback">Callback with true if the save succeded and false if it failed (only if using optimistic locking and newer version exists in database)</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the save.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteKeys(System.String,System.String[])">
<summary>Delete a set of database objects from a table</summary>
<param name="table">The table to delete the database objects from</param>
<param name="keys">The keys of the database objects to delete</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteKeys(System.String,System.String[],PlayerIO.GameLibrary.Callback)">
<summary>Delete a set of database objects from a table</summary>
<param name="table">The table to delete the database objects from</param>
<param name="keys">The keys of the database objects to delete</param>
<param name="successCallback">Callback when the deletion has completed.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteKeys(System.String,System.String[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Delete a set of database objects from a table</summary>
<param name="table">The table to delete the database objects from</param>
<param name="keys">The keys of the database objects to delete</param>
<param name="successCallback">Callback when the deletion has completed.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the deletion.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteRange(System.String,System.String,System.Object[],System.Object,System.Object)">
<summary>Delete a range of database objects from a table using an index</summary>
<param name="table">The table to delete the database object from</param>
<param name="index">The name of the index to query for the database objects to delete</param>
<param name="indexPath">Where in the index to start the range delete: An array of objects of the same types as the index properties, specifying where in the index to start loading database objects from. For instance, in the index [Mode,Map,Score] you might use new object[]{"expert","skyland"} as the indexPath and use the start and stop arguments to determine the range of scores you wish to delete. IndexPath can be set to null instead of an empty array.</param>
<param name="start">Where to start the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then start defines the minimum score to delete</param>
<param name="stop">Where to stop the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then stop defines the maximum score to delete</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteRange(System.String,System.String,System.Object[],System.Object,System.Object,PlayerIO.GameLibrary.Callback)">
<summary>Delete a range of database objects from a table using an index</summary>
<param name="table">The table to delete the database object from</param>
<param name="index">The name of the index to query for the database objects to delete</param>
<param name="indexPath">Where in the index to start the range delete: An array of objects of the same types as the index properties, specifying where in the index to start loading database objects from. For instance, in the index [Mode,Map,Score] you might use new object[]{"expert","skyland"} as the indexPath and use the start and stop arguments to determine the range of scores you wish to delete. IndexPath can be set to null instead of an empty array.</param>
<param name="start">Where to start the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then start defines the minimum score to delete</param>
<param name="stop">Where to stop the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then stop defines the maximum score to delete</param>
<param name="successCallback">Callback when the deletion has completed.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BigDB.DeleteRange(System.String,System.String,System.Object[],System.Object,System.Object,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Delete a range of database objects from a table using an index</summary>
<param name="table">The table to delete the database object from</param>
<param name="index">The name of the index to query for the database objects to delete</param>
<param name="indexPath">Where in the index to start the range delete: An array of objects of the same types as the index properties, specifying where in the index to start loading database objects from. For instance, in the index [Mode,Map,Score] you might use new object[]{"expert","skyland"} as the indexPath and use the start and stop arguments to determine the range of scores you wish to delete. IndexPath can be set to null instead of an empty array.</param>
<param name="start">Where to start the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then start defines the minimum score to delete</param>
<param name="stop">Where to stop the range delete. For instance, if the index is [Mode,Map,Score] and indexPath is ["expert","skyland"], then stop defines the maximum score to delete</param>
<param name="successCallback">Callback when the deletion has completed.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the deletion.</param>
</member>
<member name="T:PlayerIO.GameLibrary.DatabaseArray">
<summary>
Represents an BigDB array of values that can be accessed by index.
<para>DatabaseArray is very similar to the DatabaseObject class since it has methods for getting, setting, checking and removing values. But unlike DatabaseObject, this class also has methods for adding and inserting values, and there is no Save method, since these cannot be saved to a BigDB table, they always have to be a property of an object.</para>
<para>If we for example have an object that can be visualized like this:</para>
<code>
'car54321' = {
Name: 'OldSpeedy',
LatestLapTimes: [
{
Time:'20:34',
Position:1
},
{
Time:'22:03',
Position:4
},
{
Time:'22:30',
Position:5
}
]
}
</code>
<para>Then we would create it in BigDB like this:</para>
<code>
//Create new object
DatabaseObject car = new DatabaseObject();
car.Set("Name", "OldSpeedy");
//Make laptimes
DatabaseObject laptime1 = new DatabaseObject();
laptime1.Set("Time", "20:34");
laptime1.Set("Position", 1);
DatabaseObject laptime2 = new DatabaseObject();
laptime2.Set("Time", "22:03");
laptime2.Set("Position", 4);
DatabaseObject laptime3 = new DatabaseObject();
laptime3.Set("Time", "22:30");
laptime3.Set("Position", 5);
//Make array and add laptimes
DatabaseArray laptimes = new DatabaseArray();
laptimes.Add(laptime1);
laptimes.Add(laptime2);
laptimes.Add(laptime3);
//Add array to car object
car.Set("LatestLapTimes", laptimes);
//Save car to table "Cars" under key "car54321"
PlayerIO.BigDB.CreateObject("Cars", "car54321", car, null);
</code>
<para>However, just like DatabaseObject, DatabaseArray also supports nested property names, and we can refer to values in the array with their index number. Using this, we can make the example object in an easier way, like this:</para>
<code>
DatabaseObject car = new DatabaseObject();
car.Set("Name", "OldSpeedy");
car.Set("LatestLapTimes", new DatabaseArray());
car.Set("LatestLapTimes.0.Time", "20:34");
car.Set("LatestLapTimes.0.Position", 1);
car.Set("LatestLapTimes.1.Time", "22:03");
car.Set("LatestLapTimes.1.Position", 4);
car.Set("LatestLapTimes.2.Time", "22:30");
car.Set("LatestLapTimes.2.Position", 5);
</code>
<para>Getting values works exactly like for DatabaseObject, and we can also use nested properties.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car54321", delegate(DatabaseObject car) {
//Get position from first laptime
DatabaseArray laptimes = car.GetArray("LatestLapTimes");
DatabaseObject laptime = laptimes.GetObject(0);
int position = laptime.GetInt("Position");
//Get position from second laptime
int position2 = laptimes.GetInt("1.Position");
//Or get position from third laptime directly
int position3 = car.GetInt("LatestLapTimes.2.Position");
});
</code>
<para>In addition to getting and setting values, we can also add values to the end of the array, insert values in the middle of it, or remove values in the middle of it. Note that the arrays are sparse, this means that removing a value doesn't shift the indexes of the following values, and we can set any value beyond the last value of the array.</para>
<code>
DatabaseArray arr = new DatabaseArray();
//We make an array like this: ['a', 'c']
arr.Add("a");
arr.Add("c");
//Now it will look like this: ['a', 'c', 'd']
arr.Add("d");
//We insert a value where c is to get this: ['a', 'b', 'c', 'd']
arr.Insert(1, "b");
//If we then remove the third value we get this: ['a', 'b', null, 'd']
arr.RemoveAt(2);
//Finally, we set the sixth value and get: ['a', 'b', null, 'd', null, 'f']
arr.Set(5, "f");
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.#ctor">
<summary>DatabaseArray constructor</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseArray.Count">
<summary>
Returns the number of values in this array.
If set to a smaller number than the current count, it will truncate the array.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Clear">
<summary>Remove all values from this array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.RemoveAt(System.Int32)">
<summary>Remove the value at the given index</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseArray.Item(System.Int32)">
<summary>Get the value at the given index as an object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseArray.Indexes">
<summary>Returns an enumerator that iterates over the indexes in this array that contain values.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseArray.IndexesAndValues">
<summary>Returns an enumerator that iterates over all the indexes and values in this array.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Contains(System.Int32)">
<summary>Returns true if a value exists at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetValue(System.Int32)">
<summary>Get the value at the given index as an object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetString(System.Int32)">
<summary>Get the string value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetString(System.Int32,System.String)">
<summary>Get the string value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetInt(System.Int32)">
<summary>Get the int value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetInt(System.Int32,System.Int32)">
<summary>Get the int value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetUInt(System.Int32)">
<summary>Get the uint value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetUInt(System.Int32,System.UInt32)">
<summary>Get the uint value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetLong(System.Int32)">
<summary>Get the long value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetLong(System.Int32,System.Int64)">
<summary>Get the long value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBool(System.Int32)">
<summary>Get the bool value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBool(System.Int32,System.Boolean)">
<summary>Get the bool value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetFloat(System.Int32)">
<summary>Get the float value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetFloat(System.Int32,System.Single)">
<summary>Get the float value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDouble(System.Int32)">
<summary>Get the double value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDouble(System.Int32,System.Double)">
<summary>Get the double value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBytes(System.Int32)">
<summary>Get the byte array value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBytes(System.Int32,System.Byte[])">
<summary>Get the byte value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDateTime(System.Int32)">
<summary>Get the datetime value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDateTime(System.Int32,System.DateTime)">
<summary>Get the datetime value at the given index, falling back to the given default value if the value was at the index is null</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetObject(System.Int32)">
<summary>Get the object at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetArray(System.Int32)">
<summary>Get the array at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.String)">
<summary>Set the value at the given index to the given string</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Int32)">
<summary>Set the value at the given index to the given int</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.UInt32)">
<summary>Set the value at the given index to the given uint</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Int64)">
<summary>Set the value at the given index to the given long</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Boolean)">
<summary>Set the value at the given index to the given bool</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Single)">
<summary>Set the value at the given index to the given float</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Double)">
<summary>Set the value at the given index to the given double</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.Byte[])">
<summary>Set the value at the given index to the given byte array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,System.DateTime)">
<summary>Set the value at the given index to the given datetime</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,PlayerIO.GameLibrary.DatabaseObject)">
<summary>Set the value at the given index to the given object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.Int32,PlayerIO.GameLibrary.DatabaseArray)">
<summary>Set the value at the given index to the given array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.String)">
<summary>Insert the given string value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Int32)">
<summary>Insert the given int value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.UInt32)">
<summary>Insert the given uint value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Int64)">
<summary>Insert the given long value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Boolean)">
<summary>Insert the given bool value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Single)">
<summary>Insert the given float value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Double)">
<summary>Insert the given double value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.Byte[])">
<summary>Insert the given byte array value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,System.DateTime)">
<summary>Insert the given datetime value at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,PlayerIO.GameLibrary.DatabaseObject)">
<summary>Insert the given object at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Insert(System.Int32,PlayerIO.GameLibrary.DatabaseArray)">
<summary>Insert the given array at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.String)">
<summary>Add the given string value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Int32)">
<summary>Add the given int value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.UInt32)">
<summary>Add the given uint value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Int64)">
<summary>Add the given long value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Boolean)">
<summary>Add the given bool value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Single)">
<summary>Add the given float value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Double)">
<summary>Add the given double value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.Byte[])">
<summary>Add the given byte array value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(System.DateTime)">
<summary>Add the given datetime value to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(PlayerIO.GameLibrary.DatabaseObject)">
<summary>Add the given object to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Add(PlayerIO.GameLibrary.DatabaseArray)">
<summary>Add the given array to the array</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Remove(System.String)">
<summary>Removes the value of the given property from this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Contains(System.String)">
<summary>Returns true if the given property exists on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.TryGetValue(System.String,System.Object@)">
<summary>If the given property exists, this method returns true and the value as object in the out parameter. If it does not, this method return false</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetValue(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetString(System.String)">
<summary>Get the given string property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetString(System.String,System.String)">
<summary>Get the given string property, falling back to the given default value if the string property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetInt(System.String)">
<summary>Get the given int property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetInt(System.String,System.Int32)">
<summary>Get the given int property, falling back to the given default value if the int property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetUInt(System.String)">
<summary>Get the given uint property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetUInt(System.String,System.UInt32)">
<summary>Get the given uint property, falling back to the given default value if the uint property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetLong(System.String)">
<summary>Get the given long property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetLong(System.String,System.Int64)">
<summary>Get the given long property, falling back to the given default value if the long property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBool(System.String)">
<summary>Get the given bool property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBool(System.String,System.Boolean)">
<summary>Get the given bool property, falling back to the given default value if the bool property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetFloat(System.String)">
<summary>Get the given float property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetFloat(System.String,System.Single)">
<summary>Get the given float property, falling back to the given default value if the float property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDouble(System.String)">
<summary>Get the given double property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDouble(System.String,System.Double)">
<summary>Get the given double property, falling back to the given default value if the double property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBytes(System.String)">
<summary>Get the given byte array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetBytes(System.String,System.Byte[])">
<summary>Get the given byte array property, falling back to the given default value if the byte array property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDateTime(System.String)">
<summary>Get the given datetime property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetDateTime(System.String,System.DateTime)">
<summary>Get the given datetime property, falling back to the given default value if the datetime property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetObject(System.String)">
<summary>Get the given object property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.GetArray(System.String)">
<summary>Get the given array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.String)">
<summary>Set the given property to the given string value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Int32)">
<summary>Set the given property to the given int value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.UInt32)">
<summary>Set the given property to the given uint value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Int64)">
<summary>Set the given property to the given long value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Boolean)">
<summary>Set the given property to the given bool value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Single)">
<summary>Set the given property to the given float value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Double)">
<summary>Set the given property to the given double value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.Byte[])">
<summary>Set the given property to the given byte array value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,System.DateTime)">
<summary>Set the given property to the given datetime value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,PlayerIO.GameLibrary.DatabaseObject)">
<summary>Set the given property to the given object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseArray.Set(System.String,PlayerIO.GameLibrary.DatabaseArray)">
<summary>Set the given property to the given array</summary>
</member>
<member name="T:PlayerIO.GameLibrary.DatabaseObject">
<summary>
This class represents a BigDB Database Object that has a Key and a collection of named properties.
<para>There are methods for setting, getting, and removing properties, and changes to the object can be persisted to BigDB with the Save() method.</para>
<para>Database objects are very similar to JSON objects and are most easily visualized as such. For example, we can visualize a car object like this:</para>
<code>
'car20312' = {
Name: 'OldSpeedy',
Stats:{
Acceleration: 3.2,
TopSpeed: 50,
Steering: 5,
WorkingBreaks:false
}
LatestLapTimes: ['20:34','22:03','22:30']
}
</code>
<para>If we then want to create this object in BigDB, we would have to do this:</para>
<code>
DatabaseObject car = new DatabaseObject();
car.Set("Name", "OldSpeedy");
//Create nested stats object
DatabaseObject stats = new DatabaseObject();
stats.Set("Acceleration", 3.2);
stats.Set("TopSpeed", 50);
stats.Set("Steering", 5);
stats.Set("WorkingBreaks", false);
car.Set("Stats", stats);
//Create laptimes array
DatabaseArray laptimes = new DatabaseArray();
laptimes.Add("20:34");
laptimes.Add("22:03");
laptimes.Add("22:30");
car.Set("LatestLapTimes", laptimes);
//Save car to table "Cars" under key "car20312"
PlayerIO.BigDB.CreateObject("Cars", "car20312", car, null);
</code>
<para>To make it easier to work with nested objects, you can reference them directly by separating the property names with a dot. Using this, we can set the stats properties of the car like this instead:</para>
<code>
DatabaseObject car = new DatabaseObject();
car.Set("Stats.Acceleration", 3.2);
car.Set("Stats.TopSpeed", 50);
car.Set("Stats.Steering", 5);
car.Set("Stats.WorkingBreaks", false);
</code>
<para>When you want to read properties from a database object, you have to call the corresponding get method indicating the type of the property.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car20312", delegate(DatabaseObject car) {
string name = car.GetString("Name");
float acceleration = car.GetFloat("Stats.Acceleration");
int topspeed = car.GetInt("Stats.TopSpeed");
});
</code>
<para>BigDB doesn't enforce anything on your objects. Two objects in the same table do not need to have the same properties set, and do not need to have the same type on the same property. If you try to get a property that is missing, or if you are using a get method of the wrong type, you will get an exception.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car20312", delegate(DatabaseObject car) {
//Name is a string, throws exception!
int name = car.GetInt("Name");
//Color does not exist, throws exception!
string color = car.GetString("Color");
});
</code>
<para>One way of avoiding this is to first check the object if a certain property exists before reading this. You can do this with the Contains method.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car20312", delegate(DatabaseObject car) {
if (!car.Contains("Name")) {
car.Set("Name", "Unknown");
}
if (car.Contains("Stats.Steering")) {
//...
}
});
</code>
<para>Another way of avoiding errors is to specify a default value when calling a get method. If the object doesn't contain the property, the method will return your default value instead.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car20312", delegate(DatabaseObject car) {
string color = car.GetString("Color", "Red");
});
</code>
<para>You can also easily remove properties from your object with the Remove method.</para>
<code>
PlayerIO.BigDB.Load("Cars", "car20312", delegate(DatabaseObject car) {
car.Remove("Name");
car.Remove("Stats.TopSpeed");
if (!car.Contains("Name")) {
//Name property should be removed now.
}
});
</code>
<para>Finally, to persist any changes you've made to an object you can call the Save method. Note that you can only call Save on an object that exist in the database. This means that the first time you save an object you have to call the PlayerIO.BigDB.CreateObject method, but all subsequent times you can call the Save method. There is also a property called ExistsInDatabase that you can use to check if it has been created or not.</para>
<code>
car.Set("Name", "NewSpeedy");
car.Set("Stats.Acceleration", 5.0);
if (car.ExistsInDatabase) {
car.Save();
} else {
PlayerIO.BigDB.CreateObject("Cars", "car12345", null);
}
</code>
<para>The Save method is asynchronous just like the CreateObject method in PlayerIO.BigDB, and you can specify a callback if you wish to do something when the object actually has been saved.</para>
<code>
car.Set("Name", "NewSpeedy");
car.Set("Stats.Acceleration", 5.0);
car.Save(delegate() {
//On successful save...
});
</code>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseObject.ExistsInDatabase">
<summary>Returns true if the object has been persisted</summary>
</member>
<member name="F:PlayerIO.GameLibrary.DatabaseObject.Table">
<summary>The name of the BigDB table this object belongs to</summary>
</member>
<member name="F:PlayerIO.GameLibrary.DatabaseObject.Key">
<summary>The key of the object.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save">
<summary>Persist the object to the database asynchronously.
<p>If use the overloads with success callbacks if you need to know when the save has completed successfully</p></summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean)">
<summary>Persist the object to the database asynchronously, using optimistic locking if specified
<p>If use the overloads with success callbacks if you need to know when the save has completed successfully</p></summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean,System.Boolean)">
<summary>Persist the object to the database asynchronously, using optimistic locking and full overwrite if specified
<p>If use the overloads with success callbacks if you need to know when the save has completed successfully</p></summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
<param name="fullOverwrite">Will completely overwrite the database object in BigDB with the properties in this instance, instead of just sending the changed properties to the server.</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(PlayerIO.GameLibrary.Callback)">
<summary>Persist the object to the database</summary>
<param name="successCallback">Callback when the save succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Persist the object to the database</summary>
<param name="successCallback">Callback when the save succeeds</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the save.</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean,PlayerIO.GameLibrary.Callback)">
<summary>Persist the object to the database, using optimistic locking if specified</summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
<param name="successCallback">Callback when the save succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Persist the object to the database, using optimistic locking if specified</summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
<param name="successCallback">Callback when the save succeeds</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the save.</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean,System.Boolean,PlayerIO.GameLibrary.Callback)">
<summary>Persist the object to the database, using optimistic locking and full overwrite if specified</summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
<param name="fullOverwrite">Will completely overwrite the database object in BigDB with the properties in this instance, instead of just sending the changed properties to the server.</param>
<param name="successCallback">Callback when the save succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Save(System.Boolean,System.Boolean,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Persist the object to the database, using optimistic locking and full overwrite if specified</summary>
<param name="useOptimisticLock">If true, the save will only be completed if the database object has not changed in BigDB since this instance was loaded.</param>
<param name="fullOverwrite">Will completely overwrite the database object in BigDB with the properties in this instance, instead of just sending the changed properties to the server.</param>
<param name="successCallback">Callback when the save succeeds</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the save.</param>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.#ctor">
<summary>DatabaseObject constructor</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseObject.Count">
<summary>Returns the number of properties on this object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseObject.Item(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.DatabaseObject.Properties">
<summary>Get the names of all properties on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Clear">
<summary>Removes all properties on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Remove(System.String)">
<summary>Removes the value of the given property from this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Contains(System.String)">
<summary>Returns true if the given property exists on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.TryGetValue(System.String,System.Object@)">
<summary>If the given property exists, this method returns true and the value as object in the out parameter. If it does not, this method return false</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetValue(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetString(System.String)">
<summary>Get the given string property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetString(System.String,System.String)">
<summary>Get the given string property, falling back to the given default value if the string property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetInt(System.String)">
<summary>Get the given int property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetInt(System.String,System.Int32)">
<summary>Get the given int property, falling back to the given default value if the int property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetUInt(System.String)">
<summary>Get the given uint property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetUInt(System.String,System.UInt32)">
<summary>Get the given uint property, falling back to the given default value if the uint property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetLong(System.String)">
<summary>Get the given long property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetLong(System.String,System.Int64)">
<summary>Get the given long property, falling back to the given default value if the long property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetBool(System.String)">
<summary>Get the given bool property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetBool(System.String,System.Boolean)">
<summary>Get the given bool property, falling back to the given default value if the bool property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetFloat(System.String)">
<summary>Get the given float property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetFloat(System.String,System.Single)">
<summary>Get the given float property, falling back to the given default value if the float property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetDouble(System.String)">
<summary>Get the given double property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetDouble(System.String,System.Double)">
<summary>Get the given double property, falling back to the given default value if the double property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetBytes(System.String)">
<summary>Get the given byte array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetBytes(System.String,System.Byte[])">
<summary>Get the given byte array property, falling back to the given default value if the byte array property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetDateTime(System.String)">
<summary>Get the given datetime property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetDateTime(System.String,System.DateTime)">
<summary>Get the given datetime property, falling back to the given default value if the datetime property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetObject(System.String)">
<summary>Get the given object property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.GetArray(System.String)">
<summary>Get the given array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.String)">
<summary>Set the given property to the given string value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Int32)">
<summary>Set the given property to the given int value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.UInt32)">
<summary>Set the given property to the given uint value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Int64)">
<summary>Set the given property to the given long value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Boolean)">
<summary>Set the given property to the given bool value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Single)">
<summary>Set the given property to the given float value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Double)">
<summary>Set the given property to the given double value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.Byte[])">
<summary>Set the given property to the given byte array value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,System.DateTime)">
<summary>Set the given property to the given datetime value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,PlayerIO.GameLibrary.DatabaseObject)">
<summary>Set the given property to the given object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.DatabaseObject.Set(System.String,PlayerIO.GameLibrary.DatabaseArray)">
<summary>Set the given property to the given array</summary>
</member>
<member name="T:PlayerIO.GameLibrary.GameFS">
<summary>
The Player.IO GameFS Service
<para>Here is a simple example on how to use GameFS:</para>
<code>
string assetUrl = PlayerIO.GameFS.GetUrl("/assets/image.png");
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.GameFS.GetUrl(System.String)">
<summary>Converts a GameFS path (like '/mygame.swf') into a full url, that can be downloaded over the internet.
<para>Important! Do not save or otherwise persist (bigdb, cookies, etc) the returned url, since the url will change over time.</para>
</summary>
<param name="path">The path of the file in the GameFS, including the initial slash. Examples: '/mygame.swf' or '/characters/bob.jpg'</param>
<returns>An url that can be used to download the resource over the internet</returns>
</member>
<member name="M:PlayerIO.GameLibrary.GameFS.GetUrl(System.String,System.Boolean)">
<summary>Converts a GameFS path (like '/mygame.swf') into a full url, that can be downloaded over the internet.
<para>Important! Do not save or otherwise persist (bigdb, cookies, etc) the returned url, since the url will change over time.</para>
</summary>
<param name="path">The path of the file in the GameFS, including the initial slash. Examples: '/mygame.swf' or '/characters/bob.jpg'</param>
<param name="secure">If true, this method returns a secure (https) url.</param>
<returns>An url that can be used to download the resource over the internet</returns>
</member>
<member name="T:PlayerIO.GameLibrary.GameRequests">
<summary>
The Player.IO GameRequests service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.GameRequests.WaitingRequests">
<summary>The list of oldest received requests that are waiting to be processed and deleted.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Send(System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.String[],PlayerIO.GameLibrary.Callback)">
<summary>Send a GameRequest to the specified recipients</summary>
<param name="requestType">The request type of the request to send.</param>
<param name="requestData">Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipient.</param>
<param name="recipients">The recipients to send this request to.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Send(System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.String[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Send a GameRequest to the specified recipients</summary>
<param name="requestType">The request type of the request to send.</param>
<param name="requestData">Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipient.</param>
<param name="recipients">The recipients to send this request to.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>Refresh the list of received requests.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Refresh the list of received requests.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Delete(PlayerIO.GameLibrary.GameRequest[],PlayerIO.GameLibrary.Callback)">
<summary>Delete the given requests. Will also update the WaitingRequests property after deletion is complete.</summary>
<param name="requests">The list of requests to delete.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.GameRequests.Delete(PlayerIO.GameLibrary.GameRequest[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Delete the given requests. Will also update the WaitingRequests property after deletion is complete.</summary>
<param name="requests">The list of requests to delete.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="T:PlayerIO.GameLibrary.GameRequest">
<summary>A received game request</summary>
</member>
<member name="P:PlayerIO.GameLibrary.GameRequest.Type">
<summary>The request type of the request</summary>
</member>
<member name="P:PlayerIO.GameLibrary.GameRequest.SenderUserId">
<summary>The user id of the user that sent the request</summary>
</member>
<member name="P:PlayerIO.GameLibrary.GameRequest.Created">
<summary>When the request was received</summary>
</member>
<member name="P:PlayerIO.GameLibrary.GameRequest.Data">
<summary>The game-specific extra data associated with this request</summary>
</member>
<member name="T:PlayerIO.GameLibrary.Notifications">
<summary>
The Player.IO Notifications service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Notifications.MyEndpoints">
<summary>The list of notification endpoints registered for the current client.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>
Refreshes MyEndpoints
</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Refreshes MyEndpoints
</summary>
<param name="successCallback">Callback that will be called when the refresh is complete.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.RegisterEndpoint(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.Boolean,PlayerIO.GameLibrary.Callback)">
<summary>
Register a device or endpoint with Player.IO.
</summary>
<param name="endpointType">Endpoint type, such as, IOS, Android, email, etc.</param>
<param name="identifier">The identifier of the endpoint, such as the device token on iOS or an email address for email.</param>
<param name="configuration">Configuration relating to the endpoint. Can be null.</param>
<param name="enabled">Should the endpoint be enabled.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.RegisterEndpoint(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String},System.Boolean,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Register a device or endpoint with Player.IO.
</summary>
<param name="endpointType">Endpoint type, such as, IOS, Android, email, etc.</param>
<param name="identifier">The identifier of the endpoint, such as the device token on iOS or an email address for email.</param>
<param name="configuration">Configuration relating to the endpoint. Can be null.</param>
<param name="enabled">Should the endpoint be enabled.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
<param name="errorCallback">Callback that is invoked when operation fails</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.Send(PlayerIO.GameLibrary.Notification[],PlayerIO.GameLibrary.Callback)">
<summary>
Send one or more notifications
</summary>
<param name="notifications">The notifications to send</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.Send(PlayerIO.GameLibrary.Notification[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Send one or more notifications
</summary>
<param name="notifications">The notifications to send</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
<param name="errorCallback">Callback that is invoked when operation fails</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.ToggleEndpoints(PlayerIO.GameLibrary.NotificationEndpoint[],System.Boolean,PlayerIO.GameLibrary.Callback)">
<summary>
Enables or disabled the given endpoints.
</summary>
<param name="endpoints">The endpoints to enable or disable.</param>
<param name="enable">If true, all the given endpoints will be enabled. If false, they'll be disabled.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.ToggleEndpoints(PlayerIO.GameLibrary.NotificationEndpoint[],System.Boolean,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Enables or disabled the given endpoints.
</summary>
<param name="endpoints">The endpoints to enable or disable.</param>
<param name="enable">If true, all the given endpoints will be enabled. If false, they'll be disabled.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
<param name="errorCallback">Callback that is invoked when operation fails</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.DeleteEndpoints(PlayerIO.GameLibrary.NotificationEndpoint[],PlayerIO.GameLibrary.Callback)">
<summary>
Deletes the given endpoints
</summary>
<param name="endpoints">The endpoints to delete.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notifications.DeleteEndpoints(PlayerIO.GameLibrary.NotificationEndpoint[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Deletes the given endpoints
</summary>
<param name="endpoints">The endpoints to delete.</param>
<param name="successCallback">Callback that is invoked when operation succeeds</param>
<param name="errorCallback">Callback that is invoked when operation fails</param>
</member>
<member name="T:PlayerIO.GameLibrary.NotificationEndpoint">
<summary>Notifications Endpoint</summary>
</member>
<member name="P:PlayerIO.GameLibrary.NotificationEndpoint.Type">
<summary>The type of the endpoint</summary>
</member>
<member name="P:PlayerIO.GameLibrary.NotificationEndpoint.Identifier">
<summary>The endpoint identifier (e.g, push device id or e-mail address...) </summary>
</member>
<member name="P:PlayerIO.GameLibrary.NotificationEndpoint.Configuration">
<summary>The configuration of the endpoint</summary>
</member>
<member name="P:PlayerIO.GameLibrary.NotificationEndpoint.Enabled">
<summary>Is this endpoint currently enabled?</summary>
</member>
<member name="T:PlayerIO.GameLibrary.Notification">
<summary>A Notification</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Notification.RecipientUserId">
<summary>The intended recipient (userId) of this notification</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Notification.EndpointType">
<summary>The type of notification endpoint that will receive this notification</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Notification.Data">
<summary>The notification data</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Notification.#ctor(System.String,System.String)">
<summary>
Create a new notification intended for the specified recipient if he/she has registered a notification endpoint of the given type.
</summary>
<param name="recipientUserId">The intended recipient userId of this notification.</param>
<param name="endpointType">The endpoint type that this notification is intended for.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Notification.Set(System.String,System.String)">
<summary>
Add a specific argument to the Data of this notification
</summary>
<param name="key">The key to add</param>
<param name="value">The value to add</param>
<returns>This instance for chainable calls to Set()</returns>
</member>
<member name="T:PlayerIO.GameLibrary.OneScore">
<summary>
The Player.IO OneScore service
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScore.Score">
<summary>
OneScore value
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScore.Percentile">
<summary>
The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScore.TopRank">
<summary>
The absolute ranking number -- if you are one of the N top players, then it returns N. 1 means you are the best. Returns 0 if you are not one the top N players. (N is currently 1000.)
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>Refresh OneScore for the user.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Refresh OneScore for the user.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Set(System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue})">
<summary>Sets OneScore for the user. </summary>
<param name="score">The score to set for the user.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Set(System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Sets OneScore for the user. </summary>
<param name="score">The score to set for the user.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Add(System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue})">
<summary>Adds the score to the OneScore for the user. </summary>
<param name="score">The score to add for the user.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Add(System.Int32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Adds the score to the OneScore for the user.</summary>
<param name="score">The score to add for the user.</param>
<param name="successCallback">Callback that will be called when the operation succeeds.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Load(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue[]})">
<summary>Loads OneScore for multiple users.</summary>
<param name="userIds">The user ids to load OneScore for.</param>
<param name="successCallback">Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.</param>
</member>
<member name="M:PlayerIO.GameLibrary.OneScore.Load(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.OneScoreValue[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Loads OneScore for multiple users.</summary>
<param name="userIds">The user ids to load OneScore for.</param>
<param name="successCallback">Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="T:PlayerIO.GameLibrary.OneScoreValue">
<summary>
OneScore value and Percentile
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScoreValue.Score">
<summary>The score</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScoreValue.Percentile">
<summary>The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.OneScoreValue.TopRank">
<summary>
The absolute ranking number -- if you are one of the N top players, then it returns N. 1 means you are the best. Returns 0 if you are not one the top N players. (N is currently 1000.)
</summary>
</member>
<member name="T:PlayerIO.GameLibrary.PartnerPay">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PartnerPay.CurrentPartner">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.Trigger(System.String)">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.Trigger(System.String,PlayerIO.GameLibrary.Callback)">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.Trigger(System.String,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.Trigger(System.String,System.UInt32,PlayerIO.GameLibrary.Callback)">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.Trigger(System.String,System.UInt32,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.SetTag(System.String)">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.SetTag(System.String,PlayerIO.GameLibrary.Callback)">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PartnerPay.SetTag(System.String,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
DEPRECATED. DO NOT USE.
</summary>
</member>
<member name="T:PlayerIO.GameLibrary.PayVault">
<summary>
The Player.IO PayVault.
<para>Instances of this class represent a specific user's Vault, and contains methods and properties both for inspecting and manipulating the contents.</para>
<para>If you have a BasePlayer object, you can access that user's Vault directly:</para>
<code>
PayVault vault = player.PayVault;
</code>
<para>You can also access the Vault of any other user that isn't connected to your specific multiplayer room, by calling the GetUserPayVault() method:</para>
<code>
PayVault vault = PlayerIO.GetUserPayVault("connectUserId");
</code>
<para>All properties and methods that inspect the Vault requires that it is up-to-date first. This can be achieved explicitly by calling the Refresh() method
or implicitly by calling any method which modifies the Vault. </para>
<para>Here is how to read the Coins balance:</para>
<code>
PayVault vault = player.PayVault;
vault.Refresh(delegate(){
int coins = vault.Coins;
});
</code>
<para>This is how you check if an item exists:</para>
<code>
PayVault vault = player.PayVault;
vault.Refresh(delegate(){
if (vault.Has("simplecar")) {
//...
}
});
</code>
<para>Credit and Debit can be used like this:</para>
<code>
PayVault vault = player.PayVault;
vault.Credit(100, "New player bonus", delegate(){
int newcoins = vault.Coins;
//Show new amount to user.
});
vault.Debit(10, "Race starting fee", delegate() {
//Let player start race
}
</code>
<para>Buying items with Coins is really easy. This requires that you have created an item in the PayVaultItems table in BigDB with the key "speedboost", and a property "PriceCoins" containing the price.</para>
<code>
PayVault vault = player.PayVault;
vault.Buy(true, new BuyItemInfo[]{
new BuyItemInfo("speedboost")
}, delegate() {
int boosts = vault.Count("speedboost");
//Show new number of boosts to user.
});
</code>
<para>And here's how to consume an item:</para>
<code>
PayVault vault = player.PayVault;
vault.Refresh();
VaultItem boost = vault.First("speedboost");
if (boost != null) {
vault.Consume(new VaultItem[]{boost}, delegate() {
//Boost the player's car
});
}
</code>
<para>When it's time for a user to add more Coins, you can do it like this:</para>
<code>
PayVault vault = player.PayVault;
vault.GetBuyCoinsInfo("socialgold",
new Dictionary&lt;string, string&gt;(){{"offerid", "..."}},
delegate(Dictionary&lt;string, string&gt; result) {
string url = result["socialgoldurl"];
//Show URL to player...
});
</code>
<para>And this is how to let the user buy an item directly. This requires that you have created an item in the PayVaultItems table in BigDB with the key "supercar", and a property "PriceUSD" containing the price.</para>
<code>
PayVault vault = player.PayVault;
vault.GetBuyDirectInfo("paypal",
new Dictionary&lt;string, string&gt;(){
{"currency", "USD"},
{"item_name", "Red Supercar"}
},
new BuyItemInfo[]{
new BuyItemInfo("supercar").Set("Color", "Red")
},
delegate(Dictionary&lt;string, string&gt; result) {
string url = result["paypalurl"];
//Show URL to player...
});
</code>
<para>Finally, there are methods for retrieving the payment history of a user:</para>
<code>
PayVault vault = player.PayVault;
vault.ReadHistory(0, 10, delegate(PayVaultHistoryEntry[] history) {
if (history.Length > 0) {
string lastprice = history[0].ProviderPrice;
}
});
</code>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVault.Coins">
<summary>This property contains the current coin balance of this Vault. This property can only be read on an up-to-date vault.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVault.Items">
<summary>This property contains the list of items in this Vault. This property can only be read on an up-to-date vault.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Has(System.String)">
<summary>
This method checks if the Vault contains at least one item of the given itemKey. This method can only be called on an up-to-date vault.
</summary>
<param name="itemKey">The itemKey to check for</param>
<returns>True if the user has at least one item of the given type (itemKey)</returns>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.First(System.String)">
<summary>
Returns the first item of the given itemKey from this Vault. This method can only be called on an up-to-date vault.
</summary>
<param name="itemKey">The itemKey of the item to get</param>
<returns>A VaultItem if one was found, or null if not</returns>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Count(System.String)">
<summary>
Returns the number of items of a given itemKey is in this Vault. This method can only be called on an up-to-date vault.
</summary>
<param name="itemKey">The itemKey of the items to count</param>
<returns>The number of items of the given type that the user has in the vault</returns>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>Refreshes this Vault, making sure the Items and Coins are up-to-date.</summary>
<param name="successCallback">Callback that will be called when the refresh is completed</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Refreshes this Vault, making sure the Items and Coins are up-to-date.</summary>
<param name="successCallback">Callback that will be called when the refresh is completed</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the refresh.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.ReadHistory(System.UInt32,System.UInt32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PayVaultHistoryEntry[]})">
<summary>
Loads a page of entries from this Vaults history, in reverse chronological order, i.e. newest first.
</summary>
<param name="page">The page of entries to load. The first page has number 0.</param>
<param name="pageSize">The number of entries per page.</param>
<param name="successCallback">Callback that will be called with the loaded PayVault history entries, or an empty array if none were found on the given page.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.ReadHistory(System.UInt32,System.UInt32,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PayVaultHistoryEntry[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>
Loads a page of entries from this Vaults history, in reverse chronological order, i.e. newest first.
</summary>
<param name="page">The page of entries to load. The first page has number 0.</param>
<param name="pageSize">The number of entries per page.</param>
<param name="successCallback">Callback that will be called with the loaded PayVault history entries, or an empty array if none were found on the given page.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the loading of history entries.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Credit(System.UInt32,System.String,PlayerIO.GameLibrary.Callback)">
<summary>Give coins to this Vault.</summary>
<param name="coinAmount">The amount of coins to give.</param>
<param name="reason">Your reason for giving the coins to this user. This will show up in the vault history, and in the PayVault admin panel for this user.</param>
<param name="successCallback">Callback that will be called if the credit is succesful.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Credit(System.UInt32,System.String,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Give coins to this Vault.</summary>
<param name="coinAmount">The amount of coins to give.</param>
<param name="reason">Your reason for giving the coins to this user. This will show up in the vault history, and in the PayVault admin panel for this user.</param>
<param name="successCallback">Callback that will be called if the credit is succesful.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Debit(System.UInt32,System.String,PlayerIO.GameLibrary.Callback)">
<summary>Take coins from this Vault</summary>
<param name="coinAmount">The amount of coins to take.</param>
<param name="reason">Your reason for taking the coins from this user. This will show up in the vault history, and in the PayVault admin panel for this user.</param>
<param name="successCallback">Callback that will be called if the debit is succesful.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Debit(System.UInt32,System.String,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Take coins from this Vault</summary>
<param name="coinAmount">The amount of coins to take.</param>
<param name="reason">Your reason for taking the coins from this user. This will show up in the vault history, and in the PayVault admin panel for this user.</param>
<param name="successCallback">Callback that will be called if the debit is succesful.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Consume(PlayerIO.GameLibrary.VaultItem[],PlayerIO.GameLibrary.Callback)">
<summary>Consume items in this Vault. This will cause them to be removed, but this action will not show up in the vault history.</summary>
<param name="items">The VaultItems to use from the users vault - this should be instances from the Items array property.</param>
<param name="successCallback">Callback that will be called if the use is succesful.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Consume(PlayerIO.GameLibrary.VaultItem[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Consume items in this Vault. This will cause them to be removed, but this action will not show up in the vault history.</summary>
<param name="items">The VaultItems to use from the users vault - this should be instances from the Items array property.</param>
<param name="successCallback">Callback that will be called if the use is succesful.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Buy(System.Boolean,PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback)">
<summary>Buy items with Coins.</summary>
<param name="storeItems">If true, the items will be stored in the Vault. If false, the items will be consumed immediately after purchase.</param>
<param name="items">A list of items to buy, together with any additional payload.</param>
<param name="successCallback">Callback that will be called if the buy is succesful.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Buy(System.Boolean,PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Buy items with Coins.</summary>
<param name="storeItems">If true, the items will be stored in the Vault. If false, the items will be consumed immediately after purchase.</param>
<param name="items">A list of items to buy, together with any additional payload.</param>
<param name="successCallback">Callback that will be called if the buy is succesful.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Give(PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback)">
<summary>Give the user items without taking any of his coins from the vault.</summary>
<param name="items">Each BuyItemInfo instance contains the key of the item to give in the PayVaultItems BigDB table and any additional payload.</param>
<param name="successCallback">Callback that will be called if the give is succesfull.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.Give(PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Give the user items without taking any of his coins from the vault.</summary>
<param name="items">Each BuyItemInfo instance contains the key of the item to give in the PayVaultItems BigDB table and any additional payload.</param>
<param name="successCallback">Callback that will be called if the give is succesfull.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.GetBuyCoinsInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}})">
<summary>Gets information about how to make a coin purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use for the coin purchase.</param>
<param name="purchaseArguments">Any additional information that will be given to the PayVault provider to configure this purchase.</param>
<param name="successCallback">Callback that will be called with information about how to proceed with the purchase.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.GetBuyCoinsInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Gets information about how to make a coin purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use for the coin purchase.</param>
<param name="purchaseArguments">Any additional information that will be given to the PayVault provider to configure this purchase.</param>
<param name="successCallback">Callback that will be called with information about how to proceed with the purchase.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.GetBuyDirectInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}})">
<summary>Gets information about how to make a direct item purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use for the coin purchase.</param>
<param name="purchaseArguments">Any additional information that will be given to the PayVault provider to configure this purchase.</param>
<param name="items">Each BuyItemInfo instance contains the key of the item to buy and any additional payload.</param>
<param name="successCallback">Callback that will be called with information about how to proceed with the purchase.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.GetBuyDirectInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.BuyItemInfo[],PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Gets information about how to make a direct item purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use for the coin purchase.</param>
<param name="purchaseArguments">Any additional information that will be given to the PayVault provider to configure this purchase.</param>
<param name="items">Each BuyItemInfo instance contains the key of the item to buy and any additional payload.</param>
<param name="successCallback">Callback that will be called with information about how to proceed with the purchase.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.UseBuyInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}})">
<summary>Use information from a provider to finalize a purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use.</param>
<param name="providerArguments">The information needed to finalize this purchase.</param>
<param name="successCallback">Callback that will be called with PayVault provider-specific information about the purchase.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PayVault.UseBuyInfo(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{System.Collections.Generic.Dictionary{System.String,System.String}},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Use information from a provider to finalize a purchase with the specified PayVault provider.</summary>
<param name="provider">The name of the PayVault provider to use.</param>
<param name="providerArguments">The information needed to finalize this purchase.</param>
<param name="successCallback">Callback that will be called with PayVault provider-specific information about the purchase.</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs.</param>
</member>
<member name="T:PlayerIO.GameLibrary.PayVaultHistoryEntry">
<summary>
An entry in a user's PayVault history
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.Type">
<summary>The type of this entry, for example 'buy','credit','debit'...</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.Amount">
<summary>The coin amount of this entry.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.Timestamp">
<summary>When this entry was created.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.ItemKeys">
<summary>The item keys related to this entry (entries with type 'buy').</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.Reason">
<summary>The developer supplied reason for entries of type 'credit' and 'debit'.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.ProviderTransactionId">
<summary>The transaction id from the PayVault provider corresponding to this entry.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PayVaultHistoryEntry.ProviderPrice">
<summary>The price in real currency of this entry formatted as a human readable currency string, e.g. $10.00 USD</summary>
</member>
<member name="T:PlayerIO.GameLibrary.BuyItemInfo">
<summary>
Represents information about the purchase of a PayVault item.
<para>The minimum information necessary to create an instance of this class is an itemKey representing the PayVaultItem that should be purchased.</para>
<para>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.</para>
<para>Setting the payload works exactly like manipulating a DatabaseObject from BigDB.</para>
<code>
//Buy a red 'simplecar' with stripes.
player.PayVault.Buy(true, new BuyItemInfo[]{
new BuyItemInfo("simplecar").Set("Color", "Red").Set("Stripes", true)
}, null);
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.#ctor(System.String)">
<summary>
Creates a new BuyItemInfo to describe an item to purchase.
</summary>
<param name="itemKey">They key of the underlying item in the PayVaultItems table.</param>
</member>
<member name="P:PlayerIO.GameLibrary.BuyItemInfo.Count">
<summary>Returns the number of properties on this object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BuyItemInfo.Item(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BuyItemInfo.Properties">
<summary>Get the names of all properties on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Clear">
<summary>Removes all properties on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Remove(System.String)">
<summary>Removes the value of the given property from this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Contains(System.String)">
<summary>Returns true if the given property exists on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.TryGetValue(System.String,System.Object@)">
<summary>If the given property exists, this method returns true and the value as object in the out parameter. If it does not, this method return false</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetValue(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetString(System.String)">
<summary>Get the given string property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetString(System.String,System.String)">
<summary>Get the given string property, falling back to the given default value if the string property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetInt(System.String)">
<summary>Get the given int property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetInt(System.String,System.Int32)">
<summary>Get the given int property, falling back to the given default value if the int property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetUInt(System.String)">
<summary>Get the given uint property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetUInt(System.String,System.UInt32)">
<summary>Get the given uint property, falling back to the given default value if the uint property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetLong(System.String)">
<summary>Get the given long property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetLong(System.String,System.Int64)">
<summary>Get the given long property, falling back to the given default value if the long property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetBool(System.String)">
<summary>Get the given bool property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetBool(System.String,System.Boolean)">
<summary>Get the given bool property, falling back to the given default value if the bool property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetFloat(System.String)">
<summary>Get the given float property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetFloat(System.String,System.Single)">
<summary>Get the given float property, falling back to the given default value if the float property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetDouble(System.String)">
<summary>Get the given double property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetDouble(System.String,System.Double)">
<summary>Get the given double property, falling back to the given default value if the double property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetBytes(System.String)">
<summary>Get the given byte array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetBytes(System.String,System.Byte[])">
<summary>Get the given byte array property, falling back to the given default value if the byte array property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetDateTime(System.String)">
<summary>Get the given datetime property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetDateTime(System.String,System.DateTime)">
<summary>Get the given datetime property, falling back to the given default value if the datetime property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetObject(System.String)">
<summary>Get the given object property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.GetArray(System.String)">
<summary>Get the given array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.String)">
<summary>Set the given property to the given string value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Int32)">
<summary>Set the given property to the given int value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.UInt32)">
<summary>Set the given property to the given uint value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Int64)">
<summary>Set the given property to the given long value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Boolean)">
<summary>Set the given property to the given bool value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Single)">
<summary>Set the given property to the given float value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Double)">
<summary>Set the given property to the given double value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.Byte[])">
<summary>Set the given property to the given byte array value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,System.DateTime)">
<summary>Set the given property to the given datetime value</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,PlayerIO.GameLibrary.DatabaseObject)">
<summary>Set the given property to the given object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BuyItemInfo.Set(System.String,PlayerIO.GameLibrary.DatabaseArray)">
<summary>Set the given property to the given array</summary>
</member>
<member name="T:PlayerIO.GameLibrary.VaultItem">
<summary>
Represents information about an item in a user's Vault.
<para>The methods and properties in a VaultItem are very simliar to those of a DatabaseObject, except that it's read-only, and that there are some extra properties regarding the purchase.</para>
<code>
//Get a 'simplecar' from the Vault
VaultItem car = player.PayVault.First("simplecar");
if (car != null) {
string color = car.GetString("Color");
bool stripes = car.GetBool("Stripes");
}
</code>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.Id">
<summary>The unique id of this particular vault item in the users vault</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.ItemKey">
<summary>The key of the underlying item in the PayVaultItems BigDB table</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.PurchaseDate">
<summary>The time when the vault item was originally purchased</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.Count">
<summary>Returns the number of properties on this object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.Item(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="P:PlayerIO.GameLibrary.VaultItem.Properties">
<summary>Get the names of all properties on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.Contains(System.String)">
<summary>Returns true if the given property exists on this object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.TryGetValue(System.String,System.Object@)">
<summary>If the given property exists, this method returns true and the value as object in the out parameter. If it does not, this method return false</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetValue(System.String)">
<summary>Get the given property as an object</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetString(System.String)">
<summary>Get the given string property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetString(System.String,System.String)">
<summary>Get the given string property, falling back to the given default value if the string property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetInt(System.String)">
<summary>Get the given int property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetInt(System.String,System.Int32)">
<summary>Get the given int property, falling back to the given default value if the int property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetUInt(System.String)">
<summary>Get the given uint property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetUInt(System.String,System.UInt32)">
<summary>Get the given uint property, falling back to the given default value if the uint property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetLong(System.String)">
<summary>Get the given long property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetLong(System.String,System.Int64)">
<summary>Get the given long property, falling back to the given default value if the long property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetBool(System.String)">
<summary>Get the given bool property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetBool(System.String,System.Boolean)">
<summary>Get the given bool property, falling back to the given default value if the bool property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetFloat(System.String)">
<summary>Get the given float property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetFloat(System.String,System.Single)">
<summary>Get the given float property, falling back to the given default value if the float property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetDouble(System.String)">
<summary>Get the given double property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetDouble(System.String,System.Double)">
<summary>Get the given double property, falling back to the given default value if the double property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetBytes(System.String)">
<summary>Get the given byte array property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetBytes(System.String,System.Byte[])">
<summary>Get the given byte array property, falling back to the given default value if the byte array property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetDateTime(System.String)">
<summary>Get the given datetime property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetDateTime(System.String,System.DateTime)">
<summary>Get the given datetime property, falling back to the given default value if the datetime property does not exist</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetObject(System.String)">
<summary>Get the given object property</summary>
</member>
<member name="M:PlayerIO.GameLibrary.VaultItem.GetArray(System.String)">
<summary>Get the given array property</summary>
</member>
<member name="T:PlayerIO.GameLibrary.PlayerInsight">
<summary>
PlayerInsight
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.PlayerInsight.PlayersOnline">
<summary>The numbers of players online in the entire game</summary>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.SetSegments(System.String[],PlayerIO.GameLibrary.Callback)">
<summary>Assign custom PlayerInsight segments to the current user</summary>
<param name="segments">Custom segments for the user in PlayerInsight, each string should be in the form 'segmentGroup:value', like 'adcampaign:googleads'.</param>
<param name="successCallback">Callback that will be called when the operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.SetSegments(System.String[],PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Assign custom PlayerInsight segments to the current user</summary>
<param name="segments">Custom segments for the user in PlayerInsight, each string should be in the form 'segmentGroup:value', like 'adcampaign:googleads'.</param>
<param name="successCallback">Callback that will be called when the operation succeeds</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.GetSegment(System.String)">
<summary>Gets the segment value for the given segment group. For instance, if the player is tagged in the segment 'source:facebook' the method will return 'facebook' when called with 'source' as the argument.</summary>
<param name="segmentGroup">The segmentGroup to get the current segment value for.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>Refresh the players online counter and the current segments of the user.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Refresh the players online counter and the current segments of the user.</summary>
<param name="successCallback">Callback that will be called when the operation succeeds</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackInvitedBy(System.String,System.String,PlayerIO.GameLibrary.Callback)">
<summary>Tell PlayerInsight who invited the current user in this session. Used for viral analysis.</summary>
<param name="invitingUserId">The connectUserId of the user who invited this user.</param>
<param name="invitationChannel">An identifier for the channel the invitation was received over, like 'email' or 'fb_invite'.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackInvitedBy(System.String,System.String,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Tell PlayerInsight who invited the current user in this session. Used for viral analysis.</summary>
<param name="invitingUserId">The connectUserId of the user who invited this user.</param>
<param name="invitationChannel">An identifier for the channel the invitation was received over, like 'email' or 'fb_invite'.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackEvent(System.String,System.Int32,PlayerIO.GameLibrary.Callback)">
<summary>Track the given event for the current user in PlayerInsight</summary>
<param name="eventType">The name of the event to track.</param>
<param name="value">The amount to add to the counter value.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackEvent(System.String,System.Int32,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Track the given event for the current user in PlayerInsight</summary>
<param name="eventType">The name of the event to track.</param>
<param name="value">The amount to add to the counter value.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackExternalPayment(System.String,System.Int32,PlayerIO.GameLibrary.Callback)">
<summary>Track a completed payment in PlayerInsight from an external non-PayVault payment method.</summary>
<param name="currency">The currency the payment was made in.</param>
<param name="amount">The amount of the payment in the given currency.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
</member>
<member name="M:PlayerIO.GameLibrary.PlayerInsight.TrackExternalPayment(System.String,System.Int32,PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Track a completed payment in PlayerInsight from an external non-PayVault payment method.</summary>
<param name="currency">The currency the payment was made in.</param>
<param name="amount">The amount of the payment in the given currency.</param>
<param name="successCallback">Callback that will be called when the operation was completed successfully</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the operation.</param>
</member>
<member name="T:PlayerIO.GameLibrary.Web">
<summary>
An easy way to communicate with servers and services outside
Player.IO via http requests
<para>Only paid Player.IO accounts can call these methods on the live
servers, due to security concerns. They are always avaliable on the
local development server however.</para>
<para>You can fully develop your game locally using these
methods without restrictions, and only upgrade to a paid account when you
need to deploy your game to the live servers</para>
<para>Below is an example of using the Get() method to download the contents of a web page in the GameStarted() method of a multiplayer room.</para>
<code>
public override void GameStarted() {
var url = "http://www.mywebpage.com";
PlayerIO.Web.Get(url, delegate(HttpResponse response) {
Console.WriteLine(response.Text);
});
}
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Web.Get(System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.HttpResponse})">
<summary>Perform a HTTP Get request.</summary>
<param name="url">The url to request, including querystring arguments (if any)</param>
<param name="successCallback">Callback with a stream of the returned page</param>
</member>
<member name="M:PlayerIO.GameLibrary.Web.Get(System.String,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.HttpResponse},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Perform a HTTP Get request.</summary>
<param name="url">The url to request, including querystring arguments (if any)</param>
<param name="successCallback">Callback with a stream of the returned page</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the request.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Web.Post(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.HttpResponse})">
<summary>Perform a HTTP Post request.</summary>
<param name="url">The url to request, including querystring arguments (if any)</param>
<param name="post">The values to post to the given url</param>
<param name="successCallback">Callback with a stream of the returned page</param>
</member>
<member name="M:PlayerIO.GameLibrary.Web.Post(System.String,System.Collections.Generic.Dictionary{System.String,System.String},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.HttpResponse},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>Perform a HTTP Post request.</summary>
<param name="url">The url to request, including querystring arguments (if any)</param>
<param name="post">The values to post to the given url</param>
<param name="successCallback">Callback with a stream of the returned page</param>
<param name="errorCallback">Callback that will be called instead of successCallback if an error occurs during the request.</param>
</member>
<member name="T:PlayerIO.GameLibrary.HttpResponse">
<summary>
The response from a HTTP Get or Post request
<para>Here's an example on how to grab the entire response and print it to the console:</para>
<code>
public override void GameStarted() {
var url = "http://www.mywebpage.com";
PlayerIO.Web.Get(url, delegate(HttpResponse response) {
Console.WriteLine(response.Text);
});
}
</code>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.HttpResponse.StatusCode">
<summary>The status code returned from the remote web server</summary>
</member>
<member name="P:PlayerIO.GameLibrary.HttpResponse.ResponseStream">
<summary>A stream with the body of the http response</summary>
</member>
<member name="P:PlayerIO.GameLibrary.HttpResponse.Text">
<summary>The response stream read as an UTF8 string</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnsupportedMethod">
<summary>The method requested is not supported</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.GeneralError">
<summary>A general error occurred</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InternalError">
<summary>An unexpected error occurred inside the Player.IO webservice. Please try again.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.AccessDenied">
<summary>Access is denied</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidMessageFormat">
<summary>The message is malformatted</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.MissingValue">
<summary>A value is missing</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.GameRequired">
<summary>A game is required to do this action</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.ExternalError">
<summary>An error occurred while contacting an external service</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.ArgumentOutOfRange">
<summary>The given argument value is outside the range of allowed values.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.GameDisabled">
<summary>The game has been disabled, most likely because of missing payment.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownGame">
<summary>The game requested is not known by the server</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownConnection">
<summary>The connection requested is not known by the server</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidAuth">
<summary>The auth given is invalid or malformatted</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NoServersAvailable">
<summary>There is no server in any of the selected server clusters for the game that are eligible to start a new room in (they're all at full capacity or there are no servers in any of the clusters). Either change the selected clusters for your game in the admin panel, try again later or start some more servers for one of your clusters.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.RoomDataTooLarge">
<summary>The room data for the room was over the allowed size limit</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.RoomAlreadyExists">
<summary>You are unable to create room because there is already a room with the specified id</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownRoomType">
<summary>The game you're connected to does not have a room type with the specified name</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownRoom">
<summary>There is no room running with that id</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.MissingRoomId">
<summary>You can't join the room when the RoomID is null or the empty string</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.RoomIsFull">
<summary>The room already has the maxmium amount of users in it.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NotASearchColumn">
<summary>The key you specified is not set as searchable. You can change the searchable keys in the admin panel for the server type</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.QuickConnectMethodNotEnabled">
<summary>The QuickConnect method (simple, facebook, kongregate...) is not enabled for the game. You can enable the various methods in the admin panel for the game</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownUser">
<summary>The user is unknown</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidPassword">
<summary>The password supplied is incorrect</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidRegistrationData">
<summary>The supplied data is incorrect</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidBigDBKey">
<summary>The key given for the BigDB object is not a valid BigDB key. Keys must be between 1 and 50 characters. Only letters, numbers, hyphens, underbars, and spaces are allowed.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.BigDBObjectTooLarge">
<summary>The object exceeds the maximum allowed size for BigDB objects.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.BigDBObjectDoesNotExist">
<summary>Could not locate the database object.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownTable">
<summary>The specified table does not exist.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownIndex">
<summary>The specified index does not exist.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidIndexValue">
<summary>The value given for the index, does not match the expected type.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NotObjectCreator">
<summary>The operation was aborted because the user attempting the operation was not the original creator of the object accessed.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.KeyAlreadyUsed">
<summary>The key is in use by another database object</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.StaleVersion">
<summary>BigDB object could not be saved using optimistic locks as it's out of date.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.CircularReference">
<summary>Cannot create circular references inside database objects</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.HeartbeatFailed">
<summary>The server could not complete the heartbeat</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidGameCode">
<summary>The game code is invalid</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.VaultNotLoaded">
<summary>Cannot access coins or items before vault has been loaded. Please refresh the vault first.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownPayVaultProvider">
<summary>There is no PayVault provider with the specified id</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.DirectPurchaseNotSupportedByProvider">
<summary>The specified PayVault provider does not support direct purchase</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.BuyingCoinsNotSupportedByProvider">
<summary>The specified PayVault provider does not support buying coins</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NotEnoughCoins">
<summary>The user does not have enough coins in the PayVault to complete the purchase or debit.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.ItemNotInVault">
<summary>The item does not exist in the vault.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidPurchaseArguments">
<summary>The chosen provider rejected one or more of the purchase arguments</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidPayVaultProviderSetup">
<summary>The chosen provider is not configured correctly in the admin panel</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownPartnerPayAction">
<summary>Unable to locate the custom PartnerPay action with the given key</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidType">
<summary>The given type was invalid</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.IndexOutOfBounds">
<summary>The index was out of bounds from the range of acceptable values</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidIdentifier">
<summary>The given identifier does not match the expected format</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidArgument">
<summary>The given argument did not have the expected value</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.LoggedOut">
<summary>This client has been logged out</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidSegment">
<summary>The given segment was invalid.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.GameRequestsNotLoaded">
<summary>Cannot access requests before Refresh() has been called.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.AchievementsNotLoaded">
<summary>Cannot access achievements before Refresh() has been called.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.UnknownAchievement">
<summary>Cannot find the achievement with the specified id.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NotificationsNotLoaded">
<summary>Cannot access notification endpoints before Refresh() has been called.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.InvalidNotificationsEndpoint">
<summary>The given notifications endpoint is invalid</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.NetworkIssue">
<summary>There is an issue with the network</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.OneScoreNotLoaded">
<summary>Cannot access OneScore before Refresh() has been called.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.PublishingNetworkNotAvailable">
<summary>The Publishing Network features are only avaliable when authenticated to PlayerIO using Publishing Network authentication. Authentication methods are managed in the connections setting of your game in the admin panel on PlayerIO.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.PublishingNetworkNotLoaded">
<summary>Cannot access profile, friends, ignored before Publishing Network has been loaded. Please refresh Publishing Network first.</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.DialogClosed">
<summary>The dialog was closed by the user</summary>
</member>
<member name="F:PlayerIO.GameLibrary.ErrorCode.AdTrackCheckCookie">
<summary>Check cookie required.</summary>
</member>
<member name="T:PlayerIO.GameLibrary.ErrorLog">
<summary>
The Player.IO ErrorLog service
<para>Here are some simple examples:</para>
<code>
PlayerIO.ErrorLog.WriteError("Error in my method");
try {
//Some code that can throw an exception...
} catch (Exception e) {
PlayerIO.ErrorLog.WriteError("Exception in my method", e);
}
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.ErrorLog.WriteError(System.String)">
<summary>Write an entry to the game's error log. In development the errors are just written to the console, in production they're written to a database and browseable from the admin panel</summary>
<param name="error">A short string describing the error without details. Example 'Unhandled exception'</param>
</member>
<member name="M:PlayerIO.GameLibrary.ErrorLog.WriteError(System.String,System.Exception)">
<summary>Write an entry to the game's error log. In development the error are just written to the console, in production they're written to a database and browseable from the admin panel</summary>
<param name="error">A short string describing the error without details. Example 'Unhandled exception'</param>
<param name="exception">The exception that caused the error</param>
</member>
<member name="M:PlayerIO.GameLibrary.ErrorLog.WriteError(System.String,System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
<summary>Write an entry to the games error log. In development the error are just written to the console, in production they're written to a database and browseable from the admin panel</summary>
<param name="error">A short string describing the error without details. Example 'Object not set to instance of an object'</param>
<param name="details">Describe the error in more detail if you have it. Example 'couldn't find the user 'bob' in the current game'</param>
<param name="stacktrace">The stacktrace (if available) of the error</param>
<param name="extraData">Any extra data you'd like to associate with the error log entry</param>
</member>
<member name="P:PlayerIO.GameLibrary.Interfaces.BaseGame.PlayerCount">
<summary>How many players are currently connected to this game room.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Interfaces.BaseGame.GameClosed">
<summary>This method is called when a game is closed.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Interfaces.BaseGame.GameStarted">
<summary>This method is called when a game is created.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Interfaces.BaseGame.ServerEnteredNoJoin">
<summary>
Called by the hosting server (in the production game server cluster) when it enters the NoJoin state. The game should take action accordingly.
<para>In order to support updating the system without abruptly ending games, rolling restarts are used which
moves servers through 3 states:
</para>
<list type="bullet">
<item><term>Live:</term><description>Games can be created/joined and everything is perfect.</description></item>
<item><term>NoCreate:</term><description>No new instances can be created on the server (they'll just be created on any of the many other servers in the player.io cluster).</description></item>
<item><term>NoJoin:</term><description>Nobody can join the instances running on this server.</description></item>
</list>
<para>Servers will start in live. When the system requires an update, the server will enter NoCreate and
stay there for many hours (12-24). By then, most of the instances will have closed by natural causes
(players leaving the games) and very few games will be left on the server.</para>
<para>The server then enteres NoJoin where nobody can join the last few remaning instances. The NoJoin state
lasts for about 6 hours, which gives the last few remaining games time to finish. The server will then
shutdown where it's highly unlikely that any games remain.</para>
<para>Since potentially games might still be running at the end of NoJoin (although it's highly unlikely),
the ServerEnteredNoJoin method is called whenever the server changes state into NoJoin. </para>
<para>This gives games the flexibility to handle the rolling restarts in a manner suited to their game. Only
persistent games (MMO's) will need to use this method, and the most likely usecase is that they send out
a "zone under maintenence, please reconnect" message to their client code, which simply rejoins the zone
which will be created on another server.</para>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Interfaces.BaseGame.GenerateDebugImage">
<summary>
Generate an image that can be displayed in the development server
</summary>
</member>
<member name="T:PlayerIO.GameLibrary.Message">
<summary>
Represents a message sent between client and server.
<para>A message consists of a string type, and a
payload of zero or more typed parameters.</para>
<para>For example here we create a simple message that the server broadcasts to connected players indicating that a round is starting:</para>
<code>
// message of type start with no payload
Message m = Message.Create("start");
// send the message to all connected players
Broadcast(m);
</code>
<para>Usually, it's much easier to simply use the convenience methods:</para>
<code>
public override void UserJoined(BasePlayer player) {
// send the player a message of type "mapinfo" with two pieces
// of data payload: the mapnam (string) and number of players (int)
player.Send("mapinfo", "fields-of-glory", PlayerCount );
// broadcast to all connected players a message with type "userjoined"
// and a single payload of just the player id (uint)
Broadcast("userjoined", player.Id);
}
</code>
<para>You can also build up messages as you go, if you don't know the exact payload untill runtime.</para>
<para>In this example we send out the ConnectIds of all connected players to every new player that joins the room.</para>
<code>
public override void UserJoined(BasePlayer player) {
// create a new message of type join
Message joinMessage = Message.Create("join");
// add all the currently connected userids to the message
foreach(var p in Players) {
joinMessage.Add(p.ConnectUserId);
}
// send the message to the player who joined
player.Send(joinMessage);
}
</code>
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Create(System.String,System.Object[])">
<summary>Create a new Message</summary>
<param name="type">The type of message to create.</param>
<param name="parameters">A variable list of the data to add to the message.</param>
<returns></returns>
</member>
<member name="P:PlayerIO.GameLibrary.Message.Type">
<summary>The type of the current message</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Message.Count">
<summary>The number of data entries in the message, excluding the type.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Message.Item(System.UInt32)">
<summary>Get the data stored in the mesage at the given index</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetString(System.UInt32)">
<summary>Gets the string at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetByteArray(System.UInt32)">
<summary>Gets the byte[] at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetBoolean(System.UInt32)">
<summary>Gets the bool at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetDouble(System.UInt32)">
<summary>Gets the double at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetFloat(System.UInt32)">
<summary>Gets the float at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetInteger(System.UInt32)">
<summary>Gets the int at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetInt(System.UInt32)">
<summary>Gets the int at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetUInt(System.UInt32)">
<summary>Gets the uint at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetUnsignedInteger(System.UInt32)">
<summary>Gets the uint at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetLong(System.UInt32)">
<summary>Gets the long at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetULong(System.UInt32)">
<summary>Gets the ulong at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.GetUnsignedLong(System.UInt32)">
<summary>Gets the ulong at the given index</summary><param name="index">The index to find the entry in</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.String)">
<summary>Add a string to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Int32)">
<summary>Add a int to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.UInt32)">
<summary>Add a uint to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Int64)">
<summary>Add a long to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.UInt64)">
<summary>Add a ulong to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Byte[])">
<summary>Add a byte[] to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Single)">
<summary>Add a float to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Double)">
<summary>Add a double to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Boolean)">
<summary>Add a bool to the message payload </summary><param name="value">the value to add</param>
</member>
<member name="M:PlayerIO.GameLibrary.Message.Add(System.Object[])">
<summary>
Add multiple pieces of data to the message in one go.
</summary>
<example>
Adding a string, a number and two boolean values to the message.
<code>somemessage.Add("a string", 1234, true, false)</code>
</example>
<param name="parameters">The data to add to the message</param>
</member>
<member name="T:PlayerIO.GameLibrary.Yahoo">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Yahoo.Profiles">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Yahoo.Relations">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Yahoo.UserToken">
<summary>DEPRECATED</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Yahoo.Refresh(PlayerIO.GameLibrary.Callback)">
<summary>DEPRECATED</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Yahoo.Refresh(PlayerIO.GameLibrary.Callback,PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>DEPRECATED</summary>
</member>
<member name="T:PlayerIO.GameLibrary.YahooProfiles">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfiles.MyProfile">
<summary>DEPRECATED</summary>
</member>
<member name="M:PlayerIO.GameLibrary.YahooProfiles.LoadProfiles(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.YahooProfile[]})">
<summary>DEPRECATED</summary>
</member>
<member name="M:PlayerIO.GameLibrary.YahooProfiles.LoadProfiles(System.String[],PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.YahooProfile[]},PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.PlayerIOError})">
<summary>DEPRECATED</summary>
</member>
<member name="T:PlayerIO.GameLibrary.YahooProfile">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfile.UserId">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfile.DisplayName">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfile.AvatarUrl">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfile.LastOnline">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooProfile.CountryCode">
<summary>DEPRECATED</summary>
</member>
<member name="T:PlayerIO.GameLibrary.YahooRelations">
<summary>The country code of the user</summary>
</member>
<member name="P:PlayerIO.GameLibrary.YahooRelations.Friends">
<summary>The country code of the user</summary>
</member>
<member name="M:PlayerIO.GameLibrary.YahooRelations.IsFriend(System.String)">
<summary>The country code of the user</summary>
</member>
<member name="M:PlayerIO.GameLibrary.YahooRelations.IsBlocked(System.String)">
<summary>The country code of the user</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Client.Web">
<summary>
Property used to access the Http Request service.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Client.BigDB">
<summary>
Property used to access the BigDB service.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Client.ErrorLog">
<summary>
Property used to access the ErrorLog service.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Client.GameFS">
<summary>
Property used to access the GameFS service.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Client.OneScore">
<summary>
Property used to access the OneScore service
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Client.GetUserPayVault(System.String)">
<summary>
Gets a PayVault object to access the PayVault of a target user. All functions call be called on this PlayerVault object except
GetBuyCoinsInfo, GetBuyDirectInfo, and UseBuyInfo
</summary>
<example>
This example credits user1 10 coins and debits user2 10 coins
<code>
<![CDATA[
class MyGame : PlayerIO.GameLibrary.Game<PlayerIO.GameLibrary.BasePlayer> {
public override void GameStarted() {
var user1PayVault = PlayerIO.GetUserPayVault("user1");
user1PayVault.Credit(10, "you earned some coins", null);
var user2PayVault = PlayerIO.GetUserPayVault("user2");
user1PayVault.Debit(10, "you lost some coins", null);
}
}
]]>
</code>
</example>
<param name="targetUserId">User id of the desired PayVault object</param>
<returns>Return a PayVault object for user <paramref name="targetUserId"/></returns>
</member>
<member name="T:PlayerIO.GameLibrary.RoomTypeAttribute">
<summary>
Use the [RoomType] attribute to assign a room type to a Game class.
</summary>
<example>
<code>
[RoomType("MyRoomType")]
public class MyGame : Game&lt;MyPlayer&gt; {
...
}
</code>
</example>
</member>
<member name="T:PlayerIO.GameLibrary.DebugAction">
<summary>
Assign this attribute to any method on your Game class, and the
development server will feature buttons to trigger your method.
<para>This is great during development because it allows you to trigger events directly on the server without having to trigger them from your client</para>
<para>If your method takes two int arguments (int x, int y), then
your debug action will show up on clicks to the debug visualization.</para>
</summary>
<example>
This code will cause a stop button to appear in the debug server when running the game.
<code>
[DebugAction("Stop", DebugAction.Icon.Stop)]
public void Stop() {
Console.WriteLine("Stopping...");
}
</code>
</example>
<example>
This is how you add a debug action that is accessible via the
right-click context menu on the debug visualization in the
development server.
<code>
[DebugAction("Add Obstacle", DebugAction.Icon.Add)]
public void PositionRock(int x, int y) {
// set a rock on position (x,y)
}
</code>
</example>
<example>
For the really nitpicky developers, it's possible to embed
an icon into a game and have it used instead of the builtin
icons.
<para>In this case, a 16x16 png called add.png is embedded in the game dll:</para>
<code>
[DebugAction("Add Obstacle", "add.png")]
public void PositionRock(int x, int y) {
// set a rock on position (x,y)
}
</code>
</example>
</member>
<member name="T:PlayerIO.GameLibrary.EmbeddedResource">
<summary>
A simple class to access resources embedded into the
game assembly (.dll file).
<para>
This class is useful along with the Game.GenerateDebugImage() method, because it allows you
to grab embedded images and use them when rendering the debug image.
</para>
<para>
To embed a file into the game assembly, add it to the project, right-click it in the solution
explorer and choose Properties. In the properties pane, change the Build Action to Embedded Resource.
The next time you build your solution that file will be copied into the assembly, and accessible
through this class.
</para>
</summary>
<example>
Using the debug visualization system to generate a new debug image every second, and
draw an image embedded as an embedded resource from the .dll file onto the debug image.
<code>
public class MyGame : Game&lt;BasePlayer&gt; {
public override void GameStarted() {
// Update the debug view once a second.
AddTimer(delegate {
RefreshDebugView();
}, 1000);
}
public override Image GenerateDebugImage() {
var img = new Bitmap(400, 400);
using(var g = Graphics.FromImage(debugImage)) {
// fill the background with blue
g.FillRectangle(Brushes.Blue, 0, 0, img.Width, img.Height);
// draw the embedded image "plane.png" at the offset (30,30)
var embeddedImage = EmbeddedResource.GetImage("plane.png");
g.DrawImage(embeddedImage, 30, 30);
}
return img;
}
}
</code>
</example>
</member>
<member name="M:PlayerIO.GameLibrary.EmbeddedResource.GetBytes(System.String)">
<summary>
Get the bytes[] of an embedded resource.
</summary>
<param name="filename">The suffix of the embedded filename to search for.</param>
<returns>The bytes found, or null.</returns>
</member>
<member name="M:PlayerIO.GameLibrary.EmbeddedResource.GetImage(System.String)">
<summary>
Get an embedded resource as an image.
</summary>
<param name="filename">The suffix of the embedded filename to search for.</param>
<returns>The image found, or null.</returns>
</member>
<member name="T:PlayerIO.GameLibrary.Timer">
<summary>A timer created by the Game.AddTimer(...) or Game.ScheduleCallback(...) methods</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Timer.Stop">
<summary>
Stops the timer. The timer cannot be restarted.
</summary>
</member>
<member name="T:PlayerIO.GameLibrary.BasePlayer">
<summary>
The base class you inherit from for your Player class.
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.Connection">
<summary>For internal usage</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.Id">
<summary>Every time a client connects, an Id is assigned that uniquely identifies them in the room as long as they remain connected.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.ConnectUserId">
<summary>The UserId that was originally used when the client called PlayerIO.Connect(...)</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.IPAddress">
<summary>The ip address the player is connected from</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.JoinData">
<summary>The data supplied by the client when the room was joined. That is, when the JoinRoom(...) or CreateJoinRoom(...) methods were called.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.PlayerObject">
<summary>
The PlayerObject of the connected player in the "PlayerObjects" BigDB table.
<p>This object is loaded via the GetPlayerObject() method or automatically when a player joins the game if the Game.PreloadPlayerObjects property is set to true.</p>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.PayVault">
<summary>
The PayVault vault of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.PartnerPay">
<summary>
The PartnerPay object of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.PlayerInsight">
<summary>
The PlayerInsight object of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.Notifications">
<summary>
The Notifications object of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.GameRequests">
<summary>
The GameRequests object of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.Achievements">
<summary>
The Achievements object of the connected player
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.Yahoo">
<summary>DEPRECATED</summary>
</member>
<member name="P:PlayerIO.GameLibrary.BasePlayer.PublishingNetwork">
<summary>
The PlayerIO Publishing Network object of the connected player
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.GetPlayerObject(PlayerIO.GameLibrary.Callback{PlayerIO.GameLibrary.DatabaseObject})">
<summary>
Gets the PlayerObject (from the BigDB PlayerObjects table) for the connected player. The object
is loaded from BigDB on first load, then reused for subsequent GetPlayerObject requests, which means that subsequent calls
to GetPlayerObjects will call the callback instantly.</summary>
<param name="callback">A callback that will be called with the loaded PlayerObject</param>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.RefreshPlayerObject(PlayerIO.GameLibrary.Callback)">
<summary>
Reloads the PlayerObject from the BigDB PlayerObjects table
</summary>
<param name="callback">A callback that will be called when the new playerobject is loaded.</param>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.Send(PlayerIO.GameLibrary.Message)">
<summary>Send a message to the connected client</summary>
<param name="message">The message to send</param>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.Send(System.String,System.Object[])">
<summary>
Send a message to the connected client without first having to construct a Message object.
</summary>
<param name="type">The type of message to send</param>
<param name="parameters">The data to put in the message to send</param>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.Disconnect">
<summary>Disconnects the client from the room.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.BasePlayer.GetDebugValues">
<summary>
Override this method to provide custom debug data for the playerlist in the development server.
<param>Each key-value pair is displayed in the playerlist as a column value, instead of the
default one-column-per-property.</param>
</summary>
<example>
This is how you'd override the method and provide two values for each player, that will
show up in the development server.
<code>
public override Dictionary&lt;string, string&gt; GetDebugValues() {
var dict = new Dictionary&lt;string, string&gt;();
dict["sum"] = (2+2).ToString();
dict["description"] = "...";
return dict;
}
</code>
</example>
<returns>A dictionary of values to present in the debug server</returns>
</member>
<member name="T:PlayerIO.GameLibrary.RoomData">
<summary>
The room data for a given room. Besides the .Save() method, the
class behaves exactly like a dictionary of string to string values.
</summary>
<example>
<code>
// reading a variable from room data
var somevariable = RoomData["myvarname"];
// looping over all room data
foreach(var kv in RoomData) {
Console.WriteLine("RoomData[" + kv.Key + "] = " + kv.Value );
}
// changing a variable and saving changes
// so future ListRooms have the updated room data
RoomData["myvariable"] = "new value";
RoomData.Save();
</code>
</example>
</member>
<member name="M:PlayerIO.GameLibrary.RoomData.Save">
<summary>Save changes to room data so clients listing rooms will get the updated data</summary>
</member>
<member name="T:PlayerIO.GameLibrary.Game`1">
<summary>
The base class for all Player.IO Games. Inherit from this class to build your game.
<para>The Game class is the main serverside class of a Multiplayer Game.
It contains methods that are called when messages are received, when players
joins or leaves the game, and methods to interact with the players that are in the game.</para>
<para>It's an abstract class, so you must create your game by inheriting from it.</para>
<para>The Game class is also generic which means that it's parameterized and must
be told what class is used to represent a player connected to a game. The player
class must inherit from PlayerIO.GameLibrary.BasePlayer.</para>
</summary>
<example>
Here is a simple bare-bones game and player implementation that simply broadcasts
all received messages to all connected users. A bounce server if you will.
<code>
public class MyPlayer : BasePlayer {
// put properties here if you want them on your player
}
[RoomType("MyRoomType")]
public class MyGame : Game&lt;MyPlayer&gt; {
public override void GameStarted() {
// a game has been created
}
public override void UserLeft(MyPlayer player) {
// a user has left a game
}
public override void GotMessage(MyPlayer player, Message message) {
// when getting a message, simply send it to all players connected
// to the room.
Broadcast(message);
}
}
</code>
</example>
<typeparam name="P">The type of the Players in your game. This must be a class that inherits from BasePlayer.</typeparam>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.PreloadPlayerObjects">
<summary>Should new Player objects have their .PlayerObject loaded before they join the game?.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.PreloadPayVaults">
<summary>Should new Player objects have their .PayVault objects loaded before they join the game?.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.PlayerCount">
<summary>How many players are currently connected to this game room.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.RoomData">
<summary>
The data for the room. Room data is given when the room is created, returned when rooms are listed, and can be changed by the serverside game code.
</summary>
<example>
<code>
// reading a variable from room data
var somevariable = RoomData["myvarname"];
// looping over all room data
foreach(var kv in RoomData) {
Console.WriteLine("RoomData[" + kv.Key + "] = " + kv.Value );
}
// changing a variable and saving changes
// so future ListRooms have the updated room data
RoomData["myvariable"] = "new value";
RoomData.Save();
</code>
</example>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.InDevelopmentServer">
<summary>True if the game is currently running in the development server, False if the game is running in production.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.RoomId">
<summary>The id of the current room. This is the same id that would be used when calling JoinRoom(...) from a client.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.Visible">
<summary>
If the room is visible when listing rooms. Can be changed by your game code on the server.
<para>This property is useful when you want to create a room, spend some amount of time setting
it up, and when that is done mark it as visible for others who list rooms.</para>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.Players">
<summary>An enumerable list of all the players connected. Use foreach to loop over all the players.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.ForEachPlayer(System.Action{`0})">
<summary>Calls the given delegate on each player in the room.</summary>
<param name="action">The action to perform with each player.</param>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.AddMessageHandler(System.String,System.Action{`0,PlayerIO.GameLibrary.Message})">
<summary>
Register a message handler for the specific message type.
You can use this to easily hookup delegates that are fired when
messages of the given type are sent from the client.
example:
AddMessageHandler("update", delegate(Player player, Message message){
// this code will run when an "update" message is received
})
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.RefreshDebugView">
<summary>
Causes the development server to display the image returned by GenerateDebugImage();
</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.Broadcast(PlayerIO.GameLibrary.Message)">
<summary>
Broadcast a message to all connected players
</summary>
<param name="message">the message to broadcast</param>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.Broadcast(System.String,System.Object[])">
<summary>
Broadcast a message to all connected players
</summary>
<param name="type">the type of the message to broadcast</param>
<param name="parameters">the data of the message to broadcast</param>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.ServerEnteredNoJoin">
<summary>
Called by the hosting server (in the production game server cluster) when it enters the NoJoin state. The game should take action accordingly.
<para>In order to support updating the system without abruptly ending games, rolling restarts are used which
moves servers through 3 states:
</para>
<list type="bullet">
<item><term>Live:</term><description>Games can be created/joined and everything is perfect.</description></item>
<item><term>NoCreate:</term><description>No new instances can be created on the server (they'll just be created on any of the many other servers in the player.io cluster).</description></item>
<item><term>NoJoin:</term><description>Nobody can join the instances running on this server.</description></item>
</list>
<para>Servers will start in Live. When the system requires an update, the server will enter NoCreate and
stay there for many hours (12-24). By then, most of the instances will have closed by natural causes
(players leaving the games) and very few games will be left on the server.</para>
<para>The server then enters NoJoin where nobody can join the last few remaning instances. The NoJoin state
lasts for about 6 hours, which gives the last few remaining games time to finish. The server will then
shutdown where it's highly unlikely that any games remain.</para>
<para>Since potentially games might still be running at the end of NoJoin (although it's highly unlikely),
the ServerEnteredNoJoin method is called whenever the server changes state into NoJoin. </para>
<para>This gives games the flexibility to handle the rolling restarts in a manner suited to their game. Only
persistent games (MMO's) will need to use this method, and the most likely usecase is that they send out
a "zone under maintenence, please reconnect" message to their client code, which simply rejoins the zone
which will then be created on another server.</para>
</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.PlayerIO">
<summary>Access to the Player.IO webservices</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.AddTimer(System.Action,System.Int32)">
<summary> Creates a new timer for calling a specified method at some interval.</summary>
<param name="callback">The method to be used for callbacks. Example usage: delegate(){ Console.WriteLine("called"); }</param>
<param name="interval">The interval in milliseconds between callbacks</param>
<returns>A new Timer object</returns>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.ScheduleCallback(System.Action,System.Int32)">
<summary>Schedules a one-time callback in the future</summary>
<param name="callback">The method to be used for callbacks. Example usage: delegate(){ Console.WriteLine("called"); }</param>
<param name="dueTime">The offset time in milliseconds for the timeout. Example: 1 second in the future is 1000</param>
<returns>A new Timer object</returns>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.AllowUserJoin(`0)">
<summary>Called whenever a player attempts to join: If you override this method, simply return true to allow the join, and false to disallow the join. If you don't override it, it will allow everyone by default.
<para>Note that the user has not fully joined the game when this method is called, so Broadcast messages won't reach the user.</para></summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.UserJoined(`0)">
<summary>Called whenever a client has joined the room.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.UserLeft(`0)">
<summary>Called whenever a client leaves the room. The room is closed when the last person leaves the room.</summary>
</member>
<member name="M:PlayerIO.GameLibrary.Game`1.GotMessage(`0,PlayerIO.GameLibrary.Message)">
<summary>Called when data is received from the player.</summary>
</member>
<member name="P:PlayerIO.GameLibrary.Game`1.ServerCache">
<summary>Use server cache to store information in a game server. This information will be available in all rooms hosted in the game server where you stored it but will not be available
in all your rooms since multiple game servers are used to host all your rooms.
Server cache is ideal to cache BigDb DatabaseObject or any other data that is expensive to gather.</summary>
</member>
</members>
</doc>