Skip to content

Instantly share code, notes, and snippets.

@TCGV
TCGV / ExceptionSerializer.cs
Created June 2, 2020 20:05
Alternative for serializing exceptions without decorating them with "SerializableAttribute"
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Reflection;
namespace Tcgv
{
public static class ExceptionSerializer
{
public static string Serialize(Exception exc)
@TCGV
TCGV / Injector.cs
Created December 4, 2018 15:03
Simple dependency injection class
using System;
using System.Collections.Generic;
namespace Tcgv
{
public static class Injector
{
static Injector()
{
allocators = new Dictionary<Type, Func<object[], object>>();