估计阅读时长: 3 分钟

There are two kind of the package type in R# system:

  1. Single dll package module
  2. Nuget liked zip source package

1. Create a single .NET dll package module

For create a single .NET dll package module, you just needs to tag some custom attribute for R# system to imports functions in your .NET class project. It is very simple, here is how:

as you can see on the above screenshot of the demo code, we have two kind of custom attributes that is required for tag on the code of your dll module:

  • PackageAttribute: this custom attribute is used for tag the target class module is a package module in R# system. The target class must be a standard module in VisualBasic project and the class should be sealed in C#.
  • ExportAPIAttribute: this custom attribute is used for tag the target function in current package module is a R# function that can be imported into the runtime.

Note about function parameters

There are some kind of special parameter types in R# system:

Use the dll module in R# script

2. Create a nuget liked zip source package

Latest posts by 谢桂纲 (see all)

Attachments

No responses yet

Leave a Reply

Your email address will not be published.