Skip to Content
Serverless computing in Azure with .NET
book

Serverless computing in Azure with .NET

by Sasha Rosenbaum
August 2017
Intermediate to advanced
468 pages
12h 5m
English
Packt Publishing
Content preview from Serverless computing in Azure with .NET

Sharing code between functions

As we've seen previously, it is fairly common to need to share code between functions. In the first two examples in this book, we copy-pasted the code that does the text processing. Now, as we move forward and introduce more and more possible inputs, we may want to plug them into a unified processing unit instead of following the error-prone copy-paste process.

A great advantage of encapsulating a common functionality used by the functions in a separate class is the improved testability of the code. The new class will generally have a single responsibility, which can be tested with a suite of unit tests. The test class can rely on Dependency Injection, which is not yet available in function implementation itself. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Azure Serverless Computing

Mastering Azure Serverless Computing

Lorenzo Barbieri, Massimo Bonanni
Implementing Azure: Putting Modern DevOps to Use

Implementing Azure: Putting Modern DevOps to Use

Florian Klaffenbach, Oliver Michalski, Markus Klein, Mohamed Wali

Publisher Resources

ISBN: 9781787288393Supplemental Content