Skip to content

Instantly share code, notes, and snippets.

Avatar

Peter Foot peterfoot

View GitHub Profile
@peterfoot
peterfoot / OnPlatform2.cs
Created Oct 13, 2015
Replacement for Xamarin.Forms.OnPlatform which supports the Windows (WinRT) platforms.
View OnPlatform2.cs
namespace InTheHand.Forms
{
/// <summary>
/// Replacement for Xamarin.Forms.OnPlatform which supports the Windows (WinRT) platforms.
/// </summary>
/// <typeparam name="T"></typeparam>
public sealed class OnPlatform2<T>
{
public OnPlatform2()
{
View IPAddress.cs
namespace InTheHand.Net
{
/// <summary>
/// Helper network-order conversion functions for the Universal Windows Platform.
/// </summary>
public static class IPAddress
{
/// <summary>
/// Converts a short value from network byte order to host byte order.
/// </summary>
View DateTimeOffsetExtensions.cs
using System;
namespace InTheHand
{
/// <summary>
/// Helper class for DateTimeOffset.
/// </summary>
public static class DateTimeOffsetHelper
{
private static DateTimeOffset dt = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero);