Skip to content

TypeExporter.ExportMethod method

Exports or re-exports an instance method on an already-exported type. This is used when adding extension methods to a type.

C#
public void ExportMethod(Type type, string methodName, IEnumerable<MethodInfo> extensionMethods, 
    JSObject jsType, bool? deferExport = null)
parameterdescription
typeThe .NET type the
methodNameName of the method to export.
extensionMethodsCollection of known extension methods having the same name as the method, to incorporate in overload resolution of the method.
jsTypeThe JS class object that was originally exported for the type.
deferExportTrue to delay exporting of the method until it is accessed. If false, all method overloads (including extension methods) are immediately exported, which may cascade to exporting many additional types referenced by the methods. The default is from IsDelayLoadEnabled.

See Also

Released under the MIT license