Generic type in C#

I am having trouble to do code reverse / generate on generic type.

i tried to use the instant reverse (.net dll or exe files) on a class that realizes a interface with generic type, and then do the instant C# generator to generate the code

here is the code that i tried to reverse:


using System.Collections.Generic;

namespace TestVP
{
    public interface IModel<Model>
    {
        void Copy(Model model);
        bool Equals(Model model);
    }

    public class TestClass1 : IModel<TestClass1>	
	{
            public void Copy(TestClass1 mToCopy)
            { }

            public bool Equals(TestClass1 mToCompare)
            {
                return false;
            }
        }
}

after a round trip, the VP generated the following C# code:


using System;

namespace TestVP
{
	
	public interface IModel
	{
		System.Void Copy( model);
		System.Boolean Equals( model);

	}

	public class TestClass1
	{
		public System.Void Copy(TestClass1 mToCopy) {			
			throw new System.Exception("Not implemented");
			
		}
		public System.Boolean Equals(TestClass1 mToCompare) {			
			throw new System.Exception("Not implemented");
			
		}
	}
}

noticed that the class TestClass1 is no longer realizing the IModel, as well as the generic is disappeared in the interface IModel; also, the parameters in the two operations inside the IModel are missing type.

I know that i were able to reverse / generate the same code without any problem in another UML software, but which take few steps to configure; however i couldn’t find anything under the option->instant reverse nor the advanced option in the instant generator.

any clue? am i doing something wrong?

I am using vp_uml 6.0 build 20070202 Evaluation Copy with Standard Edition.

thx!

Hello kaldyra,

Thank you. We will test this problem and get back to you as soon as possible.

Best regards,
Jick

Hello kaldyra,

This fix involve supporting generic type for generalization. We will support this in Service Pack 2. Will inform you once ready.

Best regards,
Jick

thx jick.

do u have any guesstimation on the release date / month / season of the SP2?

Hi kaldyra,

Frankly it is still early to say, but we hope to release it in June, this year.

Best regards,
Jick

Hi kaldyra,

Service Pack 2, which includes the support of generic type, is ready. Please run the product updater to advance to the latest release. You can find the product updater inside the bin folder of VP Suite installation directory. Please feel free to let me know if there are any questions.

Best regards,
Jick