Пример #1
0
        public async Task HttpSample(bool secure)
        {
            var client = new HttpClient();

            ad.HandlerType = typeof(HttpMessageInvoker).GetField("handler", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(client).GetType();
            ad.RenderStream(await client.GetStreamAsync(secure ? "https://www.xamarin.com" : Application.WisdomUrl));
        }
Пример #2
0
        public override void FinishedLoading(NSUrlConnection connection)
        {
            Application.Done();
            var ms = new MemoryStream(result);

            ad.RenderStream(ms);
        }
Пример #3
0
        //
        // Invoked when we get the stream back from the twitter feed
        // We parse the RSS feed and push the data into a
        // table.
        //
        void FeedDownloaded(IAsyncResult result)
        {
            Application.Done();
            var request = result.AsyncState as HttpWebRequest;

            try {
                var response = request.EndGetResponse(result);
                ad.RenderStream(response.GetResponseStream());
            } catch (Exception e) {
                Debug.WriteLine(e);
            }
        }