Fix support for Nullable (language version 8) (#25)

* Only emit #nullable when nullable is supported (>= 8.0)

* x

* is not
This commit is contained in:
Stef Heyenrath
2021-08-06 17:09:01 +02:00
committed by GitHub
parent 8d43c73816
commit 9dd2221f23
10 changed files with 56 additions and 34 deletions
@@ -8,10 +8,12 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
internal abstract class BaseGenerator
{
protected readonly Context _context;
protected readonly bool _supportsNullable;
public BaseGenerator(Context context)
public BaseGenerator(Context context, bool supportsNullable)
{
_context = context;
_supportsNullable = supportsNullable;
}
protected string GetPropertyType(IPropertySymbol property, out bool isReplaced)