Skip to content

Instantly share code, notes, and snippets.

View neilkennedy's full-sized avatar

Neil Kennedy neilkennedy

View GitHub Profile
@yetanotherchris
yetanotherchris / converting-to-net-core.md
Last active June 25, 2018 06:53
Notes on converting Roadkill wiki (MVC 3/4) to .net core (MVC 6)
  • RedirectToRouteResult is now RedirectToActionResult, with an ActionName property
  • No System.Runtime.Caching - replace it with IMemoryCache (Microsoft.Extensions.Caching.Memory)
  • typeof(x).Assembly is now typeof(x).GetTypeInfo().Assembly
  • MongoCollection has changed
  • StringComparison.InvariantCultureIgnoreCase is gone, easy replacement
  • Configuration + Sections are totally different
  • HttpContext and HttpRequest etc. now found in Microsoft.AspNetCore.Http.Abstractions - Microsoft.AspNetCore.Http.HttpRequest
  • Request.RequestUri is now various new properties, for example Request.Host (a HostString)
  • WebActivatorEx?
  • DependencyResolver?
@praeclarum
praeclarum / Layout.cs
Created March 16, 2013 05:23
A C# syntax for NSLayoutConstraints.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using MonoTouch.UIKit;
namespace Async.iOS
{
public static class Layout
{
@nicwise
nicwise / gist:1431457
Created December 4, 2011 22:13
threading stuff
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
Task.Factory.StartNew(() => {
Console.WriteLine ("ping");
Thread.Sleep(4000);
Console.WriteLine ("pong");
return "from the thread";