Table of Contents

Method FromAssemblies

Namespace
OpenCAD2D.Plugins
Assembly
OpenCAD2D.Core.dll

FromAssemblies(string, IEnumerable<Assembly>, string)

Makes a plugin from its assemblies, already loaded. A plugin that states a newer version of the plugin API than ApiVersion, or that has neither a command nor a class that implements ICadPluginApplication, is refused; a method marked as a command that cannot be one is left out and said in Problems. Each application class is made and initialised, in ordinal order of its full name; Folder is the folder of the first assembly.

public static CadPlugin FromAssemblies(string name, IEnumerable<Assembly> assemblies, string version = null)

Parameters

name string

The plugin's name; the name of the first assembly where null or empty.

assemblies IEnumerable<Assembly>

The assemblies, read in ordinal order of their full names.

version string

The plugin's version, as its manifest gives it; the first assembly's where null.

Returns

CadPlugin

The plugin.

Exceptions

ArgumentNullException

Thrown when the assemblies are null.

CadPluginException

Thrown when the plugin needs a newer API, states an API version that is not one, or has no command.