Skip to content

Commit

Permalink
revert fix bug when map method not working on elvis operator
Browse files Browse the repository at this point in the history
  • Loading branch information
DedAnton committed Nov 15, 2023
1 parent 59a7041 commit 2f53cbb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 53 deletions.
8 changes: 4 additions & 4 deletions NextGenMapper/CodeAnalysis/SourceCodeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal static class SourceCodeAnalyzer
public static bool IsMapMethodInvocationSyntaxNode(SyntaxNode node)
=> node is InvocationExpressionSyntax
{
Expression: MemberAccessExpressionSyntax or MemberBindingExpressionSyntax
Expression: MemberAccessExpressionSyntax
{
Name: GenericNameSyntax
{
Expand All @@ -26,7 +26,7 @@ public static bool IsMapMethodInvocationSyntaxNode(SyntaxNode node)
public static bool IsConfiguredMapMethodInvocationSynaxNode(SyntaxNode node)
=> node is InvocationExpressionSyntax
{
Expression: MemberAccessExpressionSyntax or MemberBindingExpressionSyntax
Expression: MemberAccessExpressionSyntax
{
Name: GenericNameSyntax
{
Expand All @@ -38,7 +38,7 @@ public static bool IsConfiguredMapMethodInvocationSynaxNode(SyntaxNode node)
public static bool IsProjectionMethodInvocationSyntaxNode(SyntaxNode node)
=> node is InvocationExpressionSyntax
{
Expression: MemberAccessExpressionSyntax or MemberBindingExpressionSyntax
Expression: MemberAccessExpressionSyntax
{
Name: GenericNameSyntax
{
Expand All @@ -50,7 +50,7 @@ public static bool IsProjectionMethodInvocationSyntaxNode(SyntaxNode node)
public static bool IsConfiguredProjectionMethodInvocationSyntaxNode(SyntaxNode node)
=> node is InvocationExpressionSyntax
{
Expression: MemberAccessExpressionSyntax or MemberBindingExpressionSyntax
Expression: MemberAccessExpressionSyntax
{
Name: GenericNameSyntax
{
Expand Down

This file was deleted.

This file was deleted.

32 changes: 0 additions & 32 deletions NextGenMapperTests/Tests/MapMethodInvocation/Map.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,38 +202,6 @@ public class Source
public int Property { get; set; } = 1;
}
public class Destination
{
public int Property { get; set; }
}
";

return VerifyAndRun(source);
}

[TestMethod]
public Task InvocateOnElvisOperator_ShouldMap()
{
var source =
@"#nullable enable
using NextGenMapper;
namespace Test;
public class Program
{
public object? RunTest()
{
Source? source = new Source();
return source?.Map<Destination>();
}
}
public class Source
{
public int Property { get; set; } = 1;
}
public class Destination
{
public int Property { get; set; }
Expand Down

0 comments on commit 2f53cbb

Please sign in to comment.