This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GzipHandler : DelegatingHandler | |
{ | |
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
{ | |
if (request.Content != null && | |
request.Content.Headers.ContentType != null && | |
(request.Content.Headers.ContentType.MediaType == "application/gzip" || | |
request.Content.Headers.ContentType.MediaType == "application/deflate")) | |
{ | |
string encodingType = request.Content.Headers.ContentType.MediaType.Split('/').Last(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AkavacheExtensions | |
{ | |
public static IObservable<string> GetOrFetchWithETag(this IBlobCache cache, string url) | |
{ | |
var result = | |
// Get from cache | |
cache.GetObject<string>(url) | |
// Cached values are true | |
.Select(x => Tuple.Create(x, true)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Xamarin.Forms; | |
using System.Collections; | |
namespace YourNamespace.Views.Controls { | |
public class BindablePicker : Picker | |
{ | |
public BindablePicker() | |
{ | |
this.SelectedIndexChanged += OnSelectedIndexChanged; |