This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| Console.WriteLine("Hello, CoreCLR!"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #![feature(lang_items)] | |
| #![allow(unstable)] | |
| #![allow(non_camel_case_types)] | |
| extern crate libc; | |
| extern crate unicode; | |
| mod w32 { | |
| use libc::types::os::arch::extra::{HANDLE, LPCWSTR}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\Program Files (x86)\Unity> find -name 'Mono.Cecil.dll' | |
| ./Editor/Data/Managed/Mono.Cecil.dll | |
| ./Editor/Data/Mono/lib/mono/2.0/Mono.Cecil.dll | |
| ./Editor/Data/Mono/lib/mono/unity/Mono.Cecil.dll | |
| ./Editor/Data/Mono/lib/mono/unity_web/Mono.Cecil.dll | |
| ./Editor/Data/MonoBleedingEdge/lib/mono/2.0/Mono.Cecil.dll | |
| ./Editor/Data/MonoBleedingEdge/lib/mono/3.5/Mono.Cecil.dll | |
| ./Editor/Data/MonoBleedingEdge/lib/mono/4.0/Mono.Cecil.dll | |
| ./Editor/Data/MonoBleedingEdge/lib/mono/gac/Mono.Cecil/0.9.4.0__0738eb9f132ed756/Mono.Cecil.dll | |
| ./Editor/Data/PlaybackEngines/flashsupport/BuildTools/cil2as/Mono.Cecil.dll |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using SyntaxTree.VisualStudio.Unity.Bridge; | |
| [InitializeOnLoad] | |
| public class NamespaceProjectHook | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using UnityEngine; | |
| using UnityEditor; | |
| using SyntaxTree.VisualStudio.Unity.Bridge; | |
| [InitializeOnLoad] | |
| public class ReferenceRemovalProjectHook | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| static class TypedRef | |
| { | |
| public static TClass RoundTrip<TClass>(TClass instance) where TClass : class | |
| { | |
| var method = new DynamicMethod("", typeof(TClass), new [] {typeof(TClass)}, true); | |
| var il = method.GetILGenerator(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Runtime.InteropServices; | |
| using System.Reflection; | |
| using System.Reflection.Emit; | |
| using System.Text; | |
| namespace StringPool | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void StructInstanceMembers() | |
| { | |
| AssertExpressionsAtLine(21, "Types.cs", new Evaluations | |
| { | |
| { "one", | |
| Expect("one", Quoted("<X:1 Y:1 Z:1>"), "Victor", | |
| Expect("X", "1f", "System.Single"), | |
| Expect("Y", "1f", "System.Single"), | |
| Expect("Z", "1f", "System.Single")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Reflection.Emit; | |
| static class SizeOf<TStruct> where TStruct : struct | |
| { | |
| public static readonly int Value; | |
| static SizeOf() | |
| { | |
| var method = new DynamicMethod("", typeof(int), Type.EmptyTypes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| open Microsoft.CodeAnalysis | |
| open Microsoft.CodeAnalysis.CSharp | |
| open Microsoft.CodeAnalysis.CSharp.Syntax | |
| open FSharp.CodeAnalysis.CSharp.Patterns | |
| // full form for the node, with SyntaxKind and tokens | |
| let fullForm (n: CSharpSyntaxNode) = | |
| match n with | |
| | BinaryExpressionSyntax(_, LiteralExpressionSyntax(_), _, _) -> () |