Skip to content

chesanoy/Application-Development-Kit-for-M-Files

 
 

Repository files navigation

Application Development Kit for M-Files

Helps expedite development of custom Vault Application logic.

Application Development Kit for M-Files is an M-Files COM-API Wrapper that

  • maps Vault Structure to C# Classes bringing your vault structure to IntelliSense
  • provides extensions to the COM-API
  • allows development of complex logic in few lines of code
  • strong typing on Property Definitions

** Requires M-Files Client and Admin and not currently designed to support Replicated Vaults

Develop to Deploy

A. Generate Code for your Vault Structure

Generate the Abstraction Layer by running Application Development Kit for M-Files console app. Select option (1) New AbstractionLayer to populate the code files for the VAF project.

This operation will populate the equivalent Models files of the Vault's metadata structure to the VAF\Models directory. Subsequent Admin configuration changes should prompt an update to code via step (2) Update AbstractionLayer

B. Implement Object Type Event Handlers

In addition to the Models files, the VAF\EventHandlers is also generated with a sample object type event handler class. Custom VAF business logic can be implemented into the event handler method as shown below.

VAF\EventHandlers\Document.cs

namespace VAF
{
	public class Document : OT_Document
	{
		[MFEventHandlerBeforeCheckInChanges]
		void checkin()
		{
			if (VersionNumber == 1)
				Name_or_title += $" [version 1 {CreatedDate.ToString("yyyy-MM-dd")}]";
		}
	}
}



C. Deploy

Run Application Development Kit for M-Files console app again and select the (3) Deploy VAF Vault App to deploy the VAF application to the vault.

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%