quickconstructor
quickconstructor copied to clipboard
Base constructor is disregarded if the base is not also marked with the attribute
If I define a base class with a manual constructor, as you'd normally do:
public abstract class Base
{
private readonly object _value;
public Base(object v) => _value = v;
}
And then try and generate one for a derived class:
[QuickConstructor]
public sealed partial class Class : Base
{
}
It will generate invalid code, completely disregarding the base constructor. It works if you mark the base class with that though.
This could be helpful if you don't own the source code of the Base
class and can't just go ahead and add the attribute to it.