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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<IsRoslynComponent>true</IsRoslynComponent>
<IsPackable>true</IsPackable>
<PackageOutputPath>./nupkg</PackageOutputPath>
<VersionPrefix>0.28.0</VersionPrefix>
<VersionPrefix>0.28.1</VersionPrefix>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<NoWarn>$(NoWarn);NU5128</NoWarn>
</PropertyGroup>
Expand Down
47 changes: 29 additions & 18 deletions src/N.SourceGenerators.UnionTypes/UnionTypesGenerator.Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ public partial class UnionTypesGenerator
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;
using CallerLineNumber = System.Runtime.CompilerServices.CallerLineNumberAttribute;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class UnionTypeAttribute : Attribute
{
Expand Down Expand Up @@ -60,12 +63,13 @@ public UnionTypeAttribute(Type type, string alias = null, [CallerLineNumber] int
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class GenericUnionTypeAttribute : Attribute
{
Expand All @@ -87,12 +91,13 @@ internal sealed class GenericUnionTypeAttribute : Attribute
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class JsonPolymorphicUnionAttribute : Attribute
{
Expand All @@ -110,12 +115,14 @@ internal sealed class JsonPolymorphicUnionAttribute : Attribute
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterFromAttribute : Attribute
{
Expand All @@ -134,12 +141,14 @@ public UnionConverterFromAttribute(Type fromType)
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterToAttribute : Attribute
{
Expand All @@ -157,12 +166,14 @@ public UnionConverterToAttribute(Type toType)
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class GenericUnionTypeAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class JsonPolymorphicUnionAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterFromAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterToAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;
using CallerLineNumber = System.Runtime.CompilerServices.CallerLineNumberAttribute;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class UnionTypeAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class GenericUnionTypeAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class JsonPolymorphicUnionAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterFromAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterToAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;
using CallerLineNumber = System.Runtime.CompilerServices.CallerLineNumberAttribute;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class UnionTypeAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.GenericParameter, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class GenericUnionTypeAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
internal sealed class JsonPolymorphicUnionAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterAttribute : Attribute
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#if NETCOREAPP3_1_OR_GREATER
#nullable enable
#endif
using System;
using System.Runtime.CompilerServices;
using Attribute = global::System.Attribute;
using AttributeUsageAttribute = global::System.AttributeUsageAttribute;
using AttributeTargets = global::System.AttributeTargets;
using Type = global::System.Type;

namespace N.SourceGenerators.UnionTypes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = true)]
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
sealed class UnionConverterFromAttribute : Attribute
{
Expand Down
Loading
Loading