Method FromResource
FromResource(Assembly, string)
Makes an icon from an image the assembly embeds, its bytes read and copied at once. The name is the resource's
full name, "MyPlugin.circle16.png" for circle16.png of a project whose root namespace is MyPlugin.
public static CadPluginIcon FromResource(Assembly assembly, string resourceName)
Parameters
assemblyAssemblyThe assembly that embeds it, usually the plugin's own.
resourceNamestringThe resource's full name.
Returns
- CadPluginIcon
The icon.
Exceptions
- ArgumentNullException
Thrown when the assembly or the name is null.
- ArgumentException
Thrown when the assembly has no such resource, or it is empty.