Problem in C# instant code generator

Hello everyone! This is my UML diagram:

When I attempt to generate C# code from it I obtain this one:

Candle.cs:

using System;
public class Candle : ILightningSource  {
	public String IsOn; // How to tell Visual Paradigm generate auto-implemented property?

	private Factory factory;

}

Factory.cs:

using System;
public class Factory {
	public ILightningSource Create(ref LightningSourceType productType) {
		throw new System.Exception("Not implemented"); // Is is expected to see NotImplementedException instead of general Exception.
	}

	private Candle candle;
	private Lamp lamp;

	private LightningSourceType lightningSourceType;

}

ILightningSource.cs

using System;
public interface ILightningSource {
  // Where is IsOn property?
}

Lamp.cs:

using System;
public class Lamp : ILightningSource  {
	public String IsOn;

	private Factory factory;

}

LightningSourceType.cs:

using System;
public enum LightningSourceType {
	Candle,
	Lamp,

}

Are there any my mistakes?.. Formatting is strange. :roll_eyes:

Hi Alvin,

Thank you for your post. I have forwarded your question to our team to study. When there is any news I will let you know.

Best regards,
Jick Yeung

Hi Alvin,

  1. Auto-implement, Where is IsOn property?:
    You can set Setter and Getter in attribute specification, and Auto-Implemented Properties option in Instant Generator options.


    image

  2. NotImplementedException
    Thanks for your comment, we’ll change in the next patch.

1 Like

Hi Alvin,

I would like to let you know that the problem with NotImplementedException has been fixed and please update the software to latest patch build. Details about update to latest patch can be found at

  • Please make sure you have pressed the “Update to latest patch” button on the left hand side of the dialog right after launching the update program

Best regards,
Jick Yeung

1 Like