You can just write another file, for example. lib.csx and upload it through #load "lib.csx" in the main file script. See. Here Document
As an example, put this in your run.csx
#load "lib.csx" using System; public static void Run(TimerInfo myTimer, TraceWriter log) { log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); log.Info(doubleTheInt(5).ToString()); } TraceWriter log) #load "lib.csx" using System; public static void Run(TimerInfo myTimer, TraceWriter log) { log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); log.Info(doubleTheInt(5).ToString()); } function executed at: {DateTime.Now}"); #load "lib.csx" using System; public static void Run(TimerInfo myTimer, TraceWriter log) { log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); log.Info(doubleTheInt(5).ToString()); }
and that lib.csx
using System; public static int doubleTheInt(int x) { return x*x; } { using System; public static int doubleTheInt(int x) { return x*x; }
and he shall bring 25 in the journal
source share