WorkspaceEvents
using System;
namespace Dynamo.Events
{
public static class WorkspaceEvents
{
public static event WorkspaceAddedEventHandler WorkspaceAdded;
public static event WorkspaceRemoveStartedEventHandler WorkspaceRemoveStarted;
public static event WorkspaceRemovedEventHandler WorkspaceRemoved;
public static event WorkspaceClearingEventHandler WorkspaceClearing;
public static event WorkspaceClearedEventHandler WorkspaceCleared;
internal static void OnWorkspaceAdded(Guid id, string name, Type type)
{
if (WorkspaceEvents.WorkspaceAdded != null)
WorkspaceEvents.WorkspaceAdded(new WorkspacesModificationEventArgs(id, name, type));
}
internal static void OnWorkspaceRemoveStarted(Guid id, string name, Type type)
{
if (WorkspaceEvents.WorkspaceRemoveStarted != null)
WorkspaceEvents.WorkspaceRemoveStarted(new WorkspacesModificationEventArgs(id, name, type));
}
internal static void OnWorkspaceRemoved(Guid id, string name, Type type)
{
if (WorkspaceEvents.WorkspaceRemoved != null)
WorkspaceEvents.WorkspaceRemoved(new WorkspacesModificationEventArgs(id, name, type));
}
internal static void OnWorkspaceClearing()
{
if (WorkspaceEvents.WorkspaceClearing != null)
WorkspaceEvents.WorkspaceClearing();
}
internal static void OnWorkspaceCleared()
{
if (WorkspaceEvents.WorkspaceCleared != null)
WorkspaceEvents.WorkspaceCleared();
}
}
}