    

 ## On this page

  

 

 # Constructor AbstractPlugInViewModel

 Last update: 19.06.2026 

Namespace: [Phoenix.ComponentPlugInSDK.ViewModels](Phoenix.ComponentPlugInSDK.ViewModels.md)  
Assembly: Phoenix.ComponentPlugInSDK.dll

## AbstractPlugInViewModel(MODEL\_TYPE, ILogger, string, Func&lt;MODEL\_TYPE, Task&gt;, Action, Action&lt;Exception&gt;, Uri)

Constructor.

```csharp
protected AbstractPlugInViewModel(MODEL_TYPE model, ILogger logger, string componentName, Func<MODEL_TYPE, Task> saveAsync, Action closeViewAction, Action<Exception> showErrorAction, Uri icon)


```

### Parameters

`model` MODEL\_TYPE

The model representing the data of the derived viewModel.

`logger` [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger)

A logger to use

`componentName` [string](https://learn.microsoft.com/dotnet/api/system.string)

The name of the component to use in the View.

`saveAsync` [Func](https://learn.microsoft.com/dotnet/api/system.func-2)&lt;MODEL\_TYPE, [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task)&gt;

An Async Function to invoke to perform a save operaion.

`closeViewAction` [Action](https://learn.microsoft.com/dotnet/api/system.action)

An action that closes the window.

`showErrorAction` [Action](https://learn.microsoft.com/dotnet/api/system.action-1)&lt;[Exception](https://learn.microsoft.com/dotnet/api/system.exception)&gt;

An action that displays error information to the user.

`icon` [Uri](https://learn.microsoft.com/dotnet/api/system.uri)

The URI of the icon to use in the view. If null, the default Windows icon will be used.