MFiles.VAF.Extensions 23.4.51

Prefix Reserved
There is a newer version of this package available.
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                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MFiles.VAF.Extensions" Version="23.4.51" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MFiles.VAF.Extensions --version 23.4.51                
#r "nuget: MFiles.VAF.Extensions, 23.4.51"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

  1. Install the latest production release from nuget.
  2. Update your VaultApplication.cs file, ensuring that your vault application inherits from MFiles.VAF.Extensions.ConfigurableVaultApplicationBase<T>. A more complete example of an empty vault application class is shown below.
  3. Ensure that your Configuration.cs file inherits from MFiles.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 the release 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 Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.12.75 485 12/4/2024
24.11.74 417 11/6/2024
24.10.73 448 10/23/2024
24.10.72 126 10/22/2024
24.10.0.7-issue-141 71 10/29/2024
24.10.0.6-issue-141 91 10/27/2024 24.10.0.6-issue-141 is deprecated.
24.10.0.5-issue-138 77 10/23/2024
24.6.71 1,780 6/17/2024
24.5.70 473 5/30/2024
24.4.69 554 4/26/2024
24.4.68 408 4/12/2024
24.4.0.4-timezone-issues 108 4/22/2024
24.2.67 1,483 2/21/2024
24.2.66 143 2/21/2024
24.2.65 357 2/16/2024
24.1.64 5,086 1/24/2024
24.1.63 180 1/18/2024
23.12.62 1,051 12/11/2023
23.12.0.3-confupgrade-optin 109 12/12/2023
23.11.61 812 11/10/2023
23.11.60 141 11/10/2023
23.11.0.2-prerelease 149 11/14/2023
23.11.0.1-prerelease 106 11/14/2023
23.9.59 1,129 9/27/2023
23.8.0.73-timestamp-search-... 125 8/4/2023
23.7.58 5,421 7/17/2023
23.7.57 187 7/14/2023
23.7.56 183 7/14/2023
23.7.0.72-issue-110 126 7/20/2023
23.7.0.70-issue-108 116 7/14/2023
23.7.0.69-leave-json-alone-... 129 7/7/2023
23.6.55 881 6/7/2023
23.5.54 277 5/31/2023
23.5.53 714 5/3/2023
23.4.52 434 4/27/2023
23.4.51 215 4/27/2023
23.4.50 790 4/17/2023
23.4.0.68-CustomCommandAttr... 115 4/24/2023
23.2.0.67-configupgrading-d... 179 2/24/2023
23.2.0.63-prerelease 146 2/15/2023
23.2.0.62-jsonconfeditor-ed... 135 2/9/2023
23.1.49 1,660 1/18/2023
23.1.47 687 1/17/2023
22.12.54 2,179 12/16/2022
22.12.52 408 12/12/2022
22.12.46 348 12/16/2022
22.12.45 367 12/12/2022
22.11.49-prerelease 222 11/10/2022
22.11.47-prerelease 178 11/2/2022
22.11.44 830 11/28/2022
22.11.43 572 11/10/2022
22.9.41 6,092 9/14/2022
22.9.37 673 9/8/2022
22.6.31 2,101 6/20/2022
22.6.29 618 6/10/2022
22.5.27 1,237 5/3/2022
22.5.26 499 5/3/2022
22.5.0.15-configuration-mig... 170 5/24/2022
22.5.0.13-configuration-mig... 156 5/13/2022
22.5.0.12-configuration-mig... 164 5/9/2022
22.4.24 634 4/29/2022
22.4.23-preview 205 4/14/2022
22.3.20-preview 179 3/30/2022
22.3.18-preview 255 3/9/2022
22.3.17-preview 173 3/7/2022
22.3.16-preview 159 3/7/2022
22.3.15-preview 167 3/7/2022
22.3.14-preview 154 3/3/2022
22.3.13-preview 157 3/2/2022
22.2.11-preview 221 2/11/2022
22.2.10-preview 154 2/11/2022
22.2.9-preview 172 2/10/2022
22.2.8-preview 187 2/3/2022
22.2.7-preview 178 2/2/2022
1.3.1.5 1,266 2/28/2022
1.3.1.3 1,274 1/12/2022
1.3.1.1 370 1/4/2022
1.3.1-prerelease 174 1/4/2022
1.3.0.16 540 12/8/2021
1.3.0.15 348 12/3/2021
1.3.0.14 602 10/21/2021
1.3.0.13 478 10/7/2021
1.3.0.10 9,310 9/29/2021
1.3.0.9 543 9/24/2021 1.3.0.9 is deprecated because it has critical bugs.
1.2.11.5 986 7/2/2021
1.2.11.4 625 6/24/2021
1.2.11.3 616 6/1/2021
1.2.11.2 568 5/21/2021
1.2.10.2 1,070 5/12/2021
1.1.13 532 3/23/2021
1.1.11 510 3/15/2021
1.1.10 797 3/2/2021
1.1.9 1,380 1/22/2021
1.1.8 551 12/16/2020
1.1.7 717 11/2/2020
1.1.6 613 10/8/2020
1.1.5 518 10/1/2020
1.0.7 678 7/8/2020
1.0.6-alpha 1,258 7/2/2020
1.0.5-alpha 361 6/29/2020
1.0.4 585 6/11/2020
0.2.3.3-alpha 378 5/19/2020
0.2.3.2-alpha 356 4/27/2020
0.1.8-alpha 363 4/6/2020
0.1.7-alpha 359 4/3/2020
0.1.6-alpha 358 4/1/2020
0.1.5-alpha 359 3/23/2020
0.1.3-alpha 352 3/12/2020
0.1.2-alpha 359 3/10/2020
0.1.1-alpha 338 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.
}
}
```