Skip to content

Instantly share code, notes, and snippets.

View mikernet's full-sized avatar

Mike Marynowski mikernet

View GitHub Profile
@mikernet
mikernet / ImtRepro.csproj
Created October 27, 2026 08:08
Profile-guided Mono WebAssembly AOT: interp.c:3420 abort when an interpreted interface method with more than 8 parameters shares an IMT slot (repro)
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<!-- Writes obj/Release/net10.0/wasm/for-publish/dotnet.native.js.symbols, which names the wasm-function[N] frames of the abort's stack. -->
<WasmEmitSymbolMap>true</WasmEmitSymbolMap>
</PropertyGroup>
@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, 2024 08:56
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 July 2, 2024 09:01
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;