Codeporting has upgraded CSharp to Java library and mapping coverage

Posted by Zarfishan under C# category on | Points: 40 | Views : 1152
Codeporting C#2java Application has many powerful customization and administration options for developers and a Class Library Manager is also available to convert .Net types to respective java types. CodePorting provides user friendly interface to its users so that they can customize library map according to their project needs.

Users can assign maps for following types of class members:

. Extension Method
. Instance Member
. Indexer
. Instance Method
. Static Member
. Property

Let me explain you how mapping is going to work in CodePorting App.

The most important input to C#2Java converting engine is Library Map. There are two possibilities while converting C# .Net library methods to java.

First possibility is that a method exists in java library which provides same functionality as provided in .Net library method. If this is the case then C#2Java engine only need to know about that and that is where library mapping play its part. Lets take an example of System.Console.out method.

Following are it's details in .NET

.NET Class: System.Console
.NET Method (Static): WriteLine(System.String)

In Java .Net method is mapped as following

Java Class: System.out
Java Method (Static): printf(string)

The above C#2Java mapping helps in converting .Net library to java properly.

Second possibility is that a method does not exists in java library that provides same functionality as provides by .Net library method. If this is the case then there is no counter part of .Net method in java.
if this the case codeporting engine first writes a method which provides the same functionality as .net method does.

Lets take an example of System.Drawing.ColorTranslator.FromWin32(int) method.

Following are it's details in .NET

.NET Library: System.Drawing
.NET Class: System.Drawing.ColorTranslator
.NET Method (Static): FromWin32(int)

To map the above method Codeporting first writes a method in java with same input and output. Once done, Codeporting add this method in mapping so that engine knows how to translate this method in java.

Java Package: com.codeporting.csharp2java.System.Drawing.ColorTranslator
Java Class: ColorTranslator
Java Method (Static): fromWin32

Using the above information from mapping, the engine will translate it by importing the package com.codeporting.csharp2java.System.Drawing.ColorTranslator. After conversion, the above package where java method resides will be required to compile the generated code.

CodePorting team is continuously adding more and more methods in C#2Java Library to improve it. CodePorting team is proud to announce that we have upgraded C#2Java library and mapping. Lot of methods were added in, like System.Data, System.Drawing and many more.

Comments or Responses

Login to post response