From 9e9608113524148086c3107f86955520b2637273 Mon Sep 17 00:00:00 2001 From: latonz Date: Fri, 20 Nov 2026 16:37:31 +0100 Subject: [PATCH] fix: suppress nullable warnings in projections --- .../Descriptors/InlineExpressionRewriter.cs | 13 +++---- .../ExpressionMappingBodyBuilder.cs | 3 +- .../QueryableMappingBuilder.cs | 2 +- .../Descriptors/Mappings/ExpressionMapping.cs | 23 ++++-------- .../Mappings/QueryableProjectionMapping.cs | 25 ++++--------- src/Riok.Mapperly/Emit/SourceEmitter.cs | 2 +- .../Emit/Syntax/SyntaxFactoryHelper.Null.cs | 33 ++++++++++++++--- ...SnapshotGeneratedSource_NET8_0.verified.cs | 12 +++---- ...eneratedSource_NETFRAMEWORK4_8.verified.cs | 6 ---- .../Mapping/ExpressionMappingTest.cs | 8 ++--- .../Mapping/QueryableProjectionEnumTest.cs | 20 +++++------ ...yableProjectionNoExpressionInliningTest.cs | 16 ++++----- .../QueryableProjectionNullHandlingTest.cs | 20 +++++------ .../Mapping/QueryableProjectionTest.cs | 8 ++--- .../QueryableProjectionUserImplementedTest.cs | 4 +-- .../Mapping/UseMapperTest.cs | 8 ++--- .../Mapping/UseStaticMapperTest.cs | 36 +++++++++---------- .../Mapping/ValueTupleTest.cs | 8 ++--- ...llLiteralInProjection#Mapper.g.verified.cs | 4 +-- ...pingTest.ClassToClass#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...assMultipleProperties#Mapper.g.verified.cs | 4 +-- ...st.ClassToClassNested#Mapper.g.verified.cs | 4 +-- ...NestedMemberAttribute#Mapper.g.verified.cs | 4 +-- ...assToClassWithConfigs#Mapper.g.verified.cs | 4 +-- ...hedOptionalParameters#Mapper.g.verified.cs | 4 +-- ...ssionWithStringFormat#Mapper.g.verified.cs | 4 +-- ...ngTest.NestedWithCtor#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...lFlatteningInsideList#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...renceLoopInitProperty#Mapper.g.verified.cs | 4 +-- ...pingTest.StaticMapper#Mapper.g.verified.cs | 4 +-- ...pLevelUserImplemented#Mapper.g.verified.cs | 4 +-- ...enericSourceAndTarget#Mapper.g.verified.cs | 8 ++--- ...enericSourceAndTarget#Mapper.g.verified.cs | 8 ++--- ...erivedTypesShouldWork#Mapper.g.verified.cs | 4 +-- ...umTest.EnumFromString#Mapper.g.verified.cs | 4 +-- ...est.EnumToAnotherEnum#Mapper.g.verified.cs | 4 +-- ...EnumTest.EnumToString#Mapper.g.verified.cs | 4 +-- ...ayToArrayExplicitCast#Mapper.g.verified.cs | 4 +-- ...ableTest.ExplicitCast#Mapper.g.verified.cs | 4 +-- ...extShouldMatchEnabled#Mapper.g.verified.cs | 4 +-- ...ForNullableNavigation#Mapper.g.verified.cs | 4 +-- ...dNullablePathDirectly#Mapper.g.verified.cs | 4 +-- ...lableCollectionMember#Mapper.g.verified.cs | 4 +-- ...ableCollectionElement#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...urceAndTargetProperty#Mapper.g.verified.cs | 4 +-- ...dThrowShouldBeIgnored#Mapper.g.verified.cs | 4 +-- ...rgetValueTypeProperty#Mapper.g.verified.cs | 4 +-- ...SourcePathAutoFlatten#Mapper.g.verified.cs | 4 +-- ...PathAutoFlattenString#Mapper.g.verified.cs | 4 +-- ...cePathManuallyFlatten#Mapper.g.verified.cs | 4 +-- ...ullableSourceProperty#Mapper.g.verified.cs | 4 +-- ...urceValueTypeProperty#Mapper.g.verified.cs | 4 +-- ...ullableTargetProperty#Mapper.g.verified.cs | 4 +-- ...rgetValueTypeProperty#Mapper.g.verified.cs | 4 +-- ...orShouldNotDiagnostic#Mapper.g.verified.cs | 4 +-- ...ertyWithDeepCloneable#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...sabledNullableContext#Mapper.g.verified.cs | 4 +-- ...tionTest.ClassToClass#Mapper.g.verified.cs | 4 +-- ...assMultipleProperties#Mapper.g.verified.cs | 4 +-- ...st.ClassToClassNested#Mapper.g.verified.cs | 4 +-- ...NestedMemberAttribute#Mapper.g.verified.cs | 4 +-- ...thAdditionalParameter#Mapper.g.verified.cs | 4 +-- ...assToClassWithConfigs#Mapper.g.verified.cs | 4 +-- ...hedOptionalParameters#Mapper.g.verified.cs | 4 +-- ...ppingShouldDiagnostic#Mapper.g.verified.cs | 4 +-- ...gWithAdditionalParams#Mapper.g.verified.cs | 4 +-- ...gWithAdditionalParams#Mapper.g.verified.cs | 4 +-- ...dWithAdditionalParams#Mapper.g.verified.cs | 4 +-- ...pertyWithStringFormat#Mapper.g.verified.cs | 4 +-- ...lFlatteningInsideList#Mapper.g.verified.cs | 4 +-- ...cordManualListMapping#Mapper.g.verified.cs | 4 +-- ...InliningMappingMethod#Mapper.g.verified.cs | 4 +-- ...est.ReferenceLoopCtor#Mapper.g.verified.cs | 4 +-- ...renceLoopInitProperty#Mapper.g.verified.cs | 4 +-- ...pLevelUserImplemented#Mapper.g.verified.cs | 4 +-- ...gOnSelectedProperties#Mapper.g.verified.cs | 4 +-- ...abledAutoUserMappings#Mapper.g.verified.cs | 4 +-- ...tedSupertypeParameter#Mapper.g.verified.cs | 4 +-- ...ithSupertypeParameter#Mapper.g.verified.cs | 4 +-- ...gOnSelectedProperties#Mapper.g.verified.cs | 4 +-- ...abledAutoUserMappings#Mapper.g.verified.cs | 4 +-- ...pingsAndAmbiguousName#Mapper.g.verified.cs | 8 ++--- ...lassInlinedExpression#Mapper.g.verified.cs | 4 +-- ...inedSingleDeclaration#Mapper.g.verified.cs | 4 +-- ...nlinedSingleStatement#Mapper.g.verified.cs | 4 +-- ...ClassNonInlinedMethod#Mapper.g.verified.cs | 4 +-- ...ithExplicitReturnType#Mapper.g.verified.cs | 4 +-- ...erImplementedOrdering#Mapper.g.verified.cs | 4 +-- ...ingAndParameterHiding#Mapper.g.verified.cs | 4 +-- ...WithTwoNestedMappings#Mapper.g.verified.cs | 4 +-- ...hesizedLambdaOrdering#Mapper.g.verified.cs | 4 +-- ...ntedWithTargetTypeNew#Mapper.g.verified.cs | 4 +-- ...getTypeNewInitializer#Mapper.g.verified.cs | 4 +-- ...ntedWithUsingMappings#Mapper.g.verified.cs | 4 +-- ...leValueTypeToNullable#Mapper.g.verified.cs | 4 +-- ...bleMemberTypeMismatch#Mapper.g.verified.cs | 4 +-- ...hCallToAnotherMapping#Mapper.g.verified.cs | 4 +-- ...ensionBlockShouldWork#Mapper.g.verified.cs | 4 +-- ...alueTypeToNonNullable#Mapper.g.verified.cs | 4 +-- ...ldReuseInlinedMapping#Mapper.g.verified.cs | 8 ++--- ...ParameterNameConflict#Mapper.g.verified.cs | 4 +-- ...arameterNameConflicts#Mapper.g.verified.cs | 4 +-- ...ParameterNameConflict#Mapper.g.verified.cs | 4 +-- ...enericSourceAndTarget#Mapper.g.verified.cs | 8 ++--- ...ShouldInlineGenerator#Mapper.g.verified.cs | 4 +-- ...dInlineGenerator#OtherMapper.g.verified.cs | 4 +-- 111 files changed, 316 insertions(+), 323 deletions(-) diff --git a/src/Riok.Mapperly/Descriptors/InlineExpressionRewriter.cs b/src/Riok.Mapperly/Descriptors/InlineExpressionRewriter.cs index 0613185f4d..b8453553be 100644 --- a/src/Riok.Mapperly/Descriptors/InlineExpressionRewriter.cs +++ b/src/Riok.Mapperly/Descriptors/InlineExpressionRewriter.cs @@ -146,16 +146,13 @@ public override SyntaxNode VisitTypeOfExpression(TypeOfExpressionSyntax node) return node; } - public override SyntaxNode? VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node) + public override SyntaxNode VisitParenthesizedLambdaExpression(ParenthesizedLambdaExpressionSyntax node) { - // the lambda symbol keeps the nullable annotation of an explicit return type, - // the type info of the return type syntax does not. - var returnType = node.ReturnType == null ? null : (semanticModel.GetSymbolInfo(node).Symbol as IMethodSymbol)?.ReturnType; - node = (ParenthesizedLambdaExpressionSyntax)base.VisitParenthesizedLambdaExpression(node)!; - if (returnType == null || node.ReturnType == null) - return node; + var rewritten = (ParenthesizedLambdaExpressionSyntax)base.VisitParenthesizedLambdaExpression(node)!; + if (node.ReturnType == null || semanticModel.GetSymbolInfo(node).Symbol is not IMethodSymbol lambda) + return rewritten; - return node.WithReturnType(FullyQualifiedIdentifier(returnType).WithTriviaFrom(node.ReturnType)); + return rewritten.WithReturnType(FullyQualifiedIdentifier(lambda.ReturnType).WithTriviaFrom(node.ReturnType)); } public override SyntaxNode? VisitInvocationExpression(InvocationExpressionSyntax node) diff --git a/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/ExpressionMappingBodyBuilder.cs b/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/ExpressionMappingBodyBuilder.cs index 9c1e8a5ab1..2753336b2a 100644 --- a/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/ExpressionMappingBodyBuilder.cs +++ b/src/Riok.Mapperly/Descriptors/MappingBodyBuilders/ExpressionMappingBodyBuilder.cs @@ -22,8 +22,7 @@ public static void BuildMappingBody(MappingBuilderContext ctx, UserDefinedExpres var expressionMapping = new ExpressionMapping( sourceType, mapping.TargetType, // The return type (Expression>) - delegateMapping, - ctx.Configuration.SupportedFeatures.NullableAttributes + delegateMapping ); mapping.SetDelegateMapping(expressionMapping); return; diff --git a/src/Riok.Mapperly/Descriptors/MappingBuilders/QueryableMappingBuilder.cs b/src/Riok.Mapperly/Descriptors/MappingBuilders/QueryableMappingBuilder.cs index b5340bf63e..ccfa3ebef5 100644 --- a/src/Riok.Mapperly/Descriptors/MappingBuilders/QueryableMappingBuilder.cs +++ b/src/Riok.Mapperly/Descriptors/MappingBuilders/QueryableMappingBuilder.cs @@ -24,6 +24,6 @@ public static class QueryableMappingBuilder if (mapping == null) return null; - return new QueryableProjectionMapping(ctx.Source, ctx.Target, mapping, ctx.Configuration.SupportedFeatures.NullableAttributes); + return new QueryableProjectionMapping(ctx.Source, ctx.Target, mapping); } } diff --git a/src/Riok.Mapperly/Descriptors/Mappings/ExpressionMapping.cs b/src/Riok.Mapperly/Descriptors/Mappings/ExpressionMapping.cs index 614fd26126..f6676b4086 100644 --- a/src/Riok.Mapperly/Descriptors/Mappings/ExpressionMapping.cs +++ b/src/Riok.Mapperly/Descriptors/Mappings/ExpressionMapping.cs @@ -1,7 +1,6 @@ using System.Linq.Expressions; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Riok.Mapperly.Emit.Syntax.SyntaxFactoryHelper; namespace Riok.Mapperly.Descriptors.Mappings; @@ -10,30 +9,20 @@ namespace Riok.Mapperly.Descriptors.Mappings; /// An expression mapping that returns an /// where TDelegate is a . /// -public class ExpressionMapping( - ITypeSymbol sourceType, - ITypeSymbol targetType, - INewInstanceMapping delegateMapping, - bool supportsNullableAttributes -) : NewInstanceMethodMapping(sourceType, targetType) +public class ExpressionMapping(ITypeSymbol sourceType, ITypeSymbol targetType, INewInstanceMapping delegateMapping) + : NewInstanceMethodMapping(sourceType, targetType) { public override IEnumerable BuildBody(TypeMappingBuildContext ctx) { - // disable nullable reference types for expressions, as for ORMs nullables usually don't apply - // #nullable disable + // disable nullable reference type warnings for expressions, as for ORMs nullables usually don't apply + // #nullable disable warnings // return (TSource x) => new TTarget { ... }; - // #nullable enable + // #nullable enable warnings var (lambdaCtx, lambdaSourceName) = ctx.WithNewScopedSource(); var delegateMappingSyntax = delegateMapping.Build(lambdaCtx); var projectionLambda = Lambda(lambdaSourceName, delegateMappingSyntax); var returnStatement = ctx.SyntaxFactory.Return(projectionLambda); - var leadingTrivia = returnStatement.GetLeadingTrivia().Insert(0, ElasticCarriageReturnLineFeed).Insert(1, Nullable(false)); - var trailingTrivia = returnStatement - .GetTrailingTrivia() - .Insert(0, ElasticCarriageReturnLineFeed) - .Insert(1, Nullable(true, !supportsNullableAttributes)); - returnStatement = returnStatement.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia); - return [returnStatement]; + return [ctx.SyntaxFactory.DisableNullableWarnings(returnStatement)]; } } diff --git a/src/Riok.Mapperly/Descriptors/Mappings/QueryableProjectionMapping.cs b/src/Riok.Mapperly/Descriptors/Mappings/QueryableProjectionMapping.cs index e1631759d5..913e1e97db 100644 --- a/src/Riok.Mapperly/Descriptors/Mappings/QueryableProjectionMapping.cs +++ b/src/Riok.Mapperly/Descriptors/Mappings/QueryableProjectionMapping.cs @@ -1,6 +1,5 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp.Syntax; -using static Microsoft.CodeAnalysis.CSharp.SyntaxFactory; using static Riok.Mapperly.Emit.Syntax.SyntaxFactoryHelper; namespace Riok.Mapperly.Descriptors.Mappings; @@ -9,34 +8,24 @@ namespace Riok.Mapperly.Descriptors.Mappings; /// A projections queryable mapping /// to map from one generic to another. /// -public class QueryableProjectionMapping( - ITypeSymbol sourceType, - ITypeSymbol targetType, - INewInstanceMapping delegateMapping, - bool supportsNullableAttributes -) : NewInstanceMethodMapping(sourceType, targetType) +public class QueryableProjectionMapping(ITypeSymbol sourceType, ITypeSymbol targetType, INewInstanceMapping delegateMapping) + : NewInstanceMethodMapping(sourceType, targetType) { private const string QueryableReceiverName = "global::System.Linq.Queryable"; private const string SelectMethodName = nameof(Queryable.Select); public override IEnumerable BuildBody(TypeMappingBuildContext ctx) { - // disable nullable reference types for expressions, as for ORMs nullables usually don't apply - // #nullable disable - // return System.Linq.Enumerable.Select(source, x => ...); - // #nullable enable + // disable nullable reference type warnings for expressions, as for ORMs nullables usually don't apply + // #nullable disable warnings + // return global::System.Linq.Queryable.Select(source, x => ...); + // #nullable enable warnings var (lambdaCtx, lambdaSourceName) = ctx.WithNewScopedSource(); var delegateMappingSyntax = delegateMapping.Build(lambdaCtx); var projectionLambda = Lambda(lambdaSourceName, delegateMappingSyntax); var select = ctx.SyntaxFactory.StaticInvocation(QueryableReceiverName, SelectMethodName, ctx.Source, projectionLambda); var returnStatement = ctx.SyntaxFactory.Return(select); - var leadingTrivia = returnStatement.GetLeadingTrivia().Insert(0, ElasticCarriageReturnLineFeed).Insert(1, Nullable(false)); - var trailingTrivia = returnStatement - .GetTrailingTrivia() - .Insert(0, ElasticCarriageReturnLineFeed) - .Insert(1, Nullable(true, !supportsNullableAttributes)); - returnStatement = returnStatement.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia); - return [returnStatement]; + return [ctx.SyntaxFactory.DisableNullableWarnings(returnStatement)]; } } diff --git a/src/Riok.Mapperly/Emit/SourceEmitter.cs b/src/Riok.Mapperly/Emit/SourceEmitter.cs index ae027c9ace..46222ac562 100644 --- a/src/Riok.Mapperly/Emit/SourceEmitter.cs +++ b/src/Riok.Mapperly/Emit/SourceEmitter.cs @@ -29,7 +29,7 @@ public static CompilationUnitSyntax Build(MapperDescriptor descriptor, Cancellat .WithLeadingTrivia( Comment(AutoGeneratedComment), ElasticCarriageReturnLineFeed, - Nullable(true, !descriptor.SupportedFeatures.NullableAttributes), + Nullable(true, descriptor.SupportedFeatures.NullableAttributes ? NullableTarget.All : NullableTarget.Annotations), ElasticCarriageReturnLineFeed ); } diff --git a/src/Riok.Mapperly/Emit/Syntax/SyntaxFactoryHelper.Null.cs b/src/Riok.Mapperly/Emit/Syntax/SyntaxFactoryHelper.Null.cs index 23436e2520..6830afa000 100644 --- a/src/Riok.Mapperly/Emit/Syntax/SyntaxFactoryHelper.Null.cs +++ b/src/Riok.Mapperly/Emit/Syntax/SyntaxFactoryHelper.Null.cs @@ -9,6 +9,13 @@ namespace Riok.Mapperly.Emit.Syntax; public partial struct SyntaxFactoryHelper { + public enum NullableTarget + { + All, + Annotations, + Warnings, + } + public static AssignmentExpressionSyntax CoalesceAssignment(ExpressionSyntax target, ExpressionSyntax source) { return AssignmentExpression( @@ -19,21 +26,39 @@ public static AssignmentExpressionSyntax CoalesceAssignment(ExpressionSyntax tar ); } - public static SyntaxTrivia Nullable(bool enabled, bool annotationsOnly = false) + public static SyntaxTrivia Nullable(bool enabled, NullableTarget target = NullableTarget.All) { var nullableDirective = NullableDirectiveTrivia( LeadingSpacedToken(enabled ? SyntaxKind.EnableKeyword : SyntaxKind.DisableKeyword), true ); - if (annotationsOnly) + nullableDirective = target switch { - nullableDirective = nullableDirective.WithTargetToken(LeadingSpacedToken(SyntaxKind.AnnotationsKeyword)); - } + NullableTarget.Annotations => nullableDirective.WithTargetToken(LeadingSpacedToken(SyntaxKind.AnnotationsKeyword)), + NullableTarget.Warnings => nullableDirective.WithTargetToken(LeadingSpacedToken(SyntaxKind.WarningsKeyword)), + _ => nullableDirective, + }; return Trivia(nullableDirective); } + public StatementSyntax DisableNullableWarnings(StatementSyntax statement) + { + if (!supportedFeatures.NullableAttributes) + return statement; + + var leadingTrivia = statement + .GetLeadingTrivia() + .Insert(0, ElasticCarriageReturnLineFeed) + .Insert(1, Nullable(false, NullableTarget.Warnings)); + var trailingTrivia = statement + .GetTrailingTrivia() + .Insert(0, ElasticCarriageReturnLineFeed) + .Insert(1, Nullable(true, NullableTarget.Warnings)); + return statement.WithLeadingTrivia(leadingTrivia).WithTrailingTrivia(trailingTrivia); + } + public static BinaryExpressionSyntax Coalesce(ExpressionSyntax expr, ExpressionSyntax coalesceExpr) => BinaryExpression(SyntaxKind.CoalesceExpression, expr, coalesceExpr); diff --git a/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NET8_0.verified.cs b/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NET8_0.verified.cs index 72abee8f9c..e3b0835b19 100644 --- a/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NET8_0.verified.cs +++ b/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NET8_0.verified.cs @@ -7,7 +7,7 @@ public static partial class ProjectionMapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjection(x.CtorValue) @@ -64,13 +64,13 @@ public static partial class ProjectionMapper })), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => (global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjectionBaseType)(x is global::Riok.Mapperly.IntegrationTests.Models.TestObjectProjectionTypeA ? new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjectionTypeA() @@ -85,13 +85,13 @@ public static partial class ProjectionMapper BaseValue = ((global::Riok.Mapperly.IntegrationTests.Models.TestObjectProjectionTypeB)x).BaseValue, } : default) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.Expressions.Expression> ProjectToDtoExpression() { -#nullable disable +#nullable disable warnings return x => new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjection(x.CtorValue) { IntValue = x.IntValue, @@ -145,7 +145,7 @@ public static partial class ProjectionMapper Value = x1.Value, })), }; -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NETFRAMEWORK4_8.verified.cs b/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NETFRAMEWORK4_8.verified.cs index be69037d66..d571c1a3ed 100644 --- a/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NETFRAMEWORK4_8.verified.cs +++ b/test/Riok.Mapperly.IntegrationTests/_snapshots/ProjectionMapperTest.SnapshotGeneratedSource_NETFRAMEWORK4_8.verified.cs @@ -7,7 +7,6 @@ public static partial class ProjectionMapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable return global::System.Linq.Queryable.Select( q, x => new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjection(x.CtorValue) @@ -68,13 +67,11 @@ public static partial class ProjectionMapper })), } ); -#nullable enable annotations } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable return global::System.Linq.Queryable.Select( q, x => (global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjectionBaseType)(x is global::Riok.Mapperly.IntegrationTests.Models.TestObjectProjectionTypeA ? new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjectionTypeA() @@ -89,13 +86,11 @@ public static partial class ProjectionMapper BaseValue = ((global::Riok.Mapperly.IntegrationTests.Models.TestObjectProjectionTypeB)x).BaseValue, } : default) ); -#nullable enable annotations } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.Expressions.Expression> ProjectToDtoExpression() { -#nullable disable return x => new global::Riok.Mapperly.IntegrationTests.Dto.TestObjectDtoProjection(x.CtorValue) { IntValue = x.IntValue, @@ -153,7 +148,6 @@ public static partial class ProjectionMapper Value = x1.Value, })), }; -#nullable enable annotations } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/Mapping/ExpressionMappingTest.cs b/test/Riok.Mapperly.Tests/Mapping/ExpressionMappingTest.cs index 443200a3d8..fe5184f899 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ExpressionMappingTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ExpressionMappingTest.cs @@ -24,9 +24,9 @@ public void TopLevelEnumByNameWithMethodNoExpressionInliningShouldInvoke() .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return x => MapEnum(x); - #nullable enable + #nullable enable warnings """ ); } @@ -54,9 +54,9 @@ TestSourceBuilderOptions.Default with .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return x => MapEnum(x); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs index aa0b20032a..4b6acc8084 100644 --- a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionEnumTest.cs @@ -37,7 +37,7 @@ public void EnumToAnotherEnumWithDifferentUnderlyingType() .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -45,7 +45,7 @@ public void EnumToAnotherEnumWithDifferentUnderlyingType() Value = (global::D)x.Value, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -115,7 +115,7 @@ TestSourceBuilderOptions.Default with .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -123,7 +123,7 @@ TestSourceBuilderOptions.Default with Value = MapEnum(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -153,7 +153,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -161,7 +161,7 @@ TestSourceBuilderOptions.Default with Value = MapEnum(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -186,9 +186,9 @@ public void TopLevelEnumByNameWithMethodNoExpressionInliningShouldInvoke() .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(q, x => MapEnum(x)); - #nullable enable + #nullable enable warnings """ ); } @@ -216,9 +216,9 @@ TestSourceBuilderOptions.Default with .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(q, x => MapEnum(x)); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNoExpressionInliningTest.cs b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNoExpressionInliningTest.cs index b58c79e032..f016628e05 100644 --- a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNoExpressionInliningTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNoExpressionInliningTest.cs @@ -24,9 +24,9 @@ TestSourceBuilderOptions.Default with .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(q, x => MapSingle(x)); - #nullable enable + #nullable enable warnings """ ) .HaveMethodBody( @@ -68,7 +68,7 @@ class B { public string Value { get; set; } } .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -76,7 +76,7 @@ class B { public string Value { get; set; } } Value = MapValue(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -110,7 +110,7 @@ class B { public string Value { get; set; } } .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -118,7 +118,7 @@ class B { public string Value { get; set; } } Value = ((global::IMapperBase)this).MapValue(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -149,7 +149,7 @@ class B { public string Value { get; set; } } .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -157,7 +157,7 @@ class B { public string Value { get; set; } } Value = MapValue(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNullHandlingTest.cs b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNullHandlingTest.cs index c931bac25f..d704fdf2bc 100644 --- a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNullHandlingTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionNullHandlingTest.cs @@ -25,7 +25,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -36,7 +36,7 @@ TestSourceBuilderOptions.Default with }, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -81,7 +81,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -89,7 +89,7 @@ TestSourceBuilderOptions.Default with Name = x.Name, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -131,7 +131,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -139,7 +139,7 @@ TestSourceBuilderOptions.Default with IntValue = x.IntValue.Value, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -203,7 +203,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -211,7 +211,7 @@ TestSourceBuilderOptions.Default with Value = x.Value, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -254,7 +254,7 @@ TestSourceBuilderOptions.Default with .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -262,7 +262,7 @@ TestSourceBuilderOptions.Default with Items = global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(x.Items, x1 => x1.Value)), } ); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionTest.cs b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionTest.cs index 0c7e193fe8..6074c2e2bd 100644 --- a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionTest.cs @@ -318,7 +318,7 @@ class B { public string TargetValue { get; set; } public int CurrentUserId { get // SourceValue → TargetValue mapping is NOT applied (no matching element mapping), // instead TargetValue is mapped by name from A.TargetValue, and currentUserId by name. """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -327,7 +327,7 @@ class B { public string TargetValue { get; set; } public int CurrentUserId { get CurrentUserId = currentUserId, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -357,7 +357,7 @@ class B { public string Name { get; set; } public string TargetValue { get; set; // the projection has no params and the element mapping is non-default (has params). // SourceValue has no matching target, Name maps by name. """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -365,7 +365,7 @@ class B { public string Name { get; set; } public string TargetValue { get; set; Name = x.Name, } ); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionUserImplementedTest.cs b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionUserImplementedTest.cs index 51e8df93c1..bda6c827ce 100644 --- a/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionUserImplementedTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/QueryableProjectionUserImplementedTest.cs @@ -121,7 +121,7 @@ public static D MapToD(C v) .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -130,7 +130,7 @@ public static D MapToD(C v) NestedValue = global::IBaseMapper.MapToD(x.NestedValue), } ); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/UseMapperTest.cs b/test/Riok.Mapperly.Tests/Mapping/UseMapperTest.cs index 52c1a7fcfa..057705ec4a 100644 --- a/test/Riok.Mapperly.Tests/Mapping/UseMapperTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/UseMapperTest.cs @@ -491,7 +491,7 @@ partial class OtherMapper .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -499,7 +499,7 @@ partial class OtherMapper Value = _other.MapEnum(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -523,7 +523,7 @@ public void ProjectionWithUseMapperNoExpressionInliningShouldInvoke() .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -531,7 +531,7 @@ public void ProjectionWithUseMapperNoExpressionInliningShouldInvoke() Value = _other.MapValue(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/UseStaticMapperTest.cs b/test/Riok.Mapperly.Tests/Mapping/UseStaticMapperTest.cs index cf2efb9315..937c74e354 100644 --- a/test/Riok.Mapperly.Tests/Mapping/UseStaticMapperTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/UseStaticMapperTest.cs @@ -469,7 +469,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyAsReference() .HaveMethodBody( "ProjectToTarget", """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::Mapper.Target() @@ -477,7 +477,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyAsReference() DateTime = global::Riok.Mapperly.TestDependency.Mapper.DateTimeMapper.MapToDateTimeOffset(x.DateTime), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -497,7 +497,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyWithNoExpressio .HaveMethodBody( "ProjectToTarget", """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::Mapper.Target() @@ -505,7 +505,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyWithNoExpressio DateTime = global::Riok.Mapperly.TestDependency.Mapper.DateTimeMapper.MapToDateTimeOffset(x.DateTime), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -523,7 +523,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyAsCompiledAssem .HaveMethodBody( "ProjectToTarget", """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::Mapper.Target() @@ -531,7 +531,7 @@ public void UseStaticGenericMapperStaticMethodFromAnotherAssemblyAsCompiledAssem DateTime = global::Riok.Mapperly.TestDependency.Mapper.DateTimeMapper.MapToDateTimeOffset(x.DateTime), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -612,7 +612,7 @@ public static partial class Mapper .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -620,7 +620,7 @@ public static partial class Mapper Value = global::OtherMapper.ToName(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -920,7 +920,7 @@ public static partial class Mapper .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -928,7 +928,7 @@ public static partial class Mapper Status = global::EnumMapper.MapToStatus(x.Status), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -976,7 +976,7 @@ public static partial class Mapper .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -984,7 +984,7 @@ public static partial class Mapper Value = global::EnumMapper.MapEnum(x.Value), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -1029,7 +1029,7 @@ public static partial class Mapper .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -1037,7 +1037,7 @@ public static partial class Mapper Status = global::EnumMapper.MapToStatus(x.Status), } ); - #nullable enable + #nullable enable warnings """ ); } @@ -1075,7 +1075,7 @@ public static partial class Mapper .Should() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -1083,7 +1083,7 @@ public static partial class Mapper Value = x.Value.Name, } ); - #nullable enable + #nullable enable warnings """ ); } @@ -1164,9 +1164,9 @@ static class WhenNull .HaveAssertedAllDiagnostics() .HaveMapMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Item != null ? x.Item.Value : default)); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/Mapping/ValueTupleTest.cs b/test/Riok.Mapperly.Tests/Mapping/ValueTupleTest.cs index 021343c891..98d2d46ffb 100644 --- a/test/Riok.Mapperly.Tests/Mapping/ValueTupleTest.cs +++ b/test/Riok.Mapperly.Tests/Mapping/ValueTupleTest.cs @@ -597,9 +597,9 @@ public void QueryableTupleToQueryableTuple() .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::System.ValueTuple(x.A, x.B)); - #nullable enable + #nullable enable warnings """ ); } @@ -617,9 +617,9 @@ public void QueryableTupleToIQueryableValueTuple() .Should() .HaveSingleMethodBody( """ - #nullable disable + #nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::System.ValueTuple(x.A, x.B)); - #nullable enable + #nullable enable warnings """ ); } diff --git a/test/Riok.Mapperly.Tests/_snapshots/CastTest.NullableSourceWithMultipleUserDefinedEqualityOperatorsShouldCastNullLiteralInProjection#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/CastTest.NullableSourceWithMultipleUserDefinedEqualityOperatorsShouldCastNullLiteralInProjection#Mapper.g.verified.cs index 0f99723204..a0acbfd856 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/CastTest.NullableSourceWithMultipleUserDefinedEqualityOperatorsShouldCastNullLiteralInProjection#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/CastTest.NullableSourceWithMultipleUserDefinedEqualityOperatorsShouldCastNullLiteralInProjection#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper PromoCode = x.PromoCode != (global::Code?)null ? (string)x.PromoCode : default, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClass#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClass#Mapper.g.verified.cs index 4c6b424977..34094ed2de 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClass#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClass#Mapper.g.verified.cs @@ -6,11 +6,11 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { StringValue = x.StringValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs index 4493a7477f..2813dcf554 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs @@ -6,12 +6,12 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression?>? Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { OtherValue = x.Value, }; -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMultipleProperties#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMultipleProperties#Mapper.g.verified.cs index 8041191729..a205b748b4 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMultipleProperties#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassMultipleProperties#Mapper.g.verified.cs @@ -6,13 +6,13 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { StringValue = x.StringValue, IntValue = x.IntValue, CharValue = x.CharValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNested#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNested#Mapper.g.verified.cs index f96217c705..ec07554e85 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNested#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNested#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { StringValue = x.StringValue, @@ -15,6 +15,6 @@ public partial class Mapper IntValue = x.OtherValue.IntValue, }, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs index 0983b9bfff..c712549b5c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs @@ -6,12 +6,12 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { Id = x.Value.Id, }; -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassWithConfigs#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassWithConfigs#Mapper.g.verified.cs index a85f2b17ad..1af6c5160b 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassWithConfigs#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ClassToClassWithConfigs#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { StringValue2 = x.StringValue, @@ -19,7 +19,7 @@ public partial class Mapper }, }, }; -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs index 6448261c1b..3bea5ce37d 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs @@ -6,11 +6,11 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B(x.StringValue) { IntValue = x.IntValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ExpressionWithStringFormat#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ExpressionWithStringFormat#Mapper.g.verified.cs index b867a97714..bb3b7e97bf 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ExpressionWithStringFormat#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ExpressionWithStringFormat#Mapper.g.verified.cs @@ -6,12 +6,12 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { Value = x.Value.ToString("C"), }; -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.NestedWithCtor#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.NestedWithCtor#Mapper.g.verified.cs index 083efe8841..4edbd22055 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.NestedWithCtor#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.NestedWithCtor#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B( x.Nested != null ? new global::D() { @@ -16,6 +16,6 @@ public partial class Mapper { IntValue = x.IntValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordDisabledNullableContext#Mapper.g.verified.cs index 62c5797be5..46c19fbf17 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordDisabledNullableContext#Mapper.g.verified.cs @@ -6,8 +6,8 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression?>? Map() { -#nullable disable +#nullable disable warnings return x => new global::B(x.Value); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs index 9d86fa5433..ea03d05633 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs @@ -6,11 +6,11 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B( x.Id.ToString(), global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(x.Values, x1 => x1.Value)) ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs index 78859e7de2..9a5650bd6a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs @@ -6,9 +6,9 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression?>? Map() { -#nullable disable +#nullable disable warnings return x => new global::B(x.Value); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ReferenceLoopInitProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ReferenceLoopInitProperty#Mapper.g.verified.cs index 97cf128d9d..b2b7c6ec27 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ReferenceLoopInitProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.ReferenceLoopInitProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B() { Nested = x.Nested != null ? new global::D() @@ -15,6 +15,6 @@ public partial class Mapper } : default, IntValue = x.IntValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.StaticMapper#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.StaticMapper#Mapper.g.verified.cs index 6bfbd65ab5..b164d5d533 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.StaticMapper#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.StaticMapper#Mapper.g.verified.cs @@ -6,11 +6,11 @@ public static partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.Expressions.Expression> CreateProjection() { -#nullable disable +#nullable disable warnings return x => new global::B() { StringValue = x.StringValue, }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.TopLevelUserImplemented#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.TopLevelUserImplemented#Mapper.g.verified.cs index c831efd478..ab4854668b 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.TopLevelUserImplemented#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/ExpressionMappingTest.TopLevelUserImplemented#Mapper.g.verified.cs @@ -6,8 +6,8 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.Expressions.Expression> Map() { -#nullable disable +#nullable disable warnings return x => new global::B(10) { Value2 = 11, Value3 = "foo bar" }; -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithQueryableGenericSourceAndTarget#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithQueryableGenericSourceAndTarget#Mapper.g.verified.cs index a364dbcb0a..fb3a3fcddd 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithQueryableGenericSourceAndTarget#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithQueryableGenericSourceAndTarget#Mapper.g.verified.cs @@ -17,16 +17,16 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable MapToB(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Value)); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable MapToD(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::D(x.Value1)); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithTypeConstrainedQueryableGenericSourceAndTarget#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithTypeConstrainedQueryableGenericSourceAndTarget#Mapper.g.verified.cs index d799e512a8..84f099d8c4 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithTypeConstrainedQueryableGenericSourceAndTarget#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/GenericTest.WithTypeConstrainedQueryableGenericSourceAndTarget#Mapper.g.verified.cs @@ -17,16 +17,16 @@ private partial TTarget Map(TSource source [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable MapToB(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Value)); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable MapToD(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::D(x.Value1)); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionDerivedTypeTest.AbstractBaseClassDerivedTypesShouldWork#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionDerivedTypeTest.AbstractBaseClassDerivedTypesShouldWork#Mapper.g.verified.cs index fbb8e251ea..b775e570cd 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionDerivedTypeTest.AbstractBaseClassDerivedTypesShouldWork#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionDerivedTypeTest.AbstractBaseClassDerivedTypesShouldWork#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => (global::B)(x is global::ASubType1 ? new global::BSubType1() @@ -21,7 +21,7 @@ public partial class Mapper StringValue = ((global::ASubType2)x).StringValue, } : default) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumFromString#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumFromString#Mapper.g.verified.cs index 69dfb0be81..342c30d91c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumFromString#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumFromString#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = global::System.Enum.Parse(x.Value, false), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToAnotherEnum#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToAnotherEnum#Mapper.g.verified.cs index b80c1a1866..5484988074 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToAnotherEnum#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToAnotherEnum#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = (global::D)x.Value, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToString#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToString#Mapper.g.verified.cs index 747a9b829e..37d782ac4b 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToString#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumTest.EnumToString#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = (string)x.Value.ToString(), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ArrayToArrayExplicitCast#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ArrayToArrayExplicitCast#Mapper.g.verified.cs index 992f111fdd..692e49a503 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ArrayToArrayExplicitCast#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ArrayToArrayExplicitCast#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Values = global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(x.Values, x1 => (int)x1)), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ExplicitCast#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ExplicitCast#Mapper.g.verified.cs index 4975bc5942..47a00872e0 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ExplicitCast#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionEnumerableTest.ExplicitCast#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Values = global::System.Linq.Enumerable.Select(x.Values, x1 => (int)x1), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreDisabledNullableContextShouldMatchEnabled#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreDisabledNullableContextShouldMatchEnabled#Mapper.g.verified.cs index ea06718d01..4e9cf60662 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreDisabledNullableContextShouldMatchEnabled#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreDisabledNullableContextShouldMatchEnabled#Mapper.g.verified.cs @@ -9,7 +9,7 @@ public partial class Mapper { if (source == null) return default; -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -17,6 +17,6 @@ public partial class Mapper Name = x.Name, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldNotRequireParameterlessCtorForNullableNavigation#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldNotRequireParameterlessCtorForNullableNavigation#Mapper.g.verified.cs index 031eca90ca..9ddd53659d 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldNotRequireParameterlessCtorForNullableNavigation#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldNotRequireParameterlessCtorForNullableNavigation#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Nested = new global::D(x.Nested.Id), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectDeeplyNestedNullablePathDirectly#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectDeeplyNestedNullablePathDirectly#Mapper.g.verified.cs index 8dbfb7844a..fb58ae1dbf 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectDeeplyNestedNullablePathDirectly#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectDeeplyNestedNullablePathDirectly#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper OwnerAddressCity = x.Owner.Address.City, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectNullableCollectionMember#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectNullableCollectionMember#Mapper.g.verified.cs index 72a1afd930..8314cb7001 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectNullableCollectionMember#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldProjectNullableCollectionMember#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -22,6 +22,6 @@ public partial class Mapper ), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldSkipNullHandlingForNullableCollectionElement#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldSkipNullHandlingForNullableCollectionElement#Mapper.g.verified.cs index 72a1afd930..8314cb7001 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldSkipNullHandlingForNullableCollectionElement#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullHandlingTest.IgnoreShouldSkipNullHandlingForNullableCollectionElement#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -22,6 +22,6 @@ public partial class Mapper ), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs index 6e56243cb7..206d6f5da5 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassMemberMappingDisabledNullableContext#Mapper.g.verified.cs @@ -9,7 +9,7 @@ public partial class Mapper { if (q == null) return default; -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -17,7 +17,7 @@ public partial class Mapper OtherValue = x.Value, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetProperty#Mapper.g.verified.cs index ca7551069d..d15bc6e562 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper StringValue = x.StringValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetPropertyWithNoNullAssignmentAndThrowShouldBeIgnored#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetPropertyWithNoNullAssignmentAndThrowShouldBeIgnored#Mapper.g.verified.cs index ca7551069d..d15bc6e562 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetPropertyWithNoNullAssignmentAndThrowShouldBeIgnored#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetPropertyWithNoNullAssignmentAndThrowShouldBeIgnored#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper StringValue = x.StringValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetValueTypeProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetValueTypeProperty#Mapper.g.verified.cs index 396e8e511a..01f5b6c27f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetValueTypeProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceAndTargetValueTypeProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper IntValue = x.IntValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten#Mapper.g.verified.cs index 5d8d403967..a75b69a087 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlatten#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper NestedValue = x.Nested != null ? x.Nested.Value : default, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString#Mapper.g.verified.cs index b49f0bb7e0..827597482c 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathAutoFlattenString#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper NestedValue = x.Nested != null ? x.Nested.Value : "", } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten#Mapper.g.verified.cs index 9031e32348..5ea3647b86 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourcePathManuallyFlatten#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -14,7 +14,7 @@ public partial class Mapper NestedValue4 = x.Nested != null && x.Nested.Nested2 != null ? x.Nested.Nested2.Value3 : default, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty#Mapper.g.verified.cs index 8c6a4abe43..b0249aad55 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper StringValue = x.StringValue ?? "", } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty#Mapper.g.verified.cs index 054c9b955b..5fd0586202 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableSourceValueTypeProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper IntValue = x.IntValue ?? default, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetProperty#Mapper.g.verified.cs index ca7551069d..d15bc6e562 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper StringValue = x.StringValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetValueTypeProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetValueTypeProperty#Mapper.g.verified.cs index 396e8e511a..01f5b6c27f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetValueTypeProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToClassNullableTargetValueTypeProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper IntValue = x.IntValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToRecordNoAccessibleSourceCtorShouldNotDiagnostic#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToRecordNoAccessibleSourceCtorShouldNotDiagnostic#Mapper.g.verified.cs index 192f5d829d..a837ed3c47 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToRecordNoAccessibleSourceCtorShouldNotDiagnostic#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.ClassToRecordNoAccessibleSourceCtorShouldNotDiagnostic#Mapper.g.verified.cs @@ -6,8 +6,8 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Value)); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.NestedPropertyWithDeepCloneable#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.NestedPropertyWithDeepCloneable#Mapper.g.verified.cs index 79fcb4e556..5e582cf7b5 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.NestedPropertyWithDeepCloneable#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.NestedPropertyWithDeepCloneable#Mapper.g.verified.cs @@ -9,7 +9,7 @@ public partial class Mapper { if (source == null) return default; -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -18,7 +18,7 @@ public partial class Mapper Value = x.Nested != null && x.Nested.Value != null ? x.Nested.Value : default, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToClassDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToClassDisabledNullableContext#Mapper.g.verified.cs index 12dc8388b3..e0c7b18f59 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToClassDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToClassDisabledNullableContext#Mapper.g.verified.cs @@ -9,8 +9,8 @@ public partial class Mapper { if (source == null) return default; -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Value)); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs index a44b83c87c..f00c303ff6 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionNullableTest.RecordToRecordMemberMappingDisabledNullableContext#Mapper.g.verified.cs @@ -9,9 +9,9 @@ public partial class Mapper { if (q == null) return default; -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(q, x => new global::B(x.Value)); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClass#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClass#Mapper.g.verified.cs index ca7551069d..d15bc6e562 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClass#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClass#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper StringValue = x.StringValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassMultipleProperties#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassMultipleProperties#Mapper.g.verified.cs index ac429bfd11..b0960b2def 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassMultipleProperties#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassMultipleProperties#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -16,6 +16,6 @@ public partial class Mapper CharValue = x.CharValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNested#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNested#Mapper.g.verified.cs index f1cfdfe845..f14f9087e4 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNested#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNested#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -18,6 +18,6 @@ public partial class Mapper }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs index dde77a18c7..127f0ad239 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassNestedMemberAttribute#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,7 +14,7 @@ public partial class Mapper Id = x.Value.Id, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithAdditionalParameter#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithAdditionalParameter#Mapper.g.verified.cs index 48ee867058..b6d66a4bf1 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithAdditionalParameter#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithAdditionalParameter#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source, int currentUserId) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper CurrentUserId = currentUserId, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithConfigs#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithConfigs#Mapper.g.verified.cs index 0a81482d09..6ce699548e 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithConfigs#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ClassToClassWithConfigs#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -22,7 +22,7 @@ public partial class Mapper }, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs index e3e7726d07..09b026640a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorShouldSkipUnmatchedOptionalParameters#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B(x.StringValue) @@ -14,6 +14,6 @@ public partial class Mapper IntValue = x.IntValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic#Mapper.g.verified.cs index f86cdeeb5c..d4a8a0eadc 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.CtorWithPathMappingShouldDiagnostic#Mapper.g.verified.cs @@ -6,9 +6,9 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(x.Value1, x.ValueC)); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionShouldPickUpConfigFromElementMappingWithAdditionalParams#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionShouldPickUpConfigFromElementMappingWithAdditionalParams#Mapper.g.verified.cs index 30f2ea1ab2..b01a4c768d 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionShouldPickUpConfigFromElementMappingWithAdditionalParams#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionShouldPickUpConfigFromElementMappingWithAdditionalParams#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source, int currentUserId) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,7 +15,7 @@ public partial class Mapper IsLiked = global::System.Linq.Enumerable.Any(x.Likes, l => l.UserId == currentUserId), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithNestedUserMappingWithAdditionalParams#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithNestedUserMappingWithAdditionalParams#Mapper.g.verified.cs index fb5fdc1abd..8c1af8ddd0 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithNestedUserMappingWithAdditionalParams#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithNestedUserMappingWithAdditionalParams#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source, int currentUserId) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper Nested = new global::BNested { Value = x.Nested.Value, UserId = currentUserId }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithUserImplementedMethodWithAdditionalParams#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithUserImplementedMethodWithAdditionalParams#Mapper.g.verified.cs index afebfeeb64..96d4b26cba 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithUserImplementedMethodWithAdditionalParams#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ProjectionWithUserImplementedMethodWithAdditionalParams#Mapper.g.verified.cs @@ -6,11 +6,11 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source, int currentUserId) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B { Name = x.Name, CurrentUserId = currentUserId } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.QueryablePropertyWithStringFormat#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.QueryablePropertyWithStringFormat#Mapper.g.verified.cs index 5504fcdde2..f70a8ae268 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.QueryablePropertyWithStringFormat#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.QueryablePropertyWithStringFormat#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,7 +14,7 @@ public partial class Mapper Value = x.Value.ToString("C"), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs index 89bc908f45..70cd77e264 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualFlatteningInsideList#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B( @@ -14,6 +14,6 @@ public partial class Mapper global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(x.Values, x1 => x1.Value)) ) ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualListMapping#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualListMapping#Mapper.g.verified.cs index 96bc19e490..2fcc353bf3 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualListMapping#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualListMapping#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B( @@ -14,6 +14,6 @@ public partial class Mapper global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.OrderBy(global::System.Linq.Enumerable.Select(x.Values, x1 => x1.Value), x1 => x1)) ) ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualMappingWithGlobalTypeArgsInInliningMappingMethod#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualMappingWithGlobalTypeArgsInInliningMappingMethod#Mapper.g.verified.cs index cf7fbb13b9..03e399bd2a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualMappingWithGlobalTypeArgsInInliningMappingMethod#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.RecordToRecordManualMappingWithGlobalTypeArgsInInliningMappingMethod#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable ProjectAToB(global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::B( @@ -14,6 +14,6 @@ public partial class Mapper x.ChangedOn != global::System.DateTime.MinValue ? new global::System.DateTimeOffset(global::System.DateTime.SpecifyKind(x.ChangedOn, global::System.DateTimeKind.Utc)) : global::System.DateTimeOffset.MinValue ) ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor#Mapper.g.verified.cs index 0df9ed34b0..ffae0a84ab 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopCtor#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B( @@ -19,6 +19,6 @@ public partial class Mapper IntValue = x.IntValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty#Mapper.g.verified.cs index 5af49ec718..aacf5013d7 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.ReferenceLoopInitProperty#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -18,6 +18,6 @@ public partial class Mapper IntValue = x.IntValue, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.TopLevelUserImplemented#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.TopLevelUserImplemented#Mapper.g.verified.cs index 5c9a7725b9..057743bff9 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.TopLevelUserImplemented#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionTest.TopLevelUserImplemented#Mapper.g.verified.cs @@ -6,8 +6,8 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::B(10) { Value2 = 11, Value3 = "foo bar" }); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedProperties#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedProperties#Mapper.g.verified.cs index bfc3933e0b..bcc0e91fe6 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedProperties#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedProperties#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -16,7 +16,7 @@ public partial class Mapper StringValue2 = x.StringValue2 + "-modified2", } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs index bfc3933e0b..bcc0e91fe6 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -16,7 +16,7 @@ public partial class Mapper StringValue2 = x.StringValue2 + "-modified2", } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithExplicitlyImplementedSupertypeParameter#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithExplicitlyImplementedSupertypeParameter#Mapper.g.verified.cs index 39dbd2395a..cdf10ef7b3 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithExplicitlyImplementedSupertypeParameter#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithExplicitlyImplementedSupertypeParameter#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::Target() @@ -15,7 +15,7 @@ public partial class Mapper Result = ((global::IBase)x).Value, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithSupertypeParameter#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithSupertypeParameter#Mapper.g.verified.cs index 39dbd2395a..cdf10ef7b3 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithSupertypeParameter#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedMappingWithSupertypeParameter#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::Target() @@ -15,7 +15,7 @@ public partial class Mapper Result = ((global::IBase)x).Value, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedProperties#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedProperties#Mapper.g.verified.cs index f3287c5db6..214469e0c7 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedProperties#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedProperties#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -16,7 +16,7 @@ public partial class Mapper ValueDefault = new global::D(x.ValueDefault.Value.ToString("N")), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs index f3287c5db6..214469e0c7 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.ShouldUseReferencedUserDefinedMappingOnSelectedPropertiesWithDisabledAutoUserMappings#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -16,7 +16,7 @@ public partial class Mapper ValueDefault = new global::D(x.ValueDefault.Value.ToString("N")), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName#Mapper.g.verified.cs index 686eb17947..2726235129 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUseNamedMappingTest.TwoQueryableMappingsWithNamedUsedMappingsAndAmbiguousName#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B( @@ -15,13 +15,13 @@ public partial class Mapper x.StringValue2 + "-modified2" ) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::D( @@ -30,7 +30,7 @@ public partial class Mapper x.StringValue2 + "-modified2" ) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedExpression#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedExpression#Mapper.g.verified.cs index 60a1a6c1d0..9b8ce14f22 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedExpression#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedExpression#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValue = new global::D { Value = x.NestedValue.Value + "-mapped" }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleDeclaration#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleDeclaration#Mapper.g.verified.cs index 60a1a6c1d0..9b8ce14f22 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleDeclaration#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleDeclaration#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValue = new global::D { Value = x.NestedValue.Value + "-mapped" }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleStatement#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleStatement#Mapper.g.verified.cs index 60a1a6c1d0..9b8ce14f22 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleStatement#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassInlinedSingleStatement#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValue = new global::D { Value = x.NestedValue.Value + "-mapped" }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod#Mapper.g.verified.cs index 1f139d2b9e..d08db9f8cf 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassNonInlinedMethod#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValue = MapToD(x.NestedValue), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedLambdaWithExplicitReturnType#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedLambdaWithExplicitReturnType#Mapper.g.verified.cs index 0af4297683..45be7f56e5 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedLambdaWithExplicitReturnType#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedLambdaWithExplicitReturnType#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper Created = global::System.Linq.Enumerable.Max(global::System.Linq.Enumerable.Select(x.Created, global::System.DateTime? (x1) => x1.DateCreated)), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrdering#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrdering#Mapper.g.verified.cs index 5ce6a249ec..c224a82423 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrdering#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrdering#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValues = global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.OrderBy(x.NestedValues, x1 => x1.Value)), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithMappingAndParameterHiding#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithMappingAndParameterHiding#Mapper.g.verified.cs index 9c6768a1ee..6cb380b688 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithMappingAndParameterHiding#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithMappingAndParameterHiding#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -18,7 +18,7 @@ public partial class Mapper })), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithTwoNestedMappings#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithTwoNestedMappings#Mapper.g.verified.cs index 382c7cf22d..565287ad93 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithTwoNestedMappings#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedOrderingWithTwoNestedMappings#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -18,7 +18,7 @@ public partial class Mapper })), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedParenthesizedLambdaOrdering#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedParenthesizedLambdaOrdering#Mapper.g.verified.cs index 15ce4a7adf..a02540411a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedParenthesizedLambdaOrdering#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedParenthesizedLambdaOrdering#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -15,6 +15,6 @@ public partial class Mapper NestedValues = global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.OrderBy(x.NestedValues, (x1) => x1.Value)), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNew#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNew#Mapper.g.verified.cs index dc8162fa92..63d9692853 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNew#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNew#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = new global::System.DateTimeOffset(x.Value, global::System.TimeSpan.Zero), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNewInitializer#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNewInitializer#Mapper.g.verified.cs index ddd73fecb0..da8c1313f5 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNewInitializer#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithTargetTypeNewInitializer#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = new global::C(1) { Value2 = 10 }, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithUsingMappings#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithUsingMappings#Mapper.g.verified.cs index dc8162fa92..63d9692853 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithUsingMappings#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.ClassToClassUserImplementedWithUsingMappings#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Value = new global::System.DateTimeOffset(x.Value, global::System.TimeSpan.Zero), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullable#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullable#Mapper.g.verified.cs index 8e6082a90a..3a619b6924 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullable#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullable#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable Map(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::B() @@ -14,7 +14,7 @@ public partial class Mapper Value = x.Value ?? 1, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullableMemberTypeMismatch#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullableMemberTypeMismatch#Mapper.g.verified.cs index ce6b001c21..7e5af4077d 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullableMemberTypeMismatch#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedAttributedNullableValueTypeToNullableMemberTypeMismatch#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable Map(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::B() @@ -14,7 +14,7 @@ public partial class Mapper Value = (decimal?)x.Value ?? 1, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedFlatteningWithCallToAnotherMapping#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedFlatteningWithCallToAnotherMapping#Mapper.g.verified.cs index d961cb1d39..48ac6f9314 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedFlatteningWithCallToAnotherMapping#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedFlatteningWithCallToAnotherMapping#Mapper.g.verified.cs @@ -6,9 +6,9 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(source, x => new global::D(new global::E(x.Value.Child.Name))); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedInExtensionBlockShouldWork#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedInExtensionBlockShouldWork#Mapper.g.verified.cs index 47e8d6a6dc..b2f011916f 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedInExtensionBlockShouldWork#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedInExtensionBlockShouldWork#Mapper.g.verified.cs @@ -14,7 +14,7 @@ partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] internal partial global::System.Linq.IQueryable ProjectToDto(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::MyEntityDto() @@ -22,6 +22,6 @@ partial class Mapper Id = global::Extensions.WithOneAdded(x.Id), } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedNullableValueTypeToNonNullable#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedNullableValueTypeToNonNullable#Mapper.g.verified.cs index 29ab8a5b24..74c4c0cd18 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedNullableValueTypeToNonNullable#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedNullableValueTypeToNonNullable#Mapper.g.verified.cs @@ -6,8 +6,8 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable Map(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select(query, x => new global::B(x.Value ?? 0)); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedTwoNestedProjectionsShouldReuseInlinedMapping#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedTwoNestedProjectionsShouldReuseInlinedMapping#Mapper.g.verified.cs index 981b73bfdc..9bd3810154 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedTwoNestedProjectionsShouldReuseInlinedMapping#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedTwoNestedProjectionsShouldReuseInlinedMapping#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public static partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::VendorResponse() @@ -19,13 +19,13 @@ public static partial class Mapper })), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::ScopeResponse() @@ -38,7 +38,7 @@ public static partial class Mapper })), } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithLambdaParameterNameConflict#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithLambdaParameterNameConflict#Mapper.g.verified.cs index 5013edad53..e3741dac31 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithLambdaParameterNameConflict#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithLambdaParameterNameConflict#Mapper.g.verified.cs @@ -6,14 +6,14 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::BlogDto( global::System.Linq.Enumerable.Count(x.Posts, x1 => x1.Id == x.Posts.Count) ) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithMultipleLambdaParameterNameConflicts#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithMultipleLambdaParameterNameConflicts#Mapper.g.verified.cs index 764dca3b50..461489aa41 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithMultipleLambdaParameterNameConflicts#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithMultipleLambdaParameterNameConflicts#Mapper.g.verified.cs @@ -6,14 +6,14 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToDto(this global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::BlogDto( global::System.Linq.Enumerable.Count(global::System.Linq.Enumerable.Where(x.Posts, x1 => x1.Id > 0), x1 => x1.Id == x.Posts.Count) ) ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithParenthesizedLambdaParameterNameConflict#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithParenthesizedLambdaParameterNameConflict#Mapper.g.verified.cs index 067e7dae63..2b9eac751a 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithParenthesizedLambdaParameterNameConflict#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/QueryableProjectionUserImplementedTest.UserImplementedWithParenthesizedLambdaParameterNameConflict#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable Map(global::System.Linq.IQueryable source) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( source, x => new global::B() @@ -14,6 +14,6 @@ public partial class Mapper Nested = new global::D { Value = global::System.Linq.Enumerable.FirstOrDefault(global::System.Linq.Enumerable.Select(x.Nested.Items, (x1, i) => x1 + i))}, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/RuntimeTargetTypeMappingTest.WithGenericSourceAndTarget#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/RuntimeTargetTypeMappingTest.WithGenericSourceAndTarget#Mapper.g.verified.cs index dea5796ff9..0651a5b772 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/RuntimeTargetTypeMappingTest.WithGenericSourceAndTarget#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/RuntimeTargetTypeMappingTest.WithGenericSourceAndTarget#Mapper.g.verified.cs @@ -17,7 +17,7 @@ public partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable ProjectToB(global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::B() @@ -25,13 +25,13 @@ public partial class Mapper Value = x.Value, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] private partial global::System.Linq.IQueryable ProjectToD(global::System.Linq.IQueryable q) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( q, x => new global::D() @@ -39,6 +39,6 @@ public partial class Mapper Value2 = x.Value2, } ); -#nullable enable +#nullable enable warnings } } \ No newline at end of file diff --git a/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#Mapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#Mapper.g.verified.cs index 84b2e659b8..ce6e700018 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#Mapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#Mapper.g.verified.cs @@ -6,7 +6,7 @@ public static partial class Mapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToCarDto(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::CarDto() @@ -20,7 +20,7 @@ public static partial class Mapper }, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] diff --git a/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#OtherMapper.g.verified.cs b/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#OtherMapper.g.verified.cs index 30d8f05e29..2f468480ae 100644 --- a/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#OtherMapper.g.verified.cs +++ b/test/Riok.Mapperly.Tests/_snapshots/UseStaticMapperTest.ProjectionWithUseStaticMapperShouldInlineGenerator#OtherMapper.g.verified.cs @@ -6,7 +6,7 @@ public static partial class OtherMapper [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] public static partial global::System.Linq.IQueryable ProjectToMakerDto(this global::System.Linq.IQueryable query) { -#nullable disable +#nullable disable warnings return global::System.Linq.Queryable.Select( query, x => new global::MakerDto() @@ -15,7 +15,7 @@ public static partial class OtherMapper MakerName = x.Name, } ); -#nullable enable +#nullable enable warnings } [global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")]