Skip to content

Commit

Permalink
Removing caching of symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
Keboo committed Jan 25, 2024
1 parent 8cbe45f commit dfde6f6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Moq.AutoMocker.TestGenerator/GeneratorTargetClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public class Parameter
{
public Parameter(IParameterSymbol symbol)
{
Symbol = symbol;
Name = symbol.Name;
ParameterType = symbol.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
IsValueType = symbol.Type.IsValueType;

if (symbol.HasExplicitDefaultValue)
{
IsNullable = symbol.ExplicitDefaultValue is null;
Expand All @@ -42,13 +45,10 @@ public Parameter(IParameterSymbol symbol)
{
IsNullable = true;
}

IsValueType = symbol.Type.IsValueType;
}
private IParameterSymbol Symbol { get; }

public bool IsValueType { get; }
public bool IsNullable { get; }
public string Name => Symbol.Name;
public string ParameterType => Symbol.Type.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
public string Name { get; }
public string ParameterType { get; }
}

0 comments on commit dfde6f6

Please sign in to comment.