Skip to content

Instantly share code, notes, and snippets.

View JonDouglas's full-sized avatar
📦
Busy working on NuGet. I'll try my best to get around to you.

Jon Douglas JonDouglas

📦
Busy working on NuGet. I'll try my best to get around to you.
View GitHub Profile
@JonDouglas
JonDouglas / webservice
Last active August 29, 2015 13:56
Xamarin Web Services
using System;
using System.Collections.Generic;
using System.Json;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace Xamarin.WebServicesAsync.Rest.Droid.Client
{
@JonDouglas
JonDouglas / MakeChocolate
Last active August 29, 2015 13:56
MakeChocolate
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MakeChocolate
{
public class Program
{
@JonDouglas
JonDouglas / AndroidService
Created February 11, 2014 21:35
Android Service
using Android.App;
using Android.Content;
using Android.Widget;
using Android.Util;
using Android.OS;
using System.Threading.Tasks;
using System.Threading;
namespace Demo2HelloService
{
@JonDouglas
JonDouglas / AndroidServiceActivity
Created February 11, 2014 21:37
Android Service Activity
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Graphics;
using Android.Util;
@JonDouglas
JonDouglas / Rounding
Last active August 29, 2015 13:56
Rounding
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Rounding
{
public class Program
{
public static void Main(string[] args)
@JonDouglas
JonDouglas / servicecontainer.cs
Last active August 29, 2015 14:03
ServiceContainer
public static class ServiceContainer
{
static readonly Dictionary<Type, Lazy<object>> services = new Dictionary<Type, Lazy<object>>();
public static void Register<T>(Func<T> function)
{
services[typeof(T)] = new Lazy<object>(() => function());
}
public static T Resolve<T>()
@JonDouglas
JonDouglas / gist:f8b0e3e306b3b9a8371f
Created September 10, 2014 20:21
FormsRelativeLayout
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace FormsPlayground
{
class RelativeLayoutDemoPage : ContentPage
public class ApplicationUserManager : UserManager<ApplicationUser>
{
public ApplicationUserManager(IUserStore<ApplicationUser> store)
: base(store)
{
}
public static ApplicationUserManager Create(
IdentityFactoryOptions<ApplicationUserManager> options,
IOwinContext context)
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
namespace NewCameraBroadcast
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;