Fix Default value (#19)

This commit is contained in:
Stef Heyenrath
2021-07-31 20:10:46 +02:00
committed by GitHub
parent 0802766c66
commit a1d23422dc
9 changed files with 137 additions and 113 deletions
@@ -24,11 +24,11 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
return GetReplacedType(property.Type, out isReplaced);
}
protected string GetReplacedType(ITypeSymbol property, out bool isReplaced)
protected string GetReplacedType(ITypeSymbol typeSymbol, out bool isReplaced)
{
isReplaced = false;
var typeSymbolAsString = property.ToString();
var typeSymbolAsString = typeSymbol.ToString();
var existing = _context.CandidateInterfaces.Values.FirstOrDefault(x => x.TypeName == typeSymbolAsString);
if (existing is not null)
@@ -42,7 +42,7 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
return existing.InterfaceName;
}
if (property is INamedTypeSymbol namedTypedSymbol)
if (typeSymbol is INamedTypeSymbol namedTypedSymbol)
{
var propertyTypeAsStringToBeModified = typeSymbolAsString;
foreach (var typeArgument in namedTypedSymbol.TypeArguments)
@@ -65,7 +65,6 @@ namespace ProxyInterfaceSourceGenerator.FileGenerators
return propertyTypeAsStringToBeModified;
}
return typeSymbolAsString;
}