Beispiel #1
0
 /// <summary>
 /// Asynchronously sends an Open Graph action which will create a new object from the properties provided.
 /// </summary>
 /// <param name="actionId">Carrot action id.</param>
 /// <param name="actionProperties">Parameters to be submitted with the action.</param>
 /// <param name="objectId">Carrot object id.</param>
 /// <param name="objectProperties">Parameters to be submitted with the action.</param>
 /// <param name="objectInstanceId">Object instance id to create or re-use.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 /// <exception cref="T:System.ArgumentNullException"/>
 /// <exception cref="T:System.ArgumentException"/>
 public void postActionAsync(string actionId, IDictionary actionProperties, string objectId, IDictionary objectProperties, string objectInstanceId = null, AsynchCallComplete complete = null)
 {
     ThreadPool.QueueUserWorkItem((object state) => {
         Response ret = postAction(actionId, actionProperties, objectId, objectProperties, objectInstanceId);
         if(complete != null) complete(this, ret);
     });
 }
Beispiel #2
0
 /// <summary>
 /// Asynchronously post a high score to Carrot.
 /// </summary>
 /// <param name="score">Score.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 public void postHighScoreAsync(uint score, AsynchCallComplete complete = null)
 {
     ThreadPool.QueueUserWorkItem((object state) => {
         Response ret = postHighScore(score);
         if(complete != null) complete(this, ret);
     });
 }
Beispiel #3
0
 /// <summary>
 /// Asynchronously sends an Open Graph action which will create a new object from the properties provided.
 /// </summary>
 /// <param name="actionId">Carrot action id.</param>
 /// <param name="objectId">Carrot object id.</param>
 /// <param name="objectProperties">Parameters to be submitted with the action.</param>
 /// <param name="objectInstanceId">Object instance id to create or re-use.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 public void postActionAsync(string actionId, string objectId, IDictionary objectProperties, string objectInstanceId, AsynchCallComplete complete = null)
 {
     postActionAsync(actionId, null, objectId, objectProperties, objectInstanceId);
 }
Beispiel #4
0
 /// <summary>
 /// Asynchronously sends an Open Graph action which will use an existing object.
 /// </summary>
 /// <param name="actionId">Carrot action id.</param>
 /// <param name="objectInstanceId">Carrot object instance id.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 public void postActionAsync(string actionId, string objectInstanceId, AsynchCallComplete complete = null)
 {
     postActionAsync(actionId, null, objectInstanceId, complete);
 }
Beispiel #5
0
 /// <summary>
 /// Asynchronously post an achievement to Carrot.
 /// </summary>
 /// <param name="achievementId">Carrot achievement id.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 /// <exception cref="T:System.ArgumentNullException"/>
 public void postAchievementAsync(string achievementId, AsynchCallComplete complete = null)
 {
     ThreadPool.QueueUserWorkItem((object state) => {
         Response ret = postAchievement(achievementId);
         if(complete != null) complete(this, ret);
     });
 }
Beispiel #6
0
 /// <summary>
 /// Asynchronously ost a 'Like' action that likes the Publisher's Facebook Page.
 /// </summary>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 public void likePublisherAsync(AsynchCallComplete complete = null)
 {
     ThreadPool.QueueUserWorkItem((object state) => {
         Response ret = likePublisher();
         if(complete != null) complete(this, ret);
     });
 }
Beispiel #7
0
 /// <summary>
 /// Asynchronously post a 'Like' action that likes an Open Graph object.
 /// </summary>
 /// <param name="objectId">The instance id of the Carrot object.</param>
 /// <param name="complete">Delegate which is called upon completion of the call.</param>
 public void likeObjectAsync(string objectId, AsynchCallComplete complete = null)
 {
     ThreadPool.QueueUserWorkItem((object state) => {
         Response ret = likeObject(objectId);
         if(complete != null) complete(this, ret);
     });
 }