MFiles.VAF.Extensions
23.4.51
Prefix Reserved
See the version list below for details.
dotnet add package MFiles.VAF.Extensions --version 23.4.51
NuGet\Install-Package MFiles.VAF.Extensions -Version 23.4.51
<PackageReference Include="MFiles.VAF.Extensions" Version="23.4.51" />
paket add MFiles.VAF.Extensions --version 23.4.51
#r "nuget: MFiles.VAF.Extensions, 23.4.51"
// Install MFiles.VAF.Extensions as a Cake Addin #addin nuget:?package=MFiles.VAF.Extensions&version=23.4.51 // Install MFiles.VAF.Extensions as a Cake Tool #tool nuget:?package=MFiles.VAF.Extensions&version=23.4.51
M-Files Vault Application Framework Extensions library
Please note that this library is provided "as-is" and with no warranty, explicit or otherwise. You should ensure that the functionality meets your requirements, and thoroughly test them, prior to using in any production scenarios.
The following helper library is a community-driven set of functionality that extends the base M-Files Vault Application Framework. This library is open-source and not directly supported by M-Files. Contributions are accepted according to our contribution guide.
Using the library
- Install the latest production release from nuget.
- Update your
VaultApplication.cs
file, ensuring that your vault application inherits fromMFiles.VAF.Extensions.ConfigurableVaultApplicationBase<T>
. A more complete example of an empty vault application class is shown below. - Ensure that your
Configuration.cs
file inherits fromMFiles.VAF.Configuration.ConfigurationBase
. A more complete example of an empty configuration class is shown below.
public class VaultApplication
: MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<Configuration>
{
}
public class Configuration
: MFiles.VAF.Configuration.ConfigurationBase
{
}
Naming formats
Releases follow a naming format based upon the M-Files versioning; releases are named using a combination of the year and month they are released in and an incrementing build number. Releases may also optionally contain a suffix (starting with a hyphen) denoting that the release is a preview release and should not be used in production environments.
22.6.123
- this full release was made in June 2022. Full releases come from therelease
branch.22.6.140
- this full release was also made in June 2022, but is newer than the one above.22.7.141-preview
- this release was made in July 2022 from the main branch. Releases from the main branch are often close to release quality, but should only be used for testing.22.7.0.13-test-feature-1
- this release was made in July 2022 from a specific feature branch. This release will contain in-development functionality and should only be used when needing to test the specific feature being developed. Significant breaking changes may still be made when this functionality progresses to preview or release builds.
Any problems can be logged as issues against the repository, or discussed on the M-Files Community.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- MFiles.VAF (>= 22.12.672.3)
- MFiles.VAF.Configuration.Logging.NLog (>= 22.11.2)
- MFilesAPI.Extensions (>= 1.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on MFiles.VAF.Extensions:
Package | Downloads |
---|---|
CtrlVAF.Core
An extensive framework, made to make your life as an M-Files VAF engineer much more simple, powerful and S.O.L.I.D |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
24.11.74 | 73 | 11/6/2024 | |
24.10.73 | 280 | 10/23/2024 | |
24.10.72 | 90 | 10/22/2024 | |
24.10.0.7-issue-141 | 56 | 10/29/2024 | |
24.10.0.6-issue-141 | 79 | 10/27/2024 | |
24.10.0.5-issue-138 | 63 | 10/23/2024 | |
24.6.71 | 1,320 | 6/17/2024 | |
24.5.70 | 398 | 5/30/2024 | |
24.4.69 | 513 | 4/26/2024 | |
24.4.68 | 378 | 4/12/2024 | |
24.4.0.4-timezone-issues | 103 | 4/22/2024 | |
24.2.67 | 1,284 | 2/21/2024 | |
24.2.66 | 133 | 2/21/2024 | |
24.2.65 | 326 | 2/16/2024 | |
24.1.64 | 4,032 | 1/24/2024 | |
24.1.63 | 171 | 1/18/2024 | |
23.12.62 | 962 | 12/11/2023 | |
23.12.0.3-confupgrade-optin | 104 | 12/12/2023 | |
23.11.61 | 778 | 11/10/2023 | |
23.11.60 | 131 | 11/10/2023 | |
23.11.0.2-prerelease | 144 | 11/14/2023 | |
23.11.0.1-prerelease | 96 | 11/14/2023 | |
23.9.59 | 1,006 | 9/27/2023 | |
23.8.0.73-timestamp-search-... | 119 | 8/4/2023 | |
23.7.58 | 4,508 | 7/17/2023 | |
23.7.57 | 178 | 7/14/2023 | |
23.7.56 | 176 | 7/14/2023 | |
23.7.0.72-issue-110 | 121 | 7/20/2023 | |
23.7.0.70-issue-108 | 111 | 7/14/2023 | |
23.7.0.69-leave-json-alone-... | 124 | 7/7/2023 | |
23.6.55 | 859 | 6/7/2023 | |
23.5.54 | 267 | 5/31/2023 | |
23.5.53 | 685 | 5/3/2023 | |
23.4.52 | 396 | 4/27/2023 | |
23.4.51 | 208 | 4/27/2023 | |
23.4.50 | 777 | 4/17/2023 | |
23.4.0.68-CustomCommandAttr... | 110 | 4/24/2023 | |
23.2.0.67-configupgrading-d... | 173 | 2/24/2023 | |
23.2.0.63-prerelease | 141 | 2/15/2023 | |
23.2.0.62-jsonconfeditor-ed... | 130 | 2/9/2023 | |
23.1.49 | 1,619 | 1/18/2023 | |
23.1.47 | 674 | 1/17/2023 | |
22.12.54 | 1,998 | 12/16/2022 | |
22.12.52 | 401 | 12/12/2022 | |
22.12.46 | 339 | 12/16/2022 | |
22.12.45 | 355 | 12/12/2022 | |
22.11.49-prerelease | 214 | 11/10/2022 | |
22.11.47-prerelease | 171 | 11/2/2022 | |
22.11.44 | 786 | 11/28/2022 | |
22.11.43 | 554 | 11/10/2022 | |
22.9.41 | 5,019 | 9/14/2022 | |
22.9.37 | 659 | 9/8/2022 | |
22.6.31 | 2,071 | 6/20/2022 | |
22.6.29 | 601 | 6/10/2022 | |
22.5.27 | 1,197 | 5/3/2022 | |
22.5.26 | 488 | 5/3/2022 | |
22.5.0.15-configuration-mig... | 163 | 5/24/2022 | |
22.5.0.13-configuration-mig... | 147 | 5/13/2022 | |
22.5.0.12-configuration-mig... | 157 | 5/9/2022 | |
22.4.24 | 618 | 4/29/2022 | |
22.4.23-preview | 200 | 4/14/2022 | |
22.3.20-preview | 172 | 3/30/2022 | |
22.3.18-preview | 234 | 3/9/2022 | |
22.3.17-preview | 166 | 3/7/2022 | |
22.3.16-preview | 152 | 3/7/2022 | |
22.3.15-preview | 160 | 3/7/2022 | |
22.3.14-preview | 147 | 3/3/2022 | |
22.3.13-preview | 152 | 3/2/2022 | |
22.2.11-preview | 213 | 2/11/2022 | |
22.2.10-preview | 147 | 2/11/2022 | |
22.2.9-preview | 165 | 2/10/2022 | |
22.2.8-preview | 180 | 2/3/2022 | |
22.2.7-preview | 171 | 2/2/2022 | |
1.3.1.5 | 1,244 | 2/28/2022 | |
1.3.1.3 | 1,219 | 1/12/2022 | |
1.3.1.1 | 357 | 1/4/2022 | |
1.3.1-prerelease | 167 | 1/4/2022 | |
1.3.0.16 | 526 | 12/8/2021 | |
1.3.0.15 | 333 | 12/3/2021 | |
1.3.0.14 | 587 | 10/21/2021 | |
1.3.0.13 | 469 | 10/7/2021 | |
1.3.0.10 | 9,299 | 9/29/2021 | |
1.3.0.9 | 534 | 9/24/2021 | |
1.2.11.5 | 971 | 7/2/2021 | |
1.2.11.4 | 612 | 6/24/2021 | |
1.2.11.3 | 603 | 6/1/2021 | |
1.2.11.2 | 557 | 5/21/2021 | |
1.2.10.2 | 1,061 | 5/12/2021 | |
1.1.13 | 523 | 3/23/2021 | |
1.1.11 | 501 | 3/15/2021 | |
1.1.10 | 750 | 3/2/2021 | |
1.1.9 | 1,370 | 1/22/2021 | |
1.1.8 | 542 | 12/16/2020 | |
1.1.7 | 705 | 11/2/2020 | |
1.1.6 | 599 | 10/8/2020 | |
1.1.5 | 509 | 10/1/2020 | |
1.0.7 | 669 | 7/8/2020 | |
1.0.6-alpha | 1,253 | 7/2/2020 | |
1.0.5-alpha | 354 | 6/29/2020 | |
1.0.4 | 574 | 6/11/2020 | |
0.2.3.3-alpha | 371 | 5/19/2020 | |
0.2.3.2-alpha | 351 | 4/27/2020 | |
0.1.8-alpha | 358 | 4/6/2020 | |
0.1.7-alpha | 354 | 4/3/2020 | |
0.1.6-alpha | 353 | 4/1/2020 | |
0.1.5-alpha | 354 | 3/23/2020 | |
0.1.3-alpha | 347 | 3/12/2020 | |
0.1.2-alpha | 352 | 3/10/2020 | |
0.1.1-alpha | 330 | 3/2/2020 |
Changes included in 23.4.51
https://github.com/M-Files/VAF.Extensions.Community/commit/44d62c665a9265c4e674205b4fc930a64a6d10db
Added CustomCommandAttribute and helpers (#100)
Enables buttons to be created declaratively on the VaultApplication class:
## Defining commands for the M-Files Admin area via attributes
In general terms, [commands can be added to the M-Files Admin area](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Commands/) by overriding `ConfigurableVaultApplicationBase<T>.GetCommands` and returning appropritately-defined instances of `CustomDomainCommand`. The VAF Extensions adds the abilty to define these commands using attributes instead.
*Note that the method signature must be correct for these attributes to work. The method return type must be defined as `void` and it must define two parameters, the first of type `IConfigurationRequestContext` and the second of type `ClientOperations`.*
### Buttons in the header
*The code below is equivalent to [this example](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Commands/#displaying-commands-in-the-header) in the Developer Portal.*
```csharp
public class VaultApplication
: MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<Configuration>
{
// Create a command with "Say hello" as the button text.
[CustomCommand("Say hello")]
// Add it to the header bar.
[ButtonBarCommandLocation]
public void SayHello
(
IConfigurationRequestContext context,
ClientOperations operations
)
{
operations.ShowMessage($"Hello {context.CurrentUserSessionInfo.AccountName}");
}
}
```
### Buttons in the domain menu
*The code below is equivalent to [this example](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Commands/#displaying-context-menu-items-for-the-domain-menu) in the Developer Portal.*
```csharp
public class VaultApplication
: MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<Configuration>
{
// Create a command with "Say hello" as the button text.
[CustomCommand("Say hello")]
// Add it to the domain context menu.
[DomainMenuCommandLocation]
public void SayHello
(
IConfigurationRequestContext context,
ClientOperations operations
)
{
operations.ShowMessage($"Hello {context.CurrentUserSessionInfo.AccountName}");
}
}
```
The `DomainMenuCommandLocationAttribute` allows you to additionally define other appropriate content such as the priority and icon.
### Buttons in the configuration menu
*The code below is equivalent to [this example](https://developer.m-files.com/Frameworks/Vault-Application-Framework/Configuration/Commands/#displaying-context-menu-items-for-the-configuration-menumenu) in the Developer Portal.*
```csharp
public class VaultApplication
: MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<Configuration>
{
// Create a command with "Say hello" as the button text.
[CustomCommand("Say hello")]
// Add it to the configuration context menu.
[ConfigurationMenuCommandLocation]
public void SayHello
(
IConfigurationRequestContext context,
ClientOperations operations
)
{
operations.ShowMessage($"Hello {context.CurrentUserSessionInfo.AccountName}");
}
}
```
The `ConfigurationMenuCommandLocationAttribute` allows you to additionally define other appropriate content such as the priority and icon.
### Defining commands and referencing them in a dashboard
It is also possible to use attributes to define a command, and then to manually render the command inside a dashboard. To do this you must provide a static command ID when declaring the command:
```csharp
public class VaultApplication
: MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<Configuration>
{
// Define the constant command ID.
private const string SayHelloCommandId = "SayHello";
// Create a command with "Say hello" as the button text and an explicit command ID.
[CustomCommand("Say hello", CommandId = SayHelloCommandId)]
public void SayHello
(
IConfigurationRequestContext context,
ClientOperations operations
)
{
operations.ShowMessage($"Hello {context.CurrentUserSessionInfo.AccountName}");
}
// An example of returning the command; typically you would not
// replace the entire dashboard with it!
public override IEnumerable<IDashboardContent> GetStatusDashboardRootItems
(
IConfigurationRequestContext context
)
{
// Just return the button.
yield return this.GetCustomDomainCommandResolver()?
.GetDashboardDomainCommand(SayHelloCommandId); // Use the explicit command ID to find it again.
}
}
```