DynamoVisualProgramming.DynamoServices by Autodesk

<PackageReference Include="DynamoVisualProgramming.DynamoServices" Version="3.4.0-beta6280" />

 DynamoConsoleLogger

static class DynamoConsoleLogger
Used to log to the dynamo console from places where we do not have a reference to the Dynamo console.
using System; namespace DynamoServices { internal static class DynamoConsoleLogger { public static event Action<string> LogMessageToDynamoConsole; public static event Action<string> LogErrorToDynamoConsole; public static void OnLogMessageToDynamoConsole(string message) { DynamoConsoleLogger.LogMessageToDynamoConsole?.Invoke(message); } public static void OnLogErrorToDynamoConsole(string message) { DynamoConsoleLogger.LogErrorToDynamoConsole?.Invoke(message); } } }