The run.csx file

The run.csx file contains the function code. This is the C# code that will be executed every time the function gets triggered. A CSX file is a C# script file, a type that was introduced recently. In C# script, a method may exist outside a class, which allows for execution of a standalone function.

Note that when working with "precompiled" functions (starting from the next chapter) we will be working with traditional CS class files, rather than CSX script files. Currently, when you create a new function online, it defaults to a CSX C# script-based function, and when you create a new function project from Visual Studio 2017, it defaults to a "precompiled" class-library based Function App.

Based on the type of function we choose, ...

Get Serverless computing in Azure with .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.