This file contains 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 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 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(_), _, _) -> () |
This file contains 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
diff --git a/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs b/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
index ce0a903..b34b498 100644 | |
--- a/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
+++ b/Src/Compilers/CSharp/Source/Binder/Binder_Symbols.cs | |
@@ -379,6 +379,20 @@ namespace Microsoft.CodeAnalysis.CSharp | |
return new PointerTypeSymbol(elementType); | |
} | |
+ case SyntaxKind.EnumerableType: | |
+ { |
This file contains 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 System | |
open System.Reflection | |
open System.Reflection.Emit | |
open SyntaxTree.Reflection | |
let corlib = Assemblies.mscorlib | |
let console = corlib.``System.Console`` | |
let writeLine = console.``WriteLine(string)`` | |
let write = DynamicMethod("write", null, [| typeof<string> |]) |
This file contains 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 System | |
open System.Text | |
type StringIndex = | |
struct | |
val String: string | |
val Index: int | |
end | |
new(s: string) = { String = s; Index = 0 } |
This file contains 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.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
public static class VisualStudioFileOpening | |
{ |
This file contains 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 System | |
open System.Reflection | |
open Microsoft.FSharp.Quotations | |
open Microsoft.FSharp.Quotations.Patterns | |
[<ReflectedDefinition>] | |
let id x = x | |
[<ReflectedDefinition>] |
This file contains 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
If there’s one thing I’ve come to learn about life, it’s that most things are neither completely black nor completely white. There’s an infinity of shade of grays in between. | |
And if the announce of the Visual Studio (VS from now on) 11 beta taught me something, it is that VS 11 is exactly that. Neither completely black, nor completely white. But very gray. Oh so gray. | |
I won’t comment about the new look here, as the object of my ire with VS and its apparent roadmap lies at a completely different level. And boy am I annoyed to see where the VS team puts its focus. | |
Visual Studio 11 will be the sixth iteration of Visual Studio with .net support. And it’s still a terrible platform for the .net programmer. | |
Do you remember Steve Yegge’s rant about the need of a programmable platform at Google? It’s a tad long (euphemism of the day), but it’s well worth the read. And with Visual Studio, Microsoft is exactly failing at that. |
This file contains 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 Mono.Cecil; | |
class CompactFrameworkPatcher { | |
static readonly byte [] fwPkToken1 = new byte [] { | |
0xb7, 0x7a, 0x5c, 0x56, 0x19, 0x34, 0xe0, 0x89 | |
}; |