feat(dir): add static ctor to License

This commit is contained in:
Collin M. Barrett 2021-11-18 13:26:30 -06:00
parent 8759f782b3
commit 0f561e1c49

View file

@ -9,4 +9,20 @@ private License() { }
public bool PermitsModification { get; private init; }
public bool PermitsDistribution { get; private init; }
public bool PermitsCommercialUse { get; private init; }
public static License Create(string name,
Uri? url,
bool permitsModification,
bool permitsDistribution,
bool permitsCommercialUse)
{
return new License
{
Name = name,
Url = url,
PermitsModification = permitsModification,
PermitsDistribution = permitsDistribution,
PermitsCommercialUse = permitsCommercialUse
};
}
}