///<summary> ///</summary> ///<param name="ar"></param> ///<param name="postData"></param> public BatchRecord(AsyncResult ar, string postData) { AsyncResult = ar; PostData = postData; }
private photo Upload(string aid, string caption, FileSystemInfo data, long uid, byte[] rawData, string contentType, bool isAsync, UploadCallback callback, Object state) { var parameterList = new Dictionary<string, string> {{"method", "facebook.photos.upload"}}; Utilities.AddOptionalParameter(parameterList, "aid", aid); Utilities.AddOptionalParameter(parameterList, "caption", caption); Utilities.AddOptionalParameter(parameterList, "uid", uid); if (isAsync) { AsyncResult ar = new AsyncResult(OnFacebookCallCompleted<photo>, new FacebookCallCompleted<photo>(callback), state); UploadFile(parameterList, rawData, contentType, ar); return null; } #if !SILVERLIGHT var response = ExecuteApiImageUpload(data, parameterList); return !string.IsNullOrEmpty(response) ? Utilities.DeserializeXML<photos_upload_response>(response) : null; #else return null; #endif }