Skip to content

Instantly share code, notes, and snippets.

View danmoseley's full-sized avatar
:shipit:

Dan Moseley danmoseley

:shipit:
  • Microsoft
  • Jackson, WY
  • 09:46 (UTC -07:00)
View GitHub Profile
@danmoseley
danmoseley / gist:81b28745c0886e81e307d8339a21c286
Created January 23, 2017 19:19
defines not in coreclr corelib code
BINDER_DEBUG_LOG
BUILDTYPE_RET
DEBUGGING_SUPPORTED
ENABLE_DOWNLEVEL_FOR_NLS
EnC_SUPPORTED
FEATURE_CAS_POLICY
FEATURE_CLASSIC_COMINTEROP
FEATURE_CLICKONCE
FEATURE_COLLECTIBLE_TYPES
FEATURE_COMINTEROP_REGISTRATION
@danmoseley
danmoseley / removedeadstrings.cs
Last active September 8, 2017 16:48
Remove unused strings
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace FindDeadResources
using System;
using System.Linq;
using System.Runtime.InteropServices;
namespace _1
{
class Program
{
[DllImport("shell32.dll", SetLastError = false, BestFitMapping = false, ExactSpelling = true)]
@danmoseley
danmoseley / gist:0cf6a2d9b0970f72fe33f67c83224998
Created August 8, 2017 08:14
potentially dead corelib internals
C:\git\coreclr\bin\Product\Windows_NT.x64.Debug\System.Private.CoreLib.dll
[2 C:\bak\System.Private.CoreLib.dll 2]
namespace {
}
namespace Microsoft.Win32 {
internal static class OAVariantLib {
internal static readonly Type[] ClassTypes;
private static void .cctor();
internal static Variant ChangeType(Variant source, Type targetClass, short options, CultureInfo culture);
private static void ChangeTypeEx(ref Variant result, ref Variant source, int lcid, IntPtr typeHandle, int cvType, short flags);
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.Text;
namespace ConsoleApplication1
{
public class Program
{
private StringBuilder sb = new StringBuilder();
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
using System;
using System.Text;
namespace ConsoleApplication1
{
public class Program
{
private StringBuilder sb = new StringBuilder();
@danmoseley
danmoseley / vbcsdiff.html
Last active May 31, 2018 23:43
members present in Microsoft.VisualBasic.dll/Microsoft.CSharp.dll in .NET Framework that are not in .NET Core
namespace Microsoft.VisualBasic {
public enum AppWinStyle : short {
Hide = (short)0,
MaximizedFocus = (short)3,
MinimizedFocus = (short)2,
MinimizedNoFocus = (short)6,
NormalFocus = (short)1,
NormalNoFocus = (short)4,
}
public enum AudioPlayMode {
@danmoseley
danmoseley / vbdiff.diff
Created July 17, 2018 23:31
Diff of Microsoft.VisualBasic between .NET Framework and .NET Core
---C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll
+++C:\git\corefx\bin\AnyOS.AnyCPU.Debug\Microsoft.VisualBasic\netstandard\Microsoft.VisualBasic.dll
namespace Microsoft.VisualBasic {
- public enum AppWinStyle : short {
- Hide = (short)0,
- MaximizedFocus = (short)3,
- MinimizedFocus = (short)2,
- MinimizedNoFocus = (short)6,
- NormalFocus = (short)1,
- NormalNoFocus = (short)4,
Lines not containing 'class'
^(?:(?!class)[\s\S])*$
^((?!class)[\s\S])*$
^(?!.*class).*$
@danmoseley
danmoseley / netfx.vb.ref.cs
Created July 23, 2018 17:24
M.VB ref from .NET Framework
namespace Microsoft.VisualBasic
{
public enum AppWinStyle : short
{
Hide = (short)0,
MaximizedFocus = (short)3,
MinimizedFocus = (short)2,
MinimizedNoFocus = (short)6,
NormalFocus = (short)1,
NormalNoFocus = (short)4,