예제 #1
0
파일: Links.cs 프로젝트: lsmolic/hangoutsrc
        private long Post(long uid, Uri url, string comment, bool isAsync, PostCallback callback, Object state)
        {
            var parameterList = new Dictionary <string, string> {
                { "method", "facebook.links.post" }
            };

            Utilities.AddRequiredParameter(parameterList, "uid", uid);
            Utilities.AddRequiredParameter(parameterList, "url", url.ToString());
            Utilities.AddRequiredParameter(parameterList, "comment", comment);

            if (isAsync)
            {
                SendRequestAsync <links_post_response, long>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted <long>(callback), state);
                return(0);
            }

            var response = SendRequest <links_post_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));

            return(response == null ? -1 : response.TypedValue);
        }
예제 #2
0
 public void Post(WaveStream stream, PostCallback callback)
 {
     mSpeechVerifier.Post(stream, callback);
 }
예제 #3
0
 public void Post(string filename, string languageCode, string livenessText, PostCallback callback)
 {
     mSpeechVerifier.Post(filename, languageCode, livenessText, callback);
 }
예제 #4
0
 public void Post(string filename, SpeechContexts contexts, PostCallback callback)
 {
     mSpeechVerifier.Post(filename, contexts, callback);
 }
예제 #5
0
 public void Post(string filename, PostCallback callback)
 {
     mSpeechVerifier.Post(filename, callback);
 }
예제 #6
0
 public void Post(PostCallback callback)
 {
     mSpeechVerifier.Post(callback);
 }
        private long Post(long uid, Uri url, string comment, bool isAsync, PostCallback callback, Object state)
        {
            var parameterList = new Dictionary<string, string> { { "method", "facebook.links.post" } };
            Utilities.AddRequiredParameter(parameterList, "uid", uid);
            Utilities.AddRequiredParameter(parameterList, "url", url.ToString());
            Utilities.AddRequiredParameter(parameterList, "comment", comment);

            if (isAsync)
            {
                SendRequestAsync<links_post_response, long>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<long>(callback), state);
                return 0;
            }

            var response = SendRequest<links_post_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey));
            return response == null ? -1 : response.TypedValue;
        }
 public void PostStereo(WaveStream stream, SpeechAudioChannel channel, PostCallback callback)
 {
     mSpeechIdentifier.PostStereo(stream, channel, callback);
 }
 public void Post(PostCallback callback)
 {
     mSpeechIdentifier.Post(callback);
 }
 public void PostStereo(string filename, SpeechAudioChannel channel, PostCallback callback)
 {
     mSpeechIdentifier.PostStereo(filename, channel, callback);
 }
예제 #11
0
 public void Post(WaveStream stream, PostCallback callback)
 {
     mSpeechEnroller.Post(stream, callback);
 }
예제 #12
0
 public void Post(string filename, PostCallback callback)
 {
     mSpeechEnroller.Post(filename, callback);
 }
예제 #13
0
 public void Post(PostCallback callback)
 {
     mSpeechEnroller.Post(callback);
 }
예제 #14
0
 public void Post(WaveStream stream, SpeechContexts contexts, PostCallback callback)
 {
     mSpeechVerifier.Post(stream, contexts, callback);
 }
 /// <summary>
 /// Lets a user post a link on their Wall through your application.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Links.PostAsync(Constants.UserId, new Uri("http://www.bing.com"), "I'm checking out Bing.", AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(long result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="uid">The user ID of the user posting the link.</param>
 /// <param name="url">The URL for the link.</param>
 /// <param name="comment">The comment the user included with the link.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>        
 /// <returns>This method returns a link_id if successful.</returns>
 public long PostAsync(long uid, Uri url, string comment, PostCallback callback, Object state)
 {
     return Post(uid, url, comment, true, callback, state);
 }
예제 #16
0
 public void Post(WaveStream stream, string languageCode, string livenessText, PostCallback callback)
 {
     mSpeechVerifier.Post(stream, languageCode, livenessText, callback);
 }
예제 #17
0
파일: Links.cs 프로젝트: lsmolic/hangoutsrc
 /// <summary>
 /// Lets a user post a link on their Wall through your application.
 /// </summary>
 /// <example>
 /// <code>
 /// private static void RunDemoAsync()
 /// {
 ///     Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.ApplicationSecret, Constants.SessionKey));
 ///     api.Links.PostAsync(Constants.UserId, new Uri("http://www.bing.com"), "I'm checking out Bing.", AsyncDemoCompleted, null);
 /// }
 ///
 /// private static void AsyncDemoCompleted(long result, Object state, FacebookException e)
 /// {
 ///     var actual = result;
 /// }
 /// </code>
 /// </example>
 /// <param name="uid">The user ID of the user posting the link.</param>
 /// <param name="url">The URL for the link.</param>
 /// <param name="comment">The comment the user included with the link.</param>
 /// <param name="callback">The AsyncCallback delegate</param>
 /// <param name="state">An object containing state information for this asynchronous request</param>
 /// <returns>This method returns a link_id if successful.</returns>
 public long PostAsync(long uid, Uri url, string comment, PostCallback callback, Object state)
 {
     return(Post(uid, url, comment, true, callback, state));
 }