Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using EntityFrameworkCore.Projectables.Generator.Models;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace EntityFrameworkCore.Projectables.Generator;
namespace EntityFrameworkCore.Projectables.Generator.Comparers;

public class MemberDeclarationSyntaxAndCompilationEqualityComparer
/// <summary>
/// Equality comparer for tuples of (MemberDeclarationSyntax, ProjectableAttributeData) and Compilation,
/// used as keys in the registry to determine if a member's projectable status has changed across incremental generation steps.
/// </summary>
internal class MemberDeclarationSyntaxAndCompilationEqualityComparer
: IEqualityComparer<((MemberDeclarationSyntax Member, ProjectableAttributeData Attribute), Compilation)>
{
private readonly static MemberDeclarationSyntaxEqualityComparer _memberComparer = new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
using System.Runtime.CompilerServices;
using Microsoft.CodeAnalysis.CSharp.Syntax;

namespace EntityFrameworkCore.Projectables.Generator;
namespace EntityFrameworkCore.Projectables.Generator.Comparers;

public class MemberDeclarationSyntaxEqualityComparer : IEqualityComparer<MemberDeclarationSyntax>
/// <summary>
/// Equality comparer for MemberDeclarationSyntax nodes that treats nodes as equal if they are from the same syntax
/// tree and have the same structure, even if they are different instances.
/// </summary>
internal class MemberDeclarationSyntaxEqualityComparer : IEqualityComparer<MemberDeclarationSyntax>
{
public bool Equals(MemberDeclarationSyntax x, MemberDeclarationSyntax y)
{
Expand Down
Loading