- add: DotNet runtime download
This commit is contained in:
21
Nebula.UpdateResolver/LogStandalone.cs
Normal file
21
Nebula.UpdateResolver/LogStandalone.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
|
||||
namespace Nebula.UpdateResolver;
|
||||
|
||||
public static class LogStandalone
|
||||
{
|
||||
public static Action<string, int>? OnLog;
|
||||
|
||||
public static void LogError(Exception e){
|
||||
Log($"{e.GetType().Name}: "+ e.Message);
|
||||
Log(e.StackTrace);
|
||||
if(e.InnerException != null)
|
||||
LogError(e.InnerException);
|
||||
}
|
||||
public static void Log(string? message, int percentage = 0)
|
||||
{
|
||||
if(message is null) return;
|
||||
|
||||
OnLog?.Invoke(message, percentage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user