private IList<template_bundle> GetRegisteredTemplateBundles(bool isAsync, GetRegisteredTemplateBundlesCallback callback, Object state) { var parameterList = new Dictionary<string, string> { { "method", "facebook.feed.getRegisteredTemplateBundles" } }; if (isAsync) { SendRequestAsync<feed_getRegisteredTemplateBundles_response, IList<template_bundle>>(parameterList, !string.IsNullOrEmpty(Session.SessionKey), new FacebookCallCompleted<IList<template_bundle>>(callback), state, "template_bundle"); return null; } var response = SendRequest<feed_getRegisteredTemplateBundles_response>(parameterList, !string.IsNullOrEmpty(Session.SessionKey)); return response == null ? null : response.template_bundle; }
/// <summary> /// Retrieves the full list of all the template bundles registered by the requesting application. /// </summary> /// <example> /// <code> /// private static void RunDemoAsync() /// { /// Api api = new Api(new DesktopSession(Constants.ApplicationKey, Constants.ApplicationSecret, Constants.SessionSecret, Constants.SessionKey)); /// api.Feed.GetRegisteredTemplateBundlesAsync(AsyncDemoCompleted, null); /// } /// /// private static void AsyncDemoCompleted(IList<template_bundle> result, Object state, FacebookException e) /// { /// var actual = result; /// } /// </code> /// </example> /// <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 List of template_bundles.</returns> public void GetRegisteredTemplateBundlesAsync(GetRegisteredTemplateBundlesCallback callback, Object state) { GetRegisteredTemplateBundles(true, callback, state); }