public void GetDirectMessages(string user, int limit)
{
Uri query = new Uri(string.Format(
"/users/{0}/directed_messages?include=user,user[avatar],recipient,recipient[avatar],pictures&limit={1}",
user,
limit.ToString()), UriKind.Relative);
//todo: zamiast query stringa w postaci stringa to lepiej zastosować klasę HttpQueryString
lock (httpAsyncClientLock)
{
//jako state przekazujemy cały obiekt,aby można było pobrać później z niego ResponseMessage
blipHttpClientAsync.BeginSend(
new HttpRequestMessage("GET", query), new AsyncCallback(AfterStatusesLoaded), blipHttpClientAsync);
}
}