2025-04-24 18:31:27 +08:00

33 lines
633 B
C#

using Swashbuckle.Swagger;
namespace Swashbuckle.Application
{
public class LicenseBuilder
{
private string _name;
private string _url;
public LicenseBuilder Name(string name)
{
_name = name;
return this;
}
public LicenseBuilder Url(string url)
{
_url = url;
return this;
}
internal License Build()
{
if ((_name ?? _url) == null) return null;
return new License
{
name = _name,
url = _url
};
}
}
}