Mappings Grammar
In the following section, you will find a description and documentation of Mappings Grammar Tool.
Mappings Grammar
Mapping is a crucial concept for our migrators. It means that from a set of values as input, a function is applied to each value, and generates a set with new values.
It's a powerful tool that allows design mappings by using a syntax quite similar to C#, which is used to transform VB6 code to its equivalent in .NET (C# or VB).
This applies to the following statements:
Types
Members (Methods, properties, subroutines, events, among others)
Also, this tool offers the possibility to generate code for statements that are not supported in .NET (for more information, see Upgrade Stubs), reducing the time to carry out the compilation of a migrated project.
In the code below they are some types like enumAlign
and ctTips (ctTips1)
, including some members like Active
, Tag
, ToolTipText
and Alignment
.
Original VB6 Code source
By using Mappings Grammar it is possible to migrate classes and their members to their .NET equivalent.
Mappings design using Mappings Grammar
C# Code Generated by VBUC
Notes:
As shown in the example above,
ctTips
will be upgraded intoSystem.Windows.Forms.ToolTip
.Some members of
ctTips
class likeActive
,Container
,Tag
andToolTipText
will be upgrade to its .NET equivalent.There are some classes and members that are not supported in .NET, so it generates stubs; like the class
enumAlign
and the memberAlignment
.
Last updated