Skip to content

Instantly share code, notes, and snippets.

View eouw0o83hf's full-sized avatar

Nathan Landis eouw0o83hf

View GitHub Profile
@eouw0o83hf
eouw0o83hf / Change.cs
Created August 13, 2018 14:20
Change: A C# handler for null-safe change handling
using System;
using Newtonsoft.Json;
namespace eouw0o83hf.Gist.Change
{
/// <summary>
/// A lightweight wrapper which tracks a change to a property
/// and serializes to one json property for ease of reading in
/// an event stream.
/// </summary>
@eouw0o83hf
eouw0o83hf / UploadController.cs
Created August 23, 2018 02:24
File upload with React component and dotnet core web API controller
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace Demo.Web.Controllers
{
public class UploadController : Controller
{
@eouw0o83hf
eouw0o83hf / CrazyCaseTestExtensions.cs
Created July 29, 2019 18:28
CrAzYcAsE test extensions
using System;
using System.Linq;
using Xunit;
namespace Example.Tests
{
public static class TestExtensions
{
public static string ToCrAzYcAsE(this string input)
=> input