ImportActions
Action declarations can be imported from an existing implementation type. The visibility of the importation can be restricted to include all internal methods or to include all public methods. Specifying all public will import all public methods. Specifying all internal will import all internal, all protected internal, and all public methods. If neither internal nor public importation is specified, then the default is to import declarations from all public, private, and internal methods.
Syntax Definition
ImportActions ::= action all [ public | internal ] Type /*Implementation type*/ .
Example
Declarations containing the keyword all declare as actions all methods from a given type within a visible .NET assembly. These methods are imported as action declarations from the specified implementation type. Here is an example Cord configuration with actions imported from the MyClass
implementation type.
using Microsoft.Test;
config AllMembers
{
action all MyClass;
}
This configuration has one action for each method in type MyClass
which results in the following signature (that is, set of atomic actions):
call Microsoft.Test.MyClass.MyMethod(int)
return Microsoft.Test.MyClass.MyMethod(int)/int
event.Microsoft.Test.MyClass.MyEvent(int)/int
In this example, all methods of MyClass
are imported and declared regardless of their visibility because no public or internal restriction on visibility was specified.