Skip to content

Instantly share code, notes, and snippets.

Fons Sonnemans sonnemaf

Block or report user

Report or block sonnemaf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Linq4Span.cs
using System;
using System.Runtime.InteropServices;
namespace Linq4Span {
// QUESTION: Does LINQ for ReadOnlySpan<T> make sense or is the extra Closure class a showstopper?
// QUESTION: Should it only support ReadOnlySpan<T> and not Span<T>
// QUESTION: What about Memory<T> and ReadonlyMemory<T>
@sonnemaf
sonnemaf / .editorconfig
Last active Nov 27, 2019
My personal EditorConfig file
View .editorconfig
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
@sonnemaf
sonnemaf / MainPage.xaml
Created Jun 18, 2018
UnderlinedRadioButtonStyle
View MainPage.xaml
<Page x:Class="App34.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App34"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
RequestedTheme="Dark"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Page.Resources>
@sonnemaf
sonnemaf / MainPage.xaml
Last active Apr 5, 2018
RequiredHeaderTemplate and BoldHeaderTemplate for XAML #UWP
View MainPage.xaml
<Page x:Class="App18.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App18"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<FontWeight x:Key="HeaderFontWeight">Medium</FontWeight>
@sonnemaf
sonnemaf / gist:0001b88db198be33d83f346a47ad874f
Created Dec 14, 2017
InParameterOnNonReadonlyStructAnalyzer
View gist:0001b88db198be33d83f346a47ad874f
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
@sonnemaf
sonnemaf / NavigateBackAction.cs
Created Oct 13, 2015
NavigateBackAction XAML Behavior for Blend
View NavigateBackAction.cs
public class NavigateBackAction : DependencyObject, IAction {
/// <summary>
/// Navigate the Frame back
/// </summary>
/// <param name="sender"></param>
/// <param name="parameter"></param>
/// <returns>True if navigated</returns>
public object Execute(object sender, object parameter) {
You can’t perform that action at this time.