The following example shows
how to define a .NET component that retrieves the value of
||In the Definer, select RDMI, dotNet Components from the Define
||Provide a name for your new component, in this case: ENV.
||Define a method called GET with an associated physical method
||Define two parameters: an input parameter containing the name
of the environment variable and a return parameter to contain the
value of the environment variable.
||Press Commit. USoft generates the C# stub in the Program Source
field and it compiles this code.
||USoft has generated a new class with the same name as the
component name (ENV) and a method with the same name as the
physical method(getvalue). The method has the same number and types
of parameters as defined in the RDMI definition. The last thing you
need to define is the implementation for this method. Change the
default "OK" string to:
At runtime when the .NET
component is called, USoft compiles the source code ("just in time"
(JIT) compilation), creates an instance of the class according to
the component lifetime settings and executes the method call.