private bool DeactivateTemplateBundleByID(string template_bundle_id, bool isAsync, DeactivateTemplateBundleByIDCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.feed.deactivateTemplateBundleByID" } }; Utilities.AddRequiredParameter(parameterList, "template_bundle_id", template_bundle_id); if (isAsync) { SendRequestAsync<feed_deactivateTemplateBundleByID_response, bool>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<bool>(callback), state); return true; } var response = SendRequest<feed_deactivateTemplateBundleByID_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return response == null ? true : response.TypedValue; }
/// <summary> /// Deactivates a previously registered template bundle. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey)); /// api.Feed.DeactivateTemplateBundleByIDAsync(Constants.TemplateBundleId, AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(bool result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <param name="template_bundle_id">The template bundle ID used to identify a previously registered template bundle. The ID is the one returned by a previous call to Feed.RegisterTemplateBundle.</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 true if the specified template was deactivated.</returns> public void DeactivateTemplateBundleByIDAsync(string template_bundle_id, DeactivateTemplateBundleByIDCallback callback, Object state) { DeactivateTemplateBundleByID(template_bundle_id, true, callback, state); }