Constructor ScriptEditorViewModel
Last update: 19.06.2026Namespace: Phoenix.ComponentPlugInSDK.ViewModels
Assembly: Phoenix.ComponentPlugInSDK.dll
ScriptEditorViewModel(ScriptModel, string, ILogger, Func<ScriptModel, Task>, Action, Action<Exception>, Uri)
Constructor.
public ScriptEditorViewModel(ScriptModel model, string componentName, ILogger logger, Func<ScriptModel, Task> saveAsync, Action closeViewAction, Action<Exception> showErrorAction, Uri icon = null)
Parameters
model ScriptModel
The model representing the script.
componentName string
The name of the component to use in the View.
logger ILogger
The logger to use.
saveAsync Func<ScriptModel, Task>
An Async Function to invoke to perform a save operaion.
closeViewAction Action
An action that closes the window.
showErrorAction Action<Exception>
An action that displays error information to the user.
icon Uri
The optional URI of the icon to use in the view. If null or not specified, the default Windows icon will be used.