By Jason Bock

This is the 1st publication to explain the new major alterations to the .NET compilation technique and display how .NET builders can use the hot Compiler API to create compelling functions. As an open resource compiler, the Compiler API now makes its code on hand for somebody to exploit. during this publication, you’ll get a concise, targeted view of this super source for builders, who can now use any a part of the platform implementation to their virtue in examining functions, enhancing code new release, and delivering enforceable styles, all less than an OSS model.
You will easy methods to study your code for defects in a quick, fresh demeanour by no means on hand earlier than. You’ll paintings with options and tasks to supply computerized refactoring, and you’ll become aware of how one can generate code dynamically to supply program implementations at runtime
Having the Compiler API on hand opens a few doorways for .NET builders that have been both easily now not there prior to, or tough to accomplish. notwithstanding, the API is substantial, and this concise e-book offers a useful roadmap to this new improvement environment.
What you are going to Learn:
  • Understand the best way to generate, bring together, and execute code for a few scenarios
  • How to create diagnostics and refactoring to assist builders implement conventions and layout idioms
  • Experiment with the compiler code base and spot what could be performed to persuade the internal workings of the compilation pipeline
Who This booklet Is For:
Experienced .NET builders, yet exact compiler wisdom isn't necessary.

Show description

Read Online or Download .NET Development Using the Compiler API PDF

Best c & c++ windows programming books

Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications

The recipes during this ebook are effortless to appreciate and stick with because the writer discusses real-world eventualities. the variety of issues lined during this booklet will carry out the forward-thinking WCF developer in you. it isn't a accomplished connection with the total of WCF, yet a pragmatic advisor that reinforces talent whilst operating with many of the good points of WCF.

Pro Internet Explorer 8 & 9 Development: Developing Powerful Applications for The Next Generation of IE

This e-book is an in-depth advisor to writing functions that embody and expand the recent good points and features of home windows web Explorer eight and 9. With good guide, hands-on examples, and specialist perception direct from the source into extending the browser, you will how to create and keep strong purposes for Microsoft’s next-generation web platform.

Machine Learning Projects for .NET Developers

Computing device studying initiatives for . internet builders indicates you ways to construct smarter . internet purposes that examine from info, utilizing basic algorithms and strategies that may be utilized to quite a lot of real-world difficulties. you are going to code every one venture within the commonplace environment of visible Studio, whereas the laptop studying good judgment makes use of F#, a language best to computing device studying functions in .

SharePoint 2016 User's Guide: Learning Microsoft's Business Collaboration Platform

How one can utilize SharePoint 2016 and its wide variety of features to aid your details administration, collaboration, and enterprise technique administration wishes. even if you're utilizing SharePoint as an intranet or company resolution platform, you are going to the way to use the assets (such as lists, libraries, and websites) and providers (such as seek, workflow, and social) that make up those environments.

Additional info for .NET Development Using the Compiler API

Sample text

Figure 1-14. Highlighting a specific piece of code to move around in the tree We’ll get to what the types mean shortly. For now, notice that the Syntax Visualizer moved to the node in the tree that represents the name of the class—an IdentifierTokenNode, which is part of a ClassDeclaractionSyntax node. The tree will also work if you have errors in your code, which demonstrates how hard the Compiler APIs work to give you a tree with as much information as possible. Figure 1-15 shows what the tree looks like if you remove the opening curly brace after the namespace declaration.

If they want the curly brace on the next line, they write this: public class MyClass { // ... } But if someone comes along and changes it to this: public class MyClass { // ... } stern words may be spoken to the one who made the change! How you format your code makes no difference in the way the code will execute when it’s compiled, but having consistency pervasive in a code base is one indication that the development team is striving for clean, healthy code. One way to handle formatting is to explicity add in all the trivia manually.

The quicker you can find an issue in your code, the less damage it can do (especially if you find it on your machine, then no one can blame or make fun of you). Consider this example: in 1997, I was working on a very stressful project, in part because it didn’t have any testing in place, and I was about to go on my honeymoon. I was one of only two developers on the project, and the rest of the project team was concerned about resolving issues while I was away. We spent a fair amount of time testing the code before I left, but unfortunately it wasn’t enough.

Download PDF sample

Download .NET Development Using the Compiler API by Jason Bock PDF
Rated 4.27 of 5 – based on 35 votes