Skip to content

Commit

Permalink
Feature/refactoring (#24)
Browse files Browse the repository at this point in the history
* some small refactoring

* feat: remove primary ctor's
  • Loading branch information
protomorphine authored Sep 16, 2024
1 parent d63450e commit 0bdaac5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ namespace ImmutableAnalyzer.Utils.TypeChecking;
/// <summary>
/// Checks <see cref="ITypeSymbol"/> for immutability by declared types.
/// </summary>
internal class DeclaredTypeSymbolChecker(TypeChecker? inner = null) : TypeChecker
internal class DeclaredTypeSymbolChecker : TypeChecker
{
private readonly TypeChecker? _inner = inner;
private readonly TypeChecker? _inner;

/// <summary>
/// Creates new instance of <see cref="RecursiveTypeSymbolChecker"/>.
/// </summary>
/// <param name="inner">Inner checker.</param>
public DeclaredTypeSymbolChecker(TypeChecker? inner = null) { _inner = inner; }

/// <inheritdoc />
public override bool IsImmutable(ITypeSymbol typeSymbol)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ namespace ImmutableAnalyzer.Utils.TypeChecking;
/// <summary>
/// Decorator to check <see cref="ITypeSymbol"/> recursively.
/// </summary>
internal class RecursiveTypeSymbolChecker(TypeChecker inner) : TypeChecker
internal class RecursiveTypeSymbolChecker : TypeChecker
{
private readonly TypeChecker _inner = inner;
private readonly TypeChecker _inner;

/// <summary>
/// Creates new instance of <see cref="RecursiveTypeSymbolChecker"/>.
/// </summary>
/// <param name="inner">Inner checker.</param>
public RecursiveTypeSymbolChecker(TypeChecker inner) { _inner = inner; }

/// <inheritdoc />
public override bool IsImmutable(ITypeSymbol typeSymbol)
Expand Down

0 comments on commit 0bdaac5

Please sign in to comment.