Skip to content

Instantly share code, notes, and snippets.

View mikernet's full-sized avatar

Mike Marynowski mikernet

View GitHub Profile
@mikernet
mikernet / CopyOnWriteDictionary.cs
Last active November 18, 2023 03:34
Thread-Safe, Lock-Free, Append-Only, Copy-On-Write Dictionary
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
namespace Singulink.Collections
@mikernet
mikernet / Caster.cs
Last active November 13, 2018 11:13
Provides super fast casting support that avoids boxing with compiled expressions
// Caster by Mike Marynowski
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq.Expressions;
namespace Singulink.Reflection
{
@mikernet
mikernet / BoxCache.cs
Last active March 22, 2021 00:36
Value Type Box Cache
// Box Cache implementation by Mike Marynowski
// View the article here: http://www.singulink.com/CodeIndex/post/value-type-box-cache
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@mikernet
mikernet / MethodBindingExtension.cs
Last active July 2, 2022 03:50
Updated Ultimate WPF Method Binding Extension
// Updated Ultimate WPF Event Method Binding implementation by Mike Marynowski
// View the article here: http://www.singulink.com/CodeIndex/post/updated-ultimate-wpf-event-method-binding
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
@mikernet
mikernet / MethodBindingExtension.cs
Last active September 16, 2022 22:22
Ultimate WPF Event Method Binding Extension
// Ultimate WPF Event Method Binding implementation by Mike Marynowski
// View the article here: http://www.singulink.com/CodeIndex/post/building-the-ultimate-wpf-event-method-binding-extension
// Licensed under the Code Project Open License: http://www.codeproject.com/info/cpol10.aspx
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;