ExecutionEvents
using Dynamo.Session;
namespace Dynamo.Events
{
public static class ExecutionEvents
{
public static IExecutionSession ActiveSession { get; set; }
public static event ExecutionStateHandler GraphPreExecution;
public static event ExecutionStateHandler GraphPostExecution;
internal static void OnGraphPreExecution(IExecutionSession session)
{
ActiveSession = session;
if (ExecutionEvents.GraphPreExecution != null)
ExecutionEvents.GraphPreExecution(session);
}
internal static void OnGraphPostExecution(IExecutionSession session)
{
ActiveSession = null;
if (ExecutionEvents.GraphPostExecution != null)
ExecutionEvents.GraphPostExecution(session);
}
}
}