mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Bring back C# sample logging!
This commit is contained in:
@@ -6,6 +6,8 @@ namespace CSharpAvalonia;
|
||||
|
||||
class Program
|
||||
{
|
||||
public static MemoryLogger Log { get; private set; } = new();
|
||||
|
||||
// Initialization code. Don't use any Avalonia, third-party APIs or any
|
||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||
// yet and stuff might break.
|
||||
@@ -16,6 +18,7 @@ class Program
|
||||
// It's important to Run() the VelopackApp as early as possible in app startup.
|
||||
VelopackApp.Build()
|
||||
.OnFirstRun((v) => { /* Your first run code here */ })
|
||||
.SetLogger(Log)
|
||||
.Run();
|
||||
|
||||
// Now it's time to run Avalonia
|
||||
|
||||
Reference in New Issue
Block a user