| title | author | date | source | snippet | gist |
|---|---|---|---|---|---|
MSBuild Version Properties Cheatsheet |
natemcmaster |
September 18, 2019 |
Based on Stack Overflow
| internal static class SafeNativeMethods | |
| { | |
| [DllImport("dwmapi", SetLastError = true)] | |
| private static extern int DwmIsCompositionEnabled([MarshalAs(UnmanagedType.Bool)] out bool isEnabled); | |
| public static bool SafeDwmIsCompositionEnabled() | |
| { | |
| bool result = false; | |
| if (Environment.OSVersion.Version.Major >= 6) | |
| { |
| // I'm tired of extensions that automatically: | |
| // - show welcome pages / walkthroughs | |
| // - show release notes | |
| // - send telemetry | |
| // - recommend things | |
| // | |
| // This disables all of that stuff. | |
| // If you have more config, leave a comment so I can add it!! | |
| { |
| using System.Buffers; | |
| using System.Net.WebSockets; | |
| var builder = WebApplication.CreateBuilder(args); | |
| var app = builder.Build(); | |
| app.MapGet("/ws", async (HttpContext context) => | |
| { | |
| const int MaxMessageSize = 1024 * 1024; |
| title | author | date | source | snippet | gist |
|---|---|---|---|---|---|
MSBuild Version Properties Cheatsheet |
natemcmaster |
September 18, 2019 |
Based on Stack Overflow
| namespace Sagas | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| class Program | |
| { | |
| static ActivityHost[] processes; |