Generate EditorBrowsable attributes

This commit is contained in:
Koen
2022-10-11 14:48:54 +01:00
parent 0ccd2294f8
commit d289ad47a7
58 changed files with 50 additions and 63 deletions

View File

@@ -4,7 +4,6 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<NoWarn>CS1591</NoWarn>
</PropertyGroup>

View File

@@ -135,6 +135,7 @@ namespace EntityFrameworkCore.Projectables.Generator
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class {generatedClassName}
{{
public static System.Linq.Expressions.Expression<System.Func<{lambdaTypeArguments.Arguments}, {projectable.ReturnTypeName}>> Expression{(projectable.TypeParameterList?.Parameters.Any() == true ? projectable.TypeParameterList.ToString() : string.Empty)}()");

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -5,6 +5,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_Derived_Bar
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.Derived, string>> Expression()

View File

@@ -5,6 +5,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_Derived_Bar
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.Derived, string>> Expression()

View File

@@ -5,6 +5,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_Derived_Bar
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.Derived, string>> Expression()

View File

@@ -5,6 +5,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_Derived_Bar
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.Derived, string>> Expression()

View File

@@ -5,6 +5,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_SomeExtensions_AsSomeResult
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.SomeEntity, string>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()

View File

@@ -1,19 +0,0 @@
// <auto-generated/>
using System;
using System.Linq;
using System.Collections.Generic;
using EntityFrameworkCore.Projectables;
using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()
{
return (global::Foo.Foo @this) =>
@this.Id + global::Foo.Constants.Bar;
}
}
}

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_Entity_Something
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.EntityExtensions.Entity, global::Foo.EntityExtensions.Entity>> Expression()

View File

@@ -4,6 +4,7 @@ using EntityFrameworkCore.Projectables;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class _SomeExtensions_Test
{
public static System.Linq.Expressions.Expression<System.Func<global::SomeFlag, bool>> Expression()

View File

@@ -1,15 +0,0 @@
using System;
using System.Linq;
using System.Collections.Generic;
using EntityFrameworkCore.Projectables;
using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
public static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls
{
public static System.Linq.Expressions.Expression<System.Func<Entity, global::Foo.EntityExtensions.Entity>> Expression =>
(Entity entity) => entity != null ? (entity.RelatedEntities != null ? (entity.RelatedEntities[0]) : null) : null;
}
}

View File

@@ -6,6 +6,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_SomeEntity_FooOrBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.SomeEntity, string>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_EnforceString
{
public static System.Linq.Expressions.Expression<System.Func<T, string>> Expression<T>()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_NextFoo
{
public static System.Linq.Expressions.Expression<System.Func<List<object> ,List<int?>, List<object>>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Bar_ProjectedId
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Bar, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_A_IsB
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.A, bool>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_Entity_Something
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.EntityExtensions.Entity, global::Foo.EntityExtensions.Entity>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Projectables.Repro;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Projectables_Repro_SomeEntity_RootChildren
{
public static System.Linq.Expressions.Expression<System.Func<global::Projectables.Repro.SomeEntity, ICollection<global::Projectables.Repro.SomeEntity>>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.EntityExtensions.Entity, global::Foo.EntityExtensions.Entity>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_GetFirstRelatedIgnoreNulls
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.EntityExtensions.Entity, global::Foo.EntityExtensions.Entity>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, string>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, string>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetLength
{
public static System.Linq.Expressions.Expression<System.Func<string, int?>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetLength
{
public static System.Linq.Expressions.Expression<System.Func<string, int?>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_EntityExtensions_GetFirstName
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.EntityExtensions.Entity, string>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_NullableReferenceType
{
public static System.Linq.Expressions.Expression<System.Func<object, string>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_NextFoo
{
public static System.Linq.Expressions.Expression<System.Func<object ,int?, object>> Expression()

View File

@@ -1,14 +0,0 @@
using System;
using System.Linq;
using EntityFrameworkCore.Projectables;
using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, char?>> Expression =>
(string input) => input != null ? (input[0]) : null;
}
}

View File

@@ -1,14 +0,0 @@
using System;
using System.Linq;
using EntityFrameworkCore.Projectables;
using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, char?>> Expression =>
(string input) => input[0];
}
}

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, char?>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_GetFirst
{
public static System.Linq.Expressions.Expression<System.Func<string, char?>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_NullableValueType
{
public static System.Linq.Expressions.Expression<System.Func<object, int?>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C ,int ,string ,object, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C ,int, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.D, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<int, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo1
{
public static System.Linq.Expressions.Expression<System.Func<int, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo1
{
public static System.Linq.Expressions.Expression<System.Func<object, object>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, global::Foo.D>> Expression()

View File

@@ -8,6 +8,7 @@ using Foos;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foos_Bar_FooId
{
public static System.Linq.Expressions.Expression<System.Func<global::Foos.Bar, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_D_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C.D, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -6,6 +6,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()

View File

@@ -8,6 +8,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_Foo_IdWithBar
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.Foo, int>> Expression()

View File

@@ -7,6 +7,7 @@ using Foo;
namespace EntityFrameworkCore.Projectables.Generated
#nullable disable
{
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public static class Foo_C_Foo
{
public static System.Linq.Expressions.Expression<System.Func<global::Foo.C, int>> Expression()