11. Windows Convergence
Universal projects
Cloud Services
.NET support for
Azure Mobile Services
Web apps Native compilation
ASP.NET updates .NET Native
Core .NET
Runtime Compilers
Next gen JIT (“RyuJIT”)
SIMD
.NET Compiler Platform (“Roslyn”)
Languages innovation
Azure and Windows Server Windows Desktop
Openness
Windows Store iOS and Android
.NET in devices and services
12.
13. Editor Services Code Actions Classification Completion Outlining …
Code Formatting Find All References Name Simplification …
Symbol
API
Services
Compiler
Syntax Tree
API
Binding and Flow
Analysis APIs
Emit API
Scripting
API
Workspace API
14. Syntax Tree API – Nodes
CompilationUnit
TypeDeclaration
MethodDeclaration
class C
{
void M()
{
}
}// C
▫
ParameterList Block
var tree = CSharpSyntaxTree.ParseText("...");
15. Syntax Tree API – Tokens
CompilationUnit
TypeDeclaration
EOF
class C { MethodDeclaration }
void M ParameterList Block
( ) { }
class C
{
void M()
{
}
}// C
▫
16. Syntax Tree API – Trivia
CompilationUnit
TypeDeclaration
EOF
class C { MethodDeclaration }
SP EOL EOL // C
void M ParameterList Block
( )
{ }
SPx4 SP
EOL
EOL
SPx4 EOL SPx4 EOL
class∙C
{
∙∙∙∙void∙M()
∙∙∙∙{
∙∙∙∙}
}// C
▫
21. public class Point(int x, int y)
{
public int X { get; } = x;
public int Y { get; } = y;
public double R { get; } = Math.Sqrt(x ^ x + y ^ y);
public Point() : this(0, 0)
{ }
public override string ToString()
{
return string.Format("({0},{1},{2})", X, Y, R);
}
}
22. try
{
Task[] tasks = new Task[10];
for (int i = 0; i < 10; i++)
{
tasks[i] = Task.Factory.StartNew(() => DoSomeWork(10000000));
}
var res = await Task.WhenAll(tasks);
}
catch (AggregateException e) if (e.InnerExceptions.Count > 2)
{
await WriteStatus(“filtered exception");
}
finally
{
await WriteStatus(“finished");
}