-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If Magic detects that a class has a constructor that accepts parameters, even if that class has a parameter less constructor, it attempts to use the parameterized one. Which then, it will not attempt to populate the properties upon a Get. Nor does it attempt to use the parameters as input. even if the constructors parameters explicitly accept null, it still does not fill in the rest of the class. silently returning a default constructed class. There should be a....
[MagicConstructor] // hint to Magic this is the constructor to use.
public MyClass(MyType? MyValue=null) {
// doubles as a default parameterless constructor as well as a optional values for other (non magic construction)
}
The only option I see is only have one parameter-less constructor in the class (as well as all nested classes)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request