PlasticMetal.MobileSuit is a powerful tool to quickly build a .NET Core ConsoleApp.
Now, its light weight version is migrated to Java platform, which is called JMobileSuitLite.
So firstly, you need to create a new Application in your IDE.
Then, you should add PlasticMetal.JMobileSuitLite to your project.
Add a Class to your project, named Client . It inherits class PlasticMetal.JMobileSuitLite.ObjectModel.SuitClient .
PlasticMetal.JMobileSuitLite.ObjectModel.Annotions..SuitInfo with argument “Demo”
Add a method called Hello to class Client . It has no parameters and return value.
The content of method can be anything you like. You can use IO().WriteLine and IO().ReadLine instead of System.out.println and Scanner::nextLine.
Add custom attributes to the method:
Add a method called Bye to class Client. It has a string parameter, named name. It returns a string.
The content of method can be anything you like. You can use IO().WriteLine and IO().ReadLine instead of System.out.println and Scanner::nextLine.
Add main method
1 | public static void main(String[] args) throws Exception{ |
to the class, then add the following code to main:
1 | new SuitHost(Client.class).Run(); |
It may looks like:
1 | import PlasticMetal.JMobileSuitLite.ObjectModel.Annotions.SuitAlias; |
Build and run your application.
In the console, you may input:
The process of build such a app is so easy that you just need one class to write.