diff --git a/src/StronglyTypedIds.Attributes/StronglyTypedIdConverter.cs b/src/StronglyTypedIds.Attributes/StronglyTypedIdConverter.cs
index 4dad18ae1..a74f243e5 100644
--- a/src/StronglyTypedIds.Attributes/StronglyTypedIdConverter.cs
+++ b/src/StronglyTypedIds.Attributes/StronglyTypedIdConverter.cs
@@ -52,5 +52,10 @@ public enum StronglyTypedIdConverter
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
-}
\ No newline at end of file
+}
diff --git a/src/StronglyTypedIds/EmbeddedSources.cs b/src/StronglyTypedIds/EmbeddedSources.cs
index acaade238..3640444a8 100644
--- a/src/StronglyTypedIds/EmbeddedSources.cs
+++ b/src/StronglyTypedIds/EmbeddedSources.cs
@@ -29,6 +29,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.Guid.Guid_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Guid.Guid_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Guid.Guid_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.Guid.Guid_AutoMapperTypeConverter.cs"),
false
);
@@ -45,6 +46,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.Int.Int_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Int.Int_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Int.Int_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.Int.Int_AutoMapperTypeConverter.cs"),
false
);
@@ -61,6 +63,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.Long.Long_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Long.Long_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.Long.Long_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.Long.Long_AutoMapperTypeConverter.cs"),
false
);
@@ -77,6 +80,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.String.String_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.String.String_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.String.String_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.String.String_AutoMapperTypeConverter.cs"),
false
);
@@ -93,6 +97,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.NullableString.NullableString_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.NullableString.NullableString_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.NullableString.NullableString_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.NullableString.NullableString_AutoMapperTypeConverter.cs"),
true
);
@@ -109,6 +114,7 @@ internal static class EmbeddedSources
LoadEmbeddedResource("StronglyTypedIds.Templates.NewId.NewId_Convertible.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.NewId.NewId_StronglyTypedId.cs"),
LoadEmbeddedResource("StronglyTypedIds.Templates.NewId.NewId_SwaggerSchemaFilter.cs"),
+ LoadEmbeddedResource("StronglyTypedIds.Templates.NewId.NewId_AutoMapperTypeConverter.cs"),
false
);
@@ -142,6 +148,7 @@ public readonly struct ResourceCollection
public string TypeConverter { get; }
public string EfCoreValueConverter { get; }
public string DapperTypeHandler { get; }
+ public string AutoMapperTypeHandler { get; }
public string Comparable { get; }
public string Parsable { get; }
public string Convertible { get; }
@@ -161,6 +168,7 @@ public ResourceCollection(
string convertible,
string stronglyTypedId,
string swaggerSchemaFilter,
+ string autoMapperTypeHandler,
bool nullableEnable)
{
SwaggerSchemaFilter = swaggerSchemaFilter;
@@ -170,6 +178,7 @@ public ResourceCollection(
TypeConverter = typeConverter;
EfCoreValueConverter = efCoreValueConverter;
DapperTypeHandler = dapperTypeHandler;
+ AutoMapperTypeHandler = autoMapperTypeHandler;
Comparable = comparable;
Parsable = parsable;
Convertible = convertible;
diff --git a/src/StronglyTypedIds/SourceGenerationHelper.cs b/src/StronglyTypedIds/SourceGenerationHelper.cs
index e9474f5d6..8702cb641 100644
--- a/src/StronglyTypedIds/SourceGenerationHelper.cs
+++ b/src/StronglyTypedIds/SourceGenerationHelper.cs
@@ -71,6 +71,7 @@ static string CreateId(
var useSystemTextJson = converters.IsSet(StronglyTypedIdConverter.SystemTextJson);
var useEfCoreValueConverter = converters.IsSet(StronglyTypedIdConverter.EfCoreValueConverter);
var useDapperTypeHandler = converters.IsSet(StronglyTypedIdConverter.DapperTypeHandler);
+ var useAutoMapperTypeHandler = converters.IsSet(StronglyTypedIdConverter.AutoMapper);
var useIEquatable = implementations.IsSet(StronglyTypedIdImplementations.IEquatable);
var useIComparable = implementations.IsSet(StronglyTypedIdImplementations.IComparable);
@@ -168,6 +169,11 @@ static string CreateId(
sb.AppendLine(resources.DapperTypeHandler);
}
+ if (useAutoMapperTypeHandler)
+ {
+ sb.AppendLine(resources.AutoMapperTypeHandler);
+ }
+
if (useTypeConverter)
{
sb.AppendLine(resources.TypeConverter);
diff --git a/src/StronglyTypedIds/Templates/Guid/Guid_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/Guid/Guid_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..cee88d0c7
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/Guid/Guid_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(TESTID source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/src/StronglyTypedIds/Templates/Int/Int_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/Int/Int_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..e0f0252fc
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/Int/Int_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(TESTID source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/src/StronglyTypedIds/Templates/Long/Long_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/Long/Long_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..95a57ec36
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/Long/Long_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(TESTID source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/src/StronglyTypedIds/Templates/NewId/NewId_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/NewId/NewId_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..c07f72183
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/NewId/NewId_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(TESTID source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/src/StronglyTypedIds/Templates/NullableString/NullableString_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/NullableString/NullableString_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..878af8755
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/NullableString/NullableString_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(TESTID source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/src/StronglyTypedIds/Templates/String/String_AutoMapperTypeConverter.cs b/src/StronglyTypedIds/Templates/String/String_AutoMapperTypeConverter.cs
new file mode 100644
index 000000000..1cee84135
--- /dev/null
+++ b/src/StronglyTypedIds/Templates/String/String_AutoMapperTypeConverter.cs
@@ -0,0 +1,10 @@
+
+#if !FAKE_CODE
+ public class TESTIDAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(TESTID source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
diff --git a/test/StronglyTypedIds.IntegrationTests/AutoMapper.cs b/test/StronglyTypedIds.IntegrationTests/AutoMapper.cs
new file mode 100644
index 000000000..58071d2e6
--- /dev/null
+++ b/test/StronglyTypedIds.IntegrationTests/AutoMapper.cs
@@ -0,0 +1,13 @@
+namespace AutoMapper;
+
+//FAKE STUB
+public interface ITypeConverter
+{
+
+}
+
+//FAKE STUB
+public class ResolutionContext
+{
+
+}
diff --git a/test/StronglyTypedIds.IntegrationTests/StronglyTypedId.cs b/test/StronglyTypedIds.IntegrationTests/StronglyTypedId.cs
index d59f89274..0fc83ff50 100644
--- a/test/StronglyTypedIds.IntegrationTests/StronglyTypedId.cs
+++ b/test/StronglyTypedIds.IntegrationTests/StronglyTypedId.cs
@@ -1,2 +1,3 @@
-public interface IStronglyTypedId {
+//FAKE STUB
+public interface IStronglyTypedId {
}
diff --git a/test/StronglyTypedIds.IntegrationTests/StronglyTypedIds.IntegrationTests.csproj b/test/StronglyTypedIds.IntegrationTests/StronglyTypedIds.IntegrationTests.csproj
index 178bffc70..0efc8da6b 100644
--- a/test/StronglyTypedIds.IntegrationTests/StronglyTypedIds.IntegrationTests.csproj
+++ b/test/StronglyTypedIds.IntegrationTests/StronglyTypedIds.IntegrationTests.csproj
@@ -2,12 +2,20 @@
netcoreapp3.1;net6.0;net7.0
- net48;$(TargetFrameworks)
+ $(TargetFrameworks)
false
disable
true
+
+ TRACE;FAKE_CODE
+
+
+
+ TRACE;FAKE_CODE
+
+
diff --git a/test/StronglyTypedIds.IntegrationTests/Types/LongId.cs b/test/StronglyTypedIds.IntegrationTests/Types/LongId.cs
index 3c24c9944..78cbbb998 100644
--- a/test/StronglyTypedIds.IntegrationTests/Types/LongId.cs
+++ b/test/StronglyTypedIds.IntegrationTests/Types/LongId.cs
@@ -1,4 +1,4 @@
-using StronglyTypedIds;
+using AutoMapper;
namespace StronglyTypedIds.IntegrationTests.Types
{
@@ -42,4 +42,8 @@ public partial struct ComparableLongId { }
[StronglyTypedId(backingType: StronglyTypedIdBackingType.Long, implementations: StronglyTypedIdImplementations.IStronglyTypedId)]
public partial struct StronglyTypedIdLongId { }
+
+
+ [StronglyTypedId(backingType: StronglyTypedIdBackingType.Long, converters : StronglyTypedIdConverter.AutoMapper)]
+ public partial struct AutoMappedLongId { }
}
diff --git a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Core3_1.verified.txt
index f9fffe68a..ac13b4a2e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Core3_1.verified.txt
@@ -65,6 +65,12 @@ namespace StronglyTypedIds
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
}
+
#endif
\ No newline at end of file
diff --git a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet6_0.verified.txt
index f9fffe68a..ac13b4a2e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet6_0.verified.txt
@@ -65,6 +65,12 @@ namespace StronglyTypedIds
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
}
+
#endif
\ No newline at end of file
diff --git a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet7_0.verified.txt
index f9fffe68a..ac13b4a2e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.DotNet7_0.verified.txt
@@ -65,6 +65,12 @@ namespace StronglyTypedIds
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
}
+
#endif
\ No newline at end of file
diff --git a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Net4_8.verified.txt
index f9fffe68a..ac13b4a2e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.Net4_8.verified.txt
@@ -65,6 +65,12 @@ namespace StronglyTypedIds
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
}
+
#endif
\ No newline at end of file
diff --git a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.verified.txt
index f9fffe68a..ac13b4a2e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/EmbeddedResourceTests.EmittedResourceIsSameAsCompiledResource_resource=StronglyTypedIdConverter.verified.txt
@@ -65,6 +65,12 @@ namespace StronglyTypedIds
///
SwaggerSchemaFilter = 64,
+ ///
+ /// Creates a AutoMapper bidirectional converters
+ ///
+ AutoMapper = 128,
+
}
}
+
#endif
\ No newline at end of file
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Core3_1.verified.txt
index 0681b5f46..0b686ba90 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Core3_1.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet6_0.verified.txt
index 0681b5f46..0b686ba90 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet6_0.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet7_0.verified.txt
index 0681b5f46..0b686ba90 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.DotNet7_0.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Net4_8.verified.txt
index 0681b5f46..0b686ba90 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.Net4_8.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.verified.txt
index 0681b5f46..0b686ba90 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Guid.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Core3_1.verified.txt
index 7fa52cd3e..2900062b8 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Core3_1.verified.txt
@@ -191,6 +191,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(MyTestId source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet6_0.verified.txt
index 7fa52cd3e..2900062b8 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet6_0.verified.txt
@@ -191,6 +191,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(MyTestId source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet7_0.verified.txt
index 7fa52cd3e..2900062b8 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.DotNet7_0.verified.txt
@@ -191,6 +191,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(MyTestId source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Net4_8.verified.txt
index 7fa52cd3e..2900062b8 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.Net4_8.verified.txt
@@ -191,6 +191,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(MyTestId source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.verified.txt
index 7fa52cd3e..2900062b8 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Int.verified.txt
@@ -191,6 +191,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public int Convert(MyTestId source, int destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Core3_1.verified.txt
index 69991d2d4..db3a7c5a5 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Core3_1.verified.txt
@@ -193,6 +193,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(MyTestId source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet6_0.verified.txt
index 69991d2d4..db3a7c5a5 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet6_0.verified.txt
@@ -193,6 +193,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(MyTestId source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet7_0.verified.txt
index 69991d2d4..db3a7c5a5 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.DotNet7_0.verified.txt
@@ -193,6 +193,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(MyTestId source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Net4_8.verified.txt
index 69991d2d4..db3a7c5a5 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.Net4_8.verified.txt
@@ -193,6 +193,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(MyTestId source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.verified.txt
index 69991d2d4..db3a7c5a5 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=Long.verified.txt
@@ -193,6 +193,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public long Convert(MyTestId source, long destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Core3_1.verified.txt
index a8fec5626..04c03741d 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Core3_1.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet6_0.verified.txt
index a8fec5626..04c03741d 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet6_0.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet7_0.verified.txt
index a8fec5626..04c03741d 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.DotNet7_0.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Net4_8.verified.txt
index a8fec5626..04c03741d 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.Net4_8.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.verified.txt
index a8fec5626..04c03741d 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=MassTransitNewId.verified.txt
@@ -189,6 +189,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Core3_1.verified.txt
index e49261d9a..d94453889 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Core3_1.verified.txt
@@ -205,6 +205,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(MyTestId source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet6_0.verified.txt
index e49261d9a..d94453889 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet6_0.verified.txt
@@ -205,6 +205,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(MyTestId source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet7_0.verified.txt
index e49261d9a..d94453889 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.DotNet7_0.verified.txt
@@ -205,6 +205,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(MyTestId source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Net4_8.verified.txt
index e49261d9a..d94453889 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.Net4_8.verified.txt
@@ -205,6 +205,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(MyTestId source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.verified.txt
index e49261d9a..d94453889 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=NullableString.verified.txt
@@ -205,6 +205,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string? Convert(MyTestId source, string? destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Core3_1.verified.txt
index e98677e7d..76400993e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Core3_1.verified.txt
@@ -202,6 +202,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet6_0.verified.txt
index e98677e7d..76400993e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet6_0.verified.txt
@@ -202,6 +202,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet7_0.verified.txt
index e98677e7d..76400993e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.DotNet7_0.verified.txt
@@ -202,6 +202,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Net4_8.verified.txt
index e98677e7d..76400993e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.Net4_8.verified.txt
@@ -202,6 +202,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.verified.txt
index e98677e7d..76400993e 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesFullIdCorrectly_type=String.verified.txt
@@ -202,6 +202,17 @@
#pragma warning restore CA2255
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public string Convert(MyTestId source, string destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+
class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
{
public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Core3_1.verified.txt
similarity index 66%
rename from test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Core3_1.verified.txt
rename to test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Core3_1.verified.txt
index 811d2b214..e95957c97 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Core3_1.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Core3_1.verified.txt
@@ -11,14 +11,15 @@
readonly partial struct MyTestId
{
- public int Value { get; }
+ public System.Guid Value { get; }
- public MyTestId(int value)
+ public MyTestId(System.Guid value)
{
Value = value;
}
- public static readonly MyTestId Empty = new MyTestId(0);
+ public static MyTestId New() => new MyTestId(System.Guid.NewGuid());
+ public static readonly MyTestId Empty = new MyTestId(System.Guid.Empty);
public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
public override bool Equals(object obj)
@@ -26,11 +27,20 @@
if (ReferenceEquals(null, obj)) return false;
return obj is MyTestId other && Equals(other);
}
-
public override int GetHashCode() => Value.GetHashCode();
public override string ToString() => Value.ToString();
-
public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
+
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
}
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet6_0.verified.txt
similarity index 66%
rename from test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet6_0.verified.txt
rename to test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet6_0.verified.txt
index 811d2b214..e95957c97 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet6_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet6_0.verified.txt
@@ -11,14 +11,15 @@
readonly partial struct MyTestId
{
- public int Value { get; }
+ public System.Guid Value { get; }
- public MyTestId(int value)
+ public MyTestId(System.Guid value)
{
Value = value;
}
- public static readonly MyTestId Empty = new MyTestId(0);
+ public static MyTestId New() => new MyTestId(System.Guid.NewGuid());
+ public static readonly MyTestId Empty = new MyTestId(System.Guid.Empty);
public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
public override bool Equals(object obj)
@@ -26,11 +27,20 @@
if (ReferenceEquals(null, obj)) return false;
return obj is MyTestId other && Equals(other);
}
-
public override int GetHashCode() => Value.GetHashCode();
public override string ToString() => Value.ToString();
-
public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
+
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
}
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet7_0.verified.txt
similarity index 66%
rename from test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet7_0.verified.txt
rename to test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet7_0.verified.txt
index 811d2b214..e95957c97 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.DotNet7_0.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.DotNet7_0.verified.txt
@@ -11,14 +11,15 @@
readonly partial struct MyTestId
{
- public int Value { get; }
+ public System.Guid Value { get; }
- public MyTestId(int value)
+ public MyTestId(System.Guid value)
{
Value = value;
}
- public static readonly MyTestId Empty = new MyTestId(0);
+ public static MyTestId New() => new MyTestId(System.Guid.NewGuid());
+ public static readonly MyTestId Empty = new MyTestId(System.Guid.Empty);
public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
public override bool Equals(object obj)
@@ -26,11 +27,20 @@
if (ReferenceEquals(null, obj)) return false;
return obj is MyTestId other && Equals(other);
}
-
public override int GetHashCode() => Value.GetHashCode();
public override string ToString() => Value.ToString();
-
public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
+
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
}
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Net4_8.verified.txt
similarity index 66%
rename from test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Net4_8.verified.txt
rename to test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Net4_8.verified.txt
index 811d2b214..e95957c97 100644
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.Net4_8.verified.txt
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.Net4_8.verified.txt
@@ -11,14 +11,15 @@
readonly partial struct MyTestId
{
- public int Value { get; }
+ public System.Guid Value { get; }
- public MyTestId(int value)
+ public MyTestId(System.Guid value)
{
Value = value;
}
- public static readonly MyTestId Empty = new MyTestId(0);
+ public static MyTestId New() => new MyTestId(System.Guid.NewGuid());
+ public static readonly MyTestId Empty = new MyTestId(System.Guid.Empty);
public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
public override bool Equals(object obj)
@@ -26,11 +27,20 @@
if (ReferenceEquals(null, obj)) return false;
return obj is MyTestId other && Equals(other);
}
-
public override int GetHashCode() => Value.GetHashCode();
public override string ToString() => Value.ToString();
-
public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
+
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
}
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.verified.txt
new file mode 100644
index 000000000..e95957c97
--- /dev/null
+++ b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Guid_c=AutoMapper_i=None.verified.txt
@@ -0,0 +1,46 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by the StronglyTypedId source generator
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+#pragma warning disable 1591 // publicly visible type or member must be documented
+
+ readonly partial struct MyTestId
+ {
+ public System.Guid Value { get; }
+
+ public MyTestId(System.Guid value)
+ {
+ Value = value;
+ }
+
+ public static MyTestId New() => new MyTestId(System.Guid.NewGuid());
+ public static readonly MyTestId Empty = new MyTestId(System.Guid.Empty);
+
+ public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ return obj is MyTestId other && Equals(other);
+ }
+ public override int GetHashCode() => Value.GetHashCode();
+
+ public override string ToString() => Value.ToString();
+ public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
+ public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
+
+#if !FAKE_CODE
+ public class MyTestIdAutoMapperTypeConverter : AutoMapper.ITypeConverter
+ {
+ public System.Guid Convert(MyTestId source, System.Guid destination, AutoMapper.ResolutionContext context)
+ {
+ return source.Value;
+ }
+ }
+#endif
+
+ }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Core3_1.verified.txt
deleted file mode 100644
index 1db4e2f7d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int32;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- long longValue when longValue < int.MaxValue => new MyTestId((int)longValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 1db4e2f7d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int32;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- long longValue when longValue < int.MaxValue => new MyTestId((int)longValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 1db4e2f7d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int32;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- long longValue when longValue < int.MaxValue => new MyTestId((int)longValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Net4_8.verified.txt
deleted file mode 100644
index 1db4e2f7d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int32;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- long longValue when longValue < int.MaxValue => new MyTestId((int)longValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.verified.txt
deleted file mode 100644
index 1db4e2f7d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=DapperTypeHandler_i=None.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int32;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- long longValue when longValue < int.MaxValue => new MyTestId((int)longValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 4adca1e99..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 4adca1e99..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 4adca1e99..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 4adca1e99..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.verified.txt
deleted file mode 100644
index 4adca1e99..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=EfCoreValueConverter_i=None.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 32c5a1534..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 32c5a1534..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 32c5a1534..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 32c5a1534..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.verified.txt
deleted file mode 100644
index 32c5a1534..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=NewtonsoftJson_i=None.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Core3_1.verified.txt
deleted file mode 100644
index e862310d1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Core3_1.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet6_0.verified.txt
deleted file mode 100644
index e862310d1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet7_0.verified.txt
deleted file mode 100644
index e862310d1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Net4_8.verified.txt
deleted file mode 100644
index e862310d1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.Net4_8.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.verified.txt
deleted file mode 100644
index e862310d1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IComparable.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Core3_1.verified.txt
deleted file mode 100644
index 8ac0f126d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Core3_1.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet6_0.verified.txt
deleted file mode 100644
index 8ac0f126d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet7_0.verified.txt
deleted file mode 100644
index 8ac0f126d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Net4_8.verified.txt
deleted file mode 100644
index 8ac0f126d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.Net4_8.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.verified.txt
deleted file mode 100644
index 8ac0f126d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IConvertible.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Core3_1.verified.txt
deleted file mode 100644
index 14ad7e432..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Core3_1.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet6_0.verified.txt
deleted file mode 100644
index 14ad7e432..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet7_0.verified.txt
deleted file mode 100644
index 14ad7e432..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Net4_8.verified.txt
deleted file mode 100644
index 14ad7e432..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.Net4_8.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.verified.txt
deleted file mode 100644
index 14ad7e432..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IEquatable.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Core3_1.verified.txt
deleted file mode 100644
index a68ab7e05..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Core3_1.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(int.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- int res = 0;
- var ok = int.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet6_0.verified.txt
deleted file mode 100644
index a68ab7e05..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(int.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- int res = 0;
- var ok = int.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet7_0.verified.txt
deleted file mode 100644
index a68ab7e05..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(int.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- int res = 0;
- var ok = int.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Net4_8.verified.txt
deleted file mode 100644
index a68ab7e05..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.Net4_8.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(int.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- int res = 0;
- var ok = int.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.verified.txt
deleted file mode 100644
index a68ab7e05..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IParsable.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(int.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- int res = 0;
- var ok = int.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Core3_1.verified.txt
deleted file mode 100644
index 5534fcd9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Core3_1.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(int value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
deleted file mode 100644
index 5534fcd9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(int value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
deleted file mode 100644
index 5534fcd9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(int value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Net4_8.verified.txt
deleted file mode 100644
index 5534fcd9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.Net4_8.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(int value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.verified.txt
deleted file mode 100644
index 5534fcd9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=IStronglyTypedId.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(int value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.verified.txt
deleted file mode 100644
index 811d2b214..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=None_i=None.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 20412de25..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int32"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 20412de25..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int32"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 20412de25..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int32"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 20412de25..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int32"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.verified.txt
deleted file mode 100644
index 20412de25..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SwaggerSchemaFilter_i=None.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int32"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 4ace828aa..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt32());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 4ace828aa..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt32());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 4ace828aa..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt32());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 4ace828aa..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt32());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.verified.txt
deleted file mode 100644
index 4ace828aa..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=SystemTextJson_i=None.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt32());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 838e36729..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(int))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 838e36729..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(int))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 838e36729..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(int))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 838e36729..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(int))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.verified.txt
deleted file mode 100644
index 838e36729..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Int_c=TypeConverter_i=None.verified.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public int Value { get; }
-
- public MyTestId(int value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- int intValue => new MyTestId(intValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && int.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(int) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(int))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Core3_1.verified.txt
deleted file mode 100644
index 41d0affde..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int64;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- decimal decimalValue => new MyTestId((long)decimalValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 41d0affde..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int64;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- decimal decimalValue => new MyTestId((long)decimalValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 41d0affde..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int64;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- decimal decimalValue => new MyTestId((long)decimalValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Net4_8.verified.txt
deleted file mode 100644
index 41d0affde..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int64;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- decimal decimalValue => new MyTestId((long)decimalValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.verified.txt
deleted file mode 100644
index 41d0affde..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=DapperTypeHandler_i=None.verified.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.Int64;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- decimal decimalValue => new MyTestId((long)decimalValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 1e0e47efd..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 1e0e47efd..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 1e0e47efd..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 1e0e47efd..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.verified.txt
deleted file mode 100644
index 1e0e47efd..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=EfCoreValueConverter_i=None.verified.txt
+++ /dev/null
@@ -1,47 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 55fa66786..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 55fa66786..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 55fa66786..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 55fa66786..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.verified.txt
deleted file mode 100644
index 55fa66786..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=NewtonsoftJson_i=None.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var result = serializer.Deserialize(reader);
- return result.HasValue ? new MyTestId(result.Value) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Core3_1.verified.txt
deleted file mode 100644
index ae52bbcf6..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Core3_1.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet6_0.verified.txt
deleted file mode 100644
index ae52bbcf6..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet7_0.verified.txt
deleted file mode 100644
index ae52bbcf6..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Net4_8.verified.txt
deleted file mode 100644
index ae52bbcf6..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.Net4_8.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.verified.txt
deleted file mode 100644
index ae52bbcf6..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IComparable.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Core3_1.verified.txt
deleted file mode 100644
index 052a617db..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Core3_1.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet6_0.verified.txt
deleted file mode 100644
index 052a617db..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet7_0.verified.txt
deleted file mode 100644
index 052a617db..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Net4_8.verified.txt
deleted file mode 100644
index 052a617db..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.Net4_8.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.verified.txt
deleted file mode 100644
index 052a617db..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IConvertible.verified.txt
+++ /dev/null
@@ -1,126 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- return Value;
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Core3_1.verified.txt
deleted file mode 100644
index 4c5a32258..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Core3_1.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet6_0.verified.txt
deleted file mode 100644
index 4c5a32258..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet7_0.verified.txt
deleted file mode 100644
index 4c5a32258..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Net4_8.verified.txt
deleted file mode 100644
index 4c5a32258..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.Net4_8.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.verified.txt
deleted file mode 100644
index 4c5a32258..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IEquatable.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Core3_1.verified.txt
deleted file mode 100644
index d08d04159..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Core3_1.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(long.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = long.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet6_0.verified.txt
deleted file mode 100644
index d08d04159..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(long.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = long.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet7_0.verified.txt
deleted file mode 100644
index d08d04159..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(long.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = long.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Net4_8.verified.txt
deleted file mode 100644
index d08d04159..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.Net4_8.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(long.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = long.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.verified.txt
deleted file mode 100644
index d08d04159..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IParsable.verified.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-#nullable enable
- public static MyTestId Parse(string s, System.IFormatProvider? provider)
- {
- return new MyTestId(long.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, System.IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = long.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Core3_1.verified.txt
deleted file mode 100644
index 0fa4e8f58..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Core3_1.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(long value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
deleted file mode 100644
index 0fa4e8f58..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(long value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
deleted file mode 100644
index 0fa4e8f58..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(long value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Net4_8.verified.txt
deleted file mode 100644
index 0fa4e8f58..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.Net4_8.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(long value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.verified.txt
deleted file mode 100644
index 0fa4e8f58..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=IStronglyTypedId.verified.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(long value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Core3_1.verified.txt
deleted file mode 100644
index d661d6022..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index d661d6022..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index d661d6022..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Net4_8.verified.txt
deleted file mode 100644
index d661d6022..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.verified.txt
deleted file mode 100644
index d661d6022..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=None_i=None.verified.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 70d47ef71..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int64"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 70d47ef71..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int64"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 70d47ef71..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int64"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 70d47ef71..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int64"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.verified.txt
deleted file mode 100644
index 70d47ef71..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SwaggerSchemaFilter_i=None.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "integer", Format = "int64"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 3617e5c9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt64());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 3617e5c9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt64());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 3617e5c9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt64());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 3617e5c9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt64());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.verified.txt
deleted file mode 100644
index 3617e5c9f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=SystemTextJson_i=None.verified.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetInt64());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteNumberValue(value.Value);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 052d31953..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(int) || sourceType == typeof(short) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(long))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 052d31953..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(int) || sourceType == typeof(short) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(long))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 052d31953..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(int) || sourceType == typeof(short) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(long))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 052d31953..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(int) || sourceType == typeof(short) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(long))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.verified.txt
deleted file mode 100644
index 052d31953..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=Long_c=TypeConverter_i=None.verified.txt
+++ /dev/null
@@ -1,80 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public long Value { get; }
-
- public MyTestId(long value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(0);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(int) || sourceType == typeof(short) || sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- long longValue => new MyTestId(longValue),
- int intValue => new MyTestId(intValue),
- short shortValue => new MyTestId(shortValue),
- string stringValue when !string.IsNullOrEmpty(stringValue) && long.TryParse(stringValue, out var result) => new MyTestId(result),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(long) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(long))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Core3_1.verified.txt
deleted file mode 100644
index 8a3079836..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value.ToGuid();
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 8a3079836..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value.ToGuid();
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 8a3079836..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value.ToGuid();
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Net4_8.verified.txt
deleted file mode 100644
index 8a3079836..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value.ToGuid();
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.verified.txt
deleted file mode 100644
index 8a3079836..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=DapperTypeHandler_i=None.verified.txt
+++ /dev/null
@@ -1,65 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value.ToGuid();
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 15044ef45..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value.ToGuid(),
- value => new MyTestId(MassTransit.NewId.FromGuid(value)),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 15044ef45..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value.ToGuid(),
- value => new MyTestId(MassTransit.NewId.FromGuid(value)),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 15044ef45..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value.ToGuid(),
- value => new MyTestId(MassTransit.NewId.FromGuid(value)),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 15044ef45..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value.ToGuid(),
- value => new MyTestId(MassTransit.NewId.FromGuid(value)),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.verified.txt
deleted file mode 100644
index 15044ef45..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=EfCoreValueConverter_i=None.verified.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value.ToGuid(),
- value => new MyTestId(MassTransit.NewId.FromGuid(value)),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index c5ea04e4d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value.ToGuid());
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var guid = serializer.Deserialize(reader);
- return guid.HasValue ? new MyTestId(MassTransit.NewId.FromGuid(guid.Value)) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index c5ea04e4d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value.ToGuid());
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var guid = serializer.Deserialize(reader);
- return guid.HasValue ? new MyTestId(MassTransit.NewId.FromGuid(guid.Value)) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index c5ea04e4d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value.ToGuid());
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var guid = serializer.Deserialize(reader);
- return guid.HasValue ? new MyTestId(MassTransit.NewId.FromGuid(guid.Value)) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index c5ea04e4d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value.ToGuid());
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var guid = serializer.Deserialize(reader);
- return guid.HasValue ? new MyTestId(MassTransit.NewId.FromGuid(guid.Value)) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.verified.txt
deleted file mode 100644
index c5ea04e4d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=NewtonsoftJson_i=None.verified.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value.ToGuid());
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- var guid = serializer.Deserialize(reader);
- return guid.HasValue ? new MyTestId(MassTransit.NewId.FromGuid(guid.Value)) : null;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Core3_1.verified.txt
deleted file mode 100644
index dded633b8..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Core3_1.verified.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet6_0.verified.txt
deleted file mode 100644
index dded633b8..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet7_0.verified.txt
deleted file mode 100644
index dded633b8..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Net4_8.verified.txt
deleted file mode 100644
index dded633b8..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.Net4_8.verified.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.verified.txt
deleted file mode 100644
index dded633b8..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IComparable.verified.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other) => Value.CompareTo(other.Value);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Core3_1.verified.txt
deleted file mode 100644
index dc7a58cb1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Core3_1.verified.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet6_0.verified.txt
deleted file mode 100644
index dc7a58cb1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet7_0.verified.txt
deleted file mode 100644
index dc7a58cb1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Net4_8.verified.txt
deleted file mode 100644
index dc7a58cb1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.Net4_8.verified.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.verified.txt
deleted file mode 100644
index dc7a58cb1..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IConvertible.verified.txt
+++ /dev/null
@@ -1,127 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Core3_1.verified.txt
deleted file mode 100644
index aa257c086..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Core3_1.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet6_0.verified.txt
deleted file mode 100644
index aa257c086..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet7_0.verified.txt
deleted file mode 100644
index aa257c086..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Net4_8.verified.txt
deleted file mode 100644
index aa257c086..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.Net4_8.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.verified.txt
deleted file mode 100644
index aa257c086..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IEquatable.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Core3_1.verified.txt
deleted file mode 100644
index 69f6bd20d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Core3_1.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(Guid.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = Guid.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet6_0.verified.txt
deleted file mode 100644
index 69f6bd20d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(Guid.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = Guid.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet7_0.verified.txt
deleted file mode 100644
index 69f6bd20d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(Guid.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = Guid.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Net4_8.verified.txt
deleted file mode 100644
index 69f6bd20d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.Net4_8.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(Guid.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = Guid.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.verified.txt
deleted file mode 100644
index 69f6bd20d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IParsable.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IParsable
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(Guid.Parse(s, provider));
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- long res = 0;
- var ok = Guid.TryParse(s, provider, out res);
- result = new MyTestId(res);
- return ok;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Core3_1.verified.txt
deleted file mode 100644
index 894b2d694..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Core3_1.verified.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(MassTransit.NewId value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
deleted file mode 100644
index 894b2d694..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(MassTransit.NewId value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
deleted file mode 100644
index 894b2d694..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(MassTransit.NewId value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Net4_8.verified.txt
deleted file mode 100644
index 894b2d694..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.Net4_8.verified.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(MassTransit.NewId value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.verified.txt
deleted file mode 100644
index 894b2d694..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=IStronglyTypedId.verified.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(MassTransit.NewId value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Core3_1.verified.txt
deleted file mode 100644
index 45aeb6284..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 45aeb6284..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 45aeb6284..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Net4_8.verified.txt
deleted file mode 100644
index 45aeb6284..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.verified.txt
deleted file mode 100644
index 45aeb6284..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=None_i=None.verified.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 4859be292..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = "uuid"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 4859be292..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = "uuid"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 4859be292..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = "uuid"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 4859be292..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = "uuid"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.verified.txt
deleted file mode 100644
index 4859be292..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SwaggerSchemaFilter_i=None.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = "uuid"};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 9f8fd74ba..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(MassTransit.NewId.FromGuid(reader.GetGuid()));
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteStringValue(value.Value.ToGuid());
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 9f8fd74ba..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(MassTransit.NewId.FromGuid(reader.GetGuid()));
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteStringValue(value.Value.ToGuid());
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 9f8fd74ba..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(MassTransit.NewId.FromGuid(reader.GetGuid()));
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteStringValue(value.Value.ToGuid());
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 9f8fd74ba..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(MassTransit.NewId.FromGuid(reader.GetGuid()));
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteStringValue(value.Value.ToGuid());
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.verified.txt
deleted file mode 100644
index 9f8fd74ba..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=SystemTextJson_i=None.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(MassTransit.NewId.FromGuid(reader.GetGuid()));
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- writer.WriteStringValue(value.Value.ToGuid());
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 7450bdc12..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) ||
- sourceType == typeof(string) || base.CanConvertFrom
- (context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- MassTransit.NewId newIdValue => new MyTestId(newIdValue),
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(MassTransit.NewId))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(System.Guid))
- {
- return idValue.Value.ToGuid();
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToGuid().ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 7450bdc12..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) ||
- sourceType == typeof(string) || base.CanConvertFrom
- (context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- MassTransit.NewId newIdValue => new MyTestId(newIdValue),
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(MassTransit.NewId))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(System.Guid))
- {
- return idValue.Value.ToGuid();
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToGuid().ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 7450bdc12..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) ||
- sourceType == typeof(string) || base.CanConvertFrom
- (context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- MassTransit.NewId newIdValue => new MyTestId(newIdValue),
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(MassTransit.NewId))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(System.Guid))
- {
- return idValue.Value.ToGuid();
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToGuid().ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 7450bdc12..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) ||
- sourceType == typeof(string) || base.CanConvertFrom
- (context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- MassTransit.NewId newIdValue => new MyTestId(newIdValue),
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(MassTransit.NewId))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(System.Guid))
- {
- return idValue.Value.ToGuid();
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToGuid().ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.verified.txt
deleted file mode 100644
index 7450bdc12..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=MassTransitNewId_c=TypeConverter_i=None.verified.txt
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public MassTransit.NewId Value { get; }
-
- public MyTestId(MassTransit.NewId value)
- {
- Value = value;
- }
-
- public static MyTestId New() => new MyTestId(MassTransit.NewId.Next());
- public static readonly MyTestId Empty = new MyTestId(MassTransit.NewId.Empty);
-
- public bool Equals(MyTestId other) => this.Value.Equals(other.Value);
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value.ToString();
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) ||
- sourceType == typeof(string) || base.CanConvertFrom
- (context, sourceType);
- }
-
- public override object ConvertFrom(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
- {
- return value switch
- {
- MassTransit.NewId newIdValue => new MyTestId(newIdValue),
- System.Guid guidValue => new MyTestId(MassTransit.NewId.FromGuid(guidValue)),
- string stringValue when !string.IsNullOrEmpty(stringValue) && System.Guid.TryParse(stringValue, out var result) => new MyTestId(MassTransit.NewId.FromGuid(result)),
- _ => base.ConvertFrom(context, culture, value),
- };
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Type sourceType)
- {
- return sourceType == typeof(System.Guid) || sourceType == typeof(MassTransit.NewId) || sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object ConvertTo(System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(MassTransit.NewId))
- {
- return idValue.Value;
- }
-
- if (destinationType == typeof(System.Guid))
- {
- return idValue.Value.ToGuid();
- }
-
- if (destinationType == typeof(string))
- {
- return idValue.Value.ToGuid().ToString();
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Core3_1.verified.txt
deleted file mode 100644
index 466f1d0d9..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- null => new MyTestId(null),
- System.DBNull => new MyTestId(null),
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 466f1d0d9..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- null => new MyTestId(null),
- System.DBNull => new MyTestId(null),
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 466f1d0d9..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- null => new MyTestId(null),
- System.DBNull => new MyTestId(null),
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Net4_8.verified.txt
deleted file mode 100644
index 466f1d0d9..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- null => new MyTestId(null),
- System.DBNull => new MyTestId(null),
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.verified.txt
deleted file mode 100644
index 466f1d0d9..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=DapperTypeHandler_i=None.verified.txt
+++ /dev/null
@@ -1,74 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- null => new MyTestId(null),
- System.DBNull => new MyTestId(null),
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 8e3120645..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
- : base(
- id => id.Value!,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 8e3120645..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
- : base(
- id => id.Value!,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 8e3120645..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
- : base(
- id => id.Value!,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 8e3120645..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
- : base(
- id => id.Value!,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.verified.txt
deleted file mode 100644
index 8e3120645..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=EfCoreValueConverter_i=None.verified.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints? mappingHints = null)
- : base(
- id => id.Value!,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index 07b19dc5f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object? value, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (value is null)
- {
- serializer.Serialize(writer, null);
- }
- else
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object? existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 07b19dc5f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object? value, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (value is null)
- {
- serializer.Serialize(writer, null);
- }
- else
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object? existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 07b19dc5f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object? value, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (value is null)
- {
- serializer.Serialize(writer, null);
- }
- else
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object? existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index 07b19dc5f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object? value, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (value is null)
- {
- serializer.Serialize(writer, null);
- }
- else
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object? existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.verified.txt
deleted file mode 100644
index 07b19dc5f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=NewtonsoftJson_i=None.verified.txt
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object? value, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (value is null)
- {
- serializer.Serialize(writer, null);
- }
- else
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object? existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Core3_1.verified.txt
deleted file mode 100644
index 8429ca5ed..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Core3_1.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IComparable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet6_0.verified.txt
deleted file mode 100644
index 8429ca5ed..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IComparable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet7_0.verified.txt
deleted file mode 100644
index 8429ca5ed..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IComparable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Net4_8.verified.txt
deleted file mode 100644
index 8429ca5ed..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.Net4_8.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IComparable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.verified.txt
deleted file mode 100644
index 8429ca5ed..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IComparable.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IComparable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Core3_1.verified.txt
deleted file mode 100644
index 4f1dd8c87..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Core3_1.verified.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IConvertible
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet6_0.verified.txt
deleted file mode 100644
index 4f1dd8c87..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IConvertible
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet7_0.verified.txt
deleted file mode 100644
index 4f1dd8c87..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IConvertible
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Net4_8.verified.txt
deleted file mode 100644
index 4f1dd8c87..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.Net4_8.verified.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IConvertible
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.verified.txt
deleted file mode 100644
index 4f1dd8c87..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IConvertible.verified.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IConvertible
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Core3_1.verified.txt
deleted file mode 100644
index f9a873fac..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Core3_1.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IEquatable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet6_0.verified.txt
deleted file mode 100644
index f9a873fac..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IEquatable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet7_0.verified.txt
deleted file mode 100644
index f9a873fac..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IEquatable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Net4_8.verified.txt
deleted file mode 100644
index f9a873fac..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.Net4_8.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IEquatable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.verified.txt
deleted file mode 100644
index f9a873fac..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IEquatable.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IEquatable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Core3_1.verified.txt
deleted file mode 100644
index cabf52c73..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Core3_1.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IParsable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(s);
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- result = new MyTestId(s);
- return true;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet6_0.verified.txt
deleted file mode 100644
index cabf52c73..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IParsable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(s);
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- result = new MyTestId(s);
- return true;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet7_0.verified.txt
deleted file mode 100644
index cabf52c73..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IParsable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(s);
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- result = new MyTestId(s);
- return true;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Net4_8.verified.txt
deleted file mode 100644
index cabf52c73..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.Net4_8.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IParsable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(s);
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- result = new MyTestId(s);
- return true;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.verified.txt
deleted file mode 100644
index cabf52c73..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IParsable.verified.txt
+++ /dev/null
@@ -1,57 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : System.IParsable
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static MyTestId Parse(string s, IFormatProvider? provider)
- {
- return new MyTestId(s);
- }
-
- public static bool TryParse(string? s, IFormatProvider? provider, out MyTestId result)
- {
- result = new MyTestId(s);
- return true;
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Core3_1.verified.txt
deleted file mode 100644
index 00599cf8c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Core3_1.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(string? value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
deleted file mode 100644
index 00599cf8c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(string? value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
deleted file mode 100644
index 00599cf8c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(string? value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Net4_8.verified.txt
deleted file mode 100644
index 00599cf8c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.Net4_8.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(string? value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.verified.txt
deleted file mode 100644
index 00599cf8c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=IStronglyTypedId.verified.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId : IStronglyTypedId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public static IStronglyTypedId Create(string? value)
- {
- return new MyTestId(value);
- }
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Core3_1.verified.txt
deleted file mode 100644
index 18d1e425b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 18d1e425b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 18d1e425b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Net4_8.verified.txt
deleted file mode 100644
index 18d1e425b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.verified.txt
deleted file mode 100644
index 18d1e425b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=None_i=None.verified.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
deleted file mode 100644
index e1af0c06c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = ""};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- schema.Nullable = true;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index e1af0c06c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = ""};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- schema.Nullable = true;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index e1af0c06c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = ""};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- schema.Nullable = true;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
deleted file mode 100644
index e1af0c06c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = ""};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- schema.Nullable = true;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.verified.txt
deleted file mode 100644
index e1af0c06c..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SwaggerSchemaFilter_i=None.verified.txt
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [Swashbuckle.AspNetCore.Annotations.SwaggerSchemaFilter(typeof(MyTestIdSchemaFilter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSchemaFilter : Swashbuckle.AspNetCore.SwaggerGen.ISchemaFilter
- {
- public void Apply(Microsoft.OpenApi.Models.OpenApiSchema schema, Swashbuckle.AspNetCore.SwaggerGen.SchemaFilterContext context)
- {
- var idSchema = new Microsoft.OpenApi.Models.OpenApiSchema {Type = "string", Format = ""};
- schema.Type = idSchema.Type;
- schema.Format = idSchema.Format;
- schema.Example = idSchema.Example;
- schema.Default = idSchema.Default;
- schema.Properties = idSchema.Properties;
- schema.Nullable = true;
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index a8063f045..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetString());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- if (value.Value is null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(value.Value);
- }
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index a8063f045..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetString());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- if (value.Value is null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(value.Value);
- }
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index a8063f045..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetString());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- if (value.Value is null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(value.Value);
- }
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index a8063f045..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetString());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- if (value.Value is null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(value.Value);
- }
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.verified.txt
deleted file mode 100644
index a8063f045..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=SystemTextJson_i=None.verified.txt
+++ /dev/null
@@ -1,66 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.Text.Json.Serialization.JsonConverter(typeof(MyTestIdSystemTextJsonConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdSystemTextJsonConverter : System.Text.Json.Serialization.JsonConverter
- {
- public override MyTestId Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
- {
- return new MyTestId(reader.GetString());
- }
-
- public override void Write(System.Text.Json.Utf8JsonWriter writer, MyTestId value, System.Text.Json.JsonSerializerOptions options)
- {
- if (value.Value is null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(value.Value);
- }
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 4de84ad41..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object? ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
- {
- if (value is null)
- {
- return new MyTestId(null);
- }
-
- var stringValue = value as string;
- if (stringValue is not null)
- {
- return new MyTestId(stringValue);
- }
-
- return base.ConvertFrom(context, culture, value);
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object? ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(string))
- {
- return idValue.Value;
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 4de84ad41..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object? ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
- {
- if (value is null)
- {
- return new MyTestId(null);
- }
-
- var stringValue = value as string;
- if (stringValue is not null)
- {
- return new MyTestId(stringValue);
- }
-
- return base.ConvertFrom(context, culture, value);
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object? ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(string))
- {
- return idValue.Value;
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 4de84ad41..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object? ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
- {
- if (value is null)
- {
- return new MyTestId(null);
- }
-
- var stringValue = value as string;
- if (stringValue is not null)
- {
- return new MyTestId(stringValue);
- }
-
- return base.ConvertFrom(context, culture, value);
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object? ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(string))
- {
- return idValue.Value;
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 4de84ad41..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object? ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
- {
- if (value is null)
- {
- return new MyTestId(null);
- }
-
- var stringValue = value as string;
- if (stringValue is not null)
- {
- return new MyTestId(stringValue);
- }
-
- return base.ConvertFrom(context, culture, value);
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object? ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(string))
- {
- return idValue.Value;
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.verified.txt
deleted file mode 100644
index 4de84ad41..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=NullableString_c=TypeConverter_i=None.verified.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
-#nullable enable
- [System.ComponentModel.TypeConverter(typeof(MyTestIdTypeConverter))]
- readonly partial struct MyTestId
- {
- public string? Value { get; }
-
- public MyTestId(string? value)
- {
- Value = value;
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object? obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value?.GetHashCode() ?? 0;
- public override string? ToString() => Value;
-
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdTypeConverter : System.ComponentModel.TypeConverter
- {
- public override bool CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
- }
-
- public override object? ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value)
- {
- if (value is null)
- {
- return new MyTestId(null);
- }
-
- var stringValue = value as string;
- if (stringValue is not null)
- {
- return new MyTestId(stringValue);
- }
-
- return base.ConvertFrom(context, culture, value);
- }
-
- public override bool CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType)
- {
- return sourceType == typeof(string) || base.CanConvertTo(context, sourceType);
- }
-
- public override object? ConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, System.Type destinationType)
- {
- if (value is MyTestId idValue)
- {
- if (destinationType == typeof(string))
- {
- return idValue.Value;
- }
- }
-
- return base.ConvertTo(context, culture, value, destinationType);
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Core3_1.verified.txt
deleted file mode 100644
index 184bc744f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 184bc744f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 184bc744f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Net4_8.verified.txt
deleted file mode 100644
index 184bc744f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.verified.txt
deleted file mode 100644
index 184bc744f..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=DapperTypeHandler_i=None.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class DapperTypeHandler : Dapper.SqlMapper.TypeHandler
- {
- public override void SetValue(System.Data.IDbDataParameter parameter, MyTestId value)
- {
- parameter.Value = value.Value;
- parameter.DbType = System.Data.DbType.AnsiString;
- }
-
- public override MyTestId Parse(object value)
- {
- return value switch
- {
- string stringValue => new MyTestId(stringValue),
- _ => throw new System.InvalidCastException($"Unable to cast object of type {value.GetType()} to MyTestId"),
- };
- }
- }
-
-#pragma warning disable CA2255
- [System.Runtime.CompilerServices.ModuleInitializerAttribute]
- public static void AddTypeHandler()
- {
- Dapper.SqlMapper.AddTypeHandler(new DapperTypeHandler());
- }
-#pragma warning restore CA2255
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
deleted file mode 100644
index 05700f78d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index 05700f78d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index 05700f78d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
deleted file mode 100644
index 05700f78d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.verified.txt
deleted file mode 100644
index 05700f78d..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=EfCoreValueConverter_i=None.verified.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- public class EfCoreValueConverter : Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter
- {
- public EfCoreValueConverter() : this(null) { }
- public EfCoreValueConverter(Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null)
- : base(
- id => id.Value,
- value => new MyTestId(value),
- mappingHints
- ) { }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Core3_1.verified.txt
deleted file mode 100644
index d7596bf2b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Core3_1.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (objectType == typeof(MyTestId?))
- {
- var value = serializer.Deserialize(reader);
-
- return value is null ? null : new MyTestId(value);
- }
-
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
deleted file mode 100644
index d7596bf2b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (objectType == typeof(MyTestId?))
- {
- var value = serializer.Deserialize(reader);
-
- return value is null ? null : new MyTestId(value);
- }
-
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
deleted file mode 100644
index d7596bf2b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (objectType == typeof(MyTestId?))
- {
- var value = serializer.Deserialize(reader);
-
- return value is null ? null : new MyTestId(value);
- }
-
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Net4_8.verified.txt
deleted file mode 100644
index d7596bf2b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.Net4_8.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (objectType == typeof(MyTestId?))
- {
- var value = serializer.Deserialize(reader);
-
- return value is null ? null : new MyTestId(value);
- }
-
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.verified.txt
deleted file mode 100644
index d7596bf2b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=NewtonsoftJson_i=None.verified.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- [Newtonsoft.Json.JsonConverter(typeof(MyTestIdNewtonsoftJsonConverter))]
- readonly partial struct MyTestId
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
- class MyTestIdNewtonsoftJsonConverter : Newtonsoft.Json.JsonConverter
- {
- public override bool CanConvert(System.Type objectType)
- {
- return objectType == typeof(MyTestId);
- }
-
- public override void WriteJson(Newtonsoft.Json.JsonWriter writer, object value, Newtonsoft.Json.JsonSerializer serializer)
- {
- var id = (MyTestId)value;
- serializer.Serialize(writer, id.Value);
- }
-
- public override object ReadJson(Newtonsoft.Json.JsonReader reader, System.Type objectType, object existingValue, Newtonsoft.Json.JsonSerializer serializer)
- {
- if (objectType == typeof(MyTestId?))
- {
- var value = serializer.Deserialize(reader);
-
- return value is null ? null : new MyTestId(value);
- }
-
- return new MyTestId(serializer.Deserialize(reader));
- }
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Core3_1.verified.txt
deleted file mode 100644
index 4fae5139a..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Core3_1.verified.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet6_0.verified.txt
deleted file mode 100644
index 4fae5139a..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet7_0.verified.txt
deleted file mode 100644
index 4fae5139a..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Net4_8.verified.txt
deleted file mode 100644
index 4fae5139a..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.Net4_8.verified.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.verified.txt
deleted file mode 100644
index 4fae5139a..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IComparable.verified.txt
+++ /dev/null
@@ -1,54 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IComparable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- public int CompareTo(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => 0,
- (null, _) => -1,
- (_, null) => 1,
- (_, _) => Value.CompareTo(other.Value),
- };
- }
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Core3_1.verified.txt
deleted file mode 100644
index 253750032..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Core3_1.verified.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet6_0.verified.txt
deleted file mode 100644
index 253750032..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet7_0.verified.txt
deleted file mode 100644
index 253750032..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Net4_8.verified.txt
deleted file mode 100644
index 253750032..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.Net4_8.verified.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.verified.txt
deleted file mode 100644
index 253750032..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IConvertible.verified.txt
+++ /dev/null
@@ -1,134 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IConvertible
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
-
-//ICONVERTIBLE
-#nullable enable
-
- public System.TypeCode GetTypeCode()
- {
- throw new System.NotImplementedException();
- }
-
- public bool ToBoolean(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public byte ToByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public char ToChar(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public System.DateTime ToDateTime(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public decimal ToDecimal(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public double ToDouble(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public short ToInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public int ToInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public long ToInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public sbyte ToSByte(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public float ToSingle(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public string ToString(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public object ToType(System.Type conversionType, System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ushort ToUInt16(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public uint ToUInt32(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-
- public ulong ToUInt64(System.IFormatProvider? provider)
- {
- throw new System.NotImplementedException();
- }
-#nullable disable
-
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Core3_1.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Core3_1.verified.txt
deleted file mode 100644
index 050bcc20b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Core3_1.verified.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet6_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet6_0.verified.txt
deleted file mode 100644
index 050bcc20b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet6_0.verified.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet7_0.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet7_0.verified.txt
deleted file mode 100644
index 050bcc20b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.DotNet7_0.verified.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Net4_8.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Net4_8.verified.txt
deleted file mode 100644
index 050bcc20b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.Net4_8.verified.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by the StronglyTypedId source generator
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591 // publicly visible type or member must be documented
-
- readonly partial struct MyTestId : System.IEquatable
- {
- public string Value { get; }
-
- public MyTestId(string value)
- {
- Value = value ?? throw new System.ArgumentNullException(nameof(value));
- }
-
- public static readonly MyTestId Empty = new MyTestId(string.Empty);
-
- public bool Equals(MyTestId other)
- {
- return (Value, other.Value) switch
- {
- (null, null) => true,
- (null, _) => false,
- (_, null) => false,
- (_, _) => Value.Equals(other.Value),
- };
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- return obj is MyTestId other && Equals(other);
- }
-
- public override int GetHashCode() => Value.GetHashCode();
-
- public override string ToString() => Value;
- public static bool operator ==(MyTestId a, MyTestId b) => a.Equals(b);
- public static bool operator !=(MyTestId a, MyTestId b) => !(a == b);
- }
diff --git a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.verified.txt b/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.verified.txt
deleted file mode 100644
index 050bcc20b..000000000
--- a/test/StronglyTypedIds.Tests/Snapshots/SourceGenerationHelperSnapshotTests.GeneratesIdCorrectly_type=String_c=None_i=IEquatable.verified.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-//------------------------------------------------------------------------------
-//