From 2d543fb929a163047b9d6c0c27a0d048eefd0c03 Mon Sep 17 00:00:00 2001 From: Steve Dunn Date: Wed, 19 Jun 2024 06:22:46 +0100 Subject: [PATCH 1/4] New test --- ..._converters_for_escaped_types.verified.txt | 7108 +++++++++++++++++ 1 file changed, 7108 insertions(+) create mode 100644 tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt new file mode 100644 index 0000000000..d48b308084 --- /dev/null +++ b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt @@ -0,0 +1,7108 @@ +[ +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo1EfCoreValueConverter() : this(null) { } + public MyVo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo1 UnsafeDeserialize(Whatever.MyVo1 @this, System.Int32 value); + } + public class MyVo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo1EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo1 left, Whatever.MyVo1 right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.MyVo1 i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo1 @this); + } +} + +public static class MyVo1__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo2EfCoreValueConverter() : this(null) { } + public MyVo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo2 UnsafeDeserialize(Whatever.MyVo2 @this, System.String value); + } + public class MyVo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo2EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo2 left, Whatever.MyVo2 right) + { + // if both null, then they're equal + if (left is null) return right is null; + + // if only right is null, then they're not equal + if (right is null) return false; + + // if they're both the same reference, then they're equal + if (ReferenceEquals(left, right)) return true; + + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.String UnderlyingValue(Whatever.MyVo2 i) => UnsafeValueField( i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.String UnsafeValueField( Whatever.MyVo2 @this); +} +} + +public static class MyVo2__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo3EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo3EfCoreValueConverter() : this(null) { } + public MyVo3EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo3 Deserialize(System.String value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo3 UnsafeDeserialize(Whatever.MyVo3 @this, System.String value); + } + public class MyVo3EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo3EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo3 left, Whatever.MyVo3 right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.String UnderlyingValue(Whatever.MyVo3 i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.String UnsafeValueField(ref Whatever.MyVo3 @this); + } +} + +public static class MyVo3__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo4EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo4EfCoreValueConverter() : this(null) { } + public MyVo4EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo4 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo4 UnsafeDeserialize(Whatever.MyVo4 @this, System.Int32 value); + } + public class MyVo4EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo4EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo4 left, Whatever.MyVo4 right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.MyVo4 i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo4 @this); + } +} + +public static class MyVo4__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo5EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo5EfCoreValueConverter() : this(null) { } + public MyVo5EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo5 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo5 UnsafeDeserialize(Whatever.MyVo5 @this, System.Int32 value); + } + public class MyVo5EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo5EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo5 left, Whatever.MyVo5 right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.MyVo5 i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo5 @this); + } +} + +public static class MyVo5__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyVo6EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyVo6EfCoreValueConverter() : this(null) { } + public MyVo6EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyVo6 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyVo6 UnsafeDeserialize(Whatever.MyVo6 @this, System.Int32 value); + } + public class MyVo6EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyVo6EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyVo6 left, Whatever.MyVo6 right) + { + // if both null, then they're equal + if (left is null) return right is null; + + // if only right is null, then they're not equal + if (right is null) return false; + + // if they're both the same reference, then they're equal + if (ReferenceEquals(left, right)) return true; + + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.MyVo6 i) => UnsafeValueField( i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField( Whatever.MyVo6 @this); +} +} + +public static class MyVo6__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class intEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public intEfCoreValueConverter() : this(null) { } + public intEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.@int Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.@int UnsafeDeserialize(Whatever.@int @this, System.Int32 value); + } + public class intEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public intEfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.@int left, Whatever.@int right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.@int i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField(ref Whatever.@int @this); + } +} + +public static class int__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class byteEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public byteEfCoreValueConverter() : this(null) { } + public byteEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.@byte Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.@byte UnsafeDeserialize(Whatever.@byte @this, System.Int32 value); + } + public class byteEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public byteEfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.@byte left, Whatever.@byte right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.@byte i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField(ref Whatever.@byte @this); + } +} + +public static class byte__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Whatever; + +public partial class EfCoreConverters +{ + public class MyIntEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + { + public MyIntEfCoreValueConverter() : this(null) { } + public MyIntEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static Whatever.MyInt Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern Whatever.MyInt UnsafeDeserialize(Whatever.MyInt @this, System.Int32 value); + } + public class MyIntEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public MyIntEfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) + { + } + + static bool DoCompare(Whatever.MyInt left, Whatever.MyInt right) + { + // if both null, then they're equal + if (left is null) return right is null; + + // if only right is null, then they're not equal + if (right is null) return false; + + // if they're both the same reference, then they're equal + if (ReferenceEquals(left, right)) return true; + + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Whatever.MyInt i) => UnsafeValueField( i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Int32 UnsafeValueField( Whatever.MyInt @this); +} +} + +public static class MyInt__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace @byte; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@int.@byte>().HaveConversion<@byte.EfCoreConverters.byteEfCoreValueConverter, @byte.EfCoreConverters.byteEfCoreValueComparer>(); +configurationBuilder.Properties<@int.@string>().HaveConversion<@byte.EfCoreConverters.stringEfCoreValueConverter, @byte.EfCoreConverters.stringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace @byte; + +public partial class EfCoreConverters +{ + public class byteEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<@int.@byte, System.Byte> + { + public byteEfCoreValueConverter() : this(null) { } + public byteEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static @int.@byte Deserialize(System.Byte value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern @int.@byte UnsafeDeserialize(@int.@byte @this, System.Byte value); + } + public class byteEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer<@int.@byte> + { + public byteEfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(@int.@byte left, @int.@byte right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Byte UnderlyingValue(@int.@byte i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.Byte UnsafeValueField(ref @int.@byte @this); + } +} + +public static class byte__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@byte> HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@byte> propertyBuilder) => + propertyBuilder.HasConversion<@byte.EfCoreConverters.byteEfCoreValueConverter, @byte.EfCoreConverters.byteEfCoreValueComparer>(); +} + + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace @byte; + +public partial class EfCoreConverters +{ + public class stringEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<@int.@string, System.String> + { + public stringEfCoreValueConverter() : this(null) { } + public stringEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + : base( + vo => vo.Value, + value => Deserialize(value), + mappingHints + ) { } + + static @int.@string Deserialize(System.String value) => UnsafeDeserialize(default, value); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] + static extern @int.@string UnsafeDeserialize(@int.@string @this, System.String value); + } + public class stringEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer<@int.@string> + { + public stringEfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(@int.@string left, @int.@string right) + { + // if neither are initialized, then they're equal + if(!left.IsInitialized() && !right.IsInitialized()) return true; + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.String UnderlyingValue(@int.@string i) => UnsafeValueField(ref i); + + [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] + static extern ref System.String UnsafeValueField(ref @int.@string @this); + } +} + +public static class string__Ext +{ + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@string> HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@string> propertyBuilder) => + propertyBuilder.HasConversion<@byte.EfCoreConverters.stringEfCoreValueConverter, @byte.EfCoreConverters.stringEfCoreValueComparer>(); +} + + +#endif + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace generator; + +public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConverterFactory +{ + public VogenTypesFactory() { } + private static readonly global::System.Collections.Generic.Dictionary> _lookup = + new global::System.Collections.Generic.Dictionary> { + { typeof(@int.@byte), new global::System.Lazy(() => new @int.@byte.@byteSystemTextJsonConverter()) },{ typeof(@int.@string), new global::System.Lazy(() => new @int.@string.@stringSystemTextJsonConverter()) },{ typeof(Whatever.MyVo1), new global::System.Lazy(() => new Whatever.MyVo1.MyVo1SystemTextJsonConverter()) },{ typeof(Whatever.MyVo2), new global::System.Lazy(() => new Whatever.MyVo2.MyVo2SystemTextJsonConverter()) },{ typeof(Whatever.MyVo3), new global::System.Lazy(() => new Whatever.MyVo3.MyVo3SystemTextJsonConverter()) },{ typeof(Whatever.MyVo4), new global::System.Lazy(() => new Whatever.MyVo4.MyVo4SystemTextJsonConverter()) },{ typeof(Whatever.MyVo5), new global::System.Lazy(() => new Whatever.MyVo5.MyVo5SystemTextJsonConverter()) },{ typeof(Whatever.MyVo6), new global::System.Lazy(() => new Whatever.MyVo6.MyVo6SystemTextJsonConverter()) },{ typeof(Whatever.@int), new global::System.Lazy(() => new Whatever.@int.@intSystemTextJsonConverter()) },{ typeof(Whatever.@byte), new global::System.Lazy(() => new Whatever.@byte.@byteSystemTextJsonConverter()) },{ typeof(Whatever.MyInt), new global::System.Lazy(() => new Whatever.MyInt.MyIntSystemTextJsonConverter()) } + }; + + public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert); + + public override global::System.Text.Json.Serialization.JsonConverter CreateConverter(global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) => + _lookup[typeToConvert].Value; +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace @int +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(@byteSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(@byteTypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@byteDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Byte, Value = { _value }")] + public partial struct @byte : global::System.IEquatable<@byte>, global::System.IEquatable , global::System.IComparable<@byte>, global::System.IComparable, global::System.IParsable<@byte>, global::System.ISpanParsable<@byte>, global::System.IUtf8SpanParsable<@byte> + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Byte _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Byte Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public @byte() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private @byte(System.Byte value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static @byte From(System.Byte value) + { + + + + + @byte instance = new @byte(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Byte value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte vo) +{ + + + + + + vo = new @byte(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError<@byte> TryFrom(System.Byte value) +{ + + + + + + + return new ValueObjectOrError<@byte>(new @byte(value)); +} + + public bool IsInitialized() => _isInitialized; + + + + public static explicit operator @byte(System.Byte value) => From(value); + public static explicit operator System.Byte(@byte value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static @byte __Deserialize(System.Byte value) + { + + + + + return new @byte(value); + } + public readonly global::System.Boolean Equals(@byte other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(@byte other, global::System.Collections.Generic.IEqualityComparer<@byte> comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Byte primitive) + { + return Value.Equals(primitive); + } + + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is @byte && Equals((@byte) obj); + } + + public static global::System.Boolean operator ==(@byte left, @byte right) => Equals(left, right); + public static global::System.Boolean operator !=(@byte left, @byte right) => !(left == right); + + public static global::System.Boolean operator ==(@byte left, System.Byte right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(@byte left, System.Byte right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Byte left, @byte right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Byte left, @byte right) => !Equals(left, right.Value); + + public int CompareTo(@byte other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is @byte x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type @byte", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(utf8Text, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(utf8Text, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Byte.TryParse(s, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s) { + var r = System.Byte.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Byte.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.IFormatProvider provider) { + var r = System.Byte.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + /// + /// Converts a @byte to or from JSON. + /// + public class @byteSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@byte> + { + public override @byte Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return @byte.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Byte)))); +#else + return @byte.__Deserialize(reader.GetByte()); +#endif + } + + public override void Write(global::System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + { + + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override @byte ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return @byte.__Deserialize(global::System.Byte.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class @byteTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Byte byteValue => @byte.__Deserialize(byteValue), + global::System.Int16 shortValue => @byte.__Deserialize((global::System.Byte)shortValue), + global::System.Int32 intValue => @byte.__Deserialize((global::System.Byte)intValue), + global::System.Int64 longValue => @byte.__Deserialize((global::System.Byte)longValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Byte.TryParse(stringValue, out var result) => @byte.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is @byte idValue) + { + if (destinationType == typeof(global::System.Byte)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class @byteDebugView + { + private readonly @byte _t; + + @byteDebugView(@byte t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Byte"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace @int +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(@stringSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(@stringTypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@stringDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] + public partial record struct @string : global::System.IEquatable<@string>, global::System.IEquatable , global::System.IComparable<@string>, global::System.IComparable, global::System.IParsable<@string> + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.String _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.String Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + if (value is null) + { + throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + } + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public @string() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private @string(System.String value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static @string From(System.String value) + { + + + + + @string instance = new @string(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.String value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @string vo) +{ + + + + + + vo = new @string(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError<@string> TryFrom(System.String value) +{ + + + + + + + return new ValueObjectOrError<@string>(new @string(value)); +} + + public bool IsInitialized() => _isInitialized; + + + public static explicit operator @string(System.String value) => From(value); + public static explicit operator System.String(@string value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static @string __Deserialize(System.String value) + { + + + + + return new @string(value); + } + public readonly global::System.Boolean Equals(@string other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(@string other, global::System.Collections.Generic.IEqualityComparer<@string> comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.String primitive) + { + return Value.Equals(primitive); + } + + public readonly global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) + { + return comparer.Equals(Value, primitive); + } + + public static global::System.Boolean operator ==(@string left, System.String right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(@string left, System.String right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.String left, @string right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.String left, @string right) => !Equals(left, right.Value); + + public int CompareTo(@string other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is @string x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type @string", nameof(other)); + } + + + /// + /// + /// + /// True if the value passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.String s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @string result) { + + + result = new @string(s); + return true; + } + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @string Parse(global::System.String s, global::System.IFormatProvider provider) { + return From(s); + } + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + + + /// + /// Converts a @string to or from JSON. + /// + public class @stringSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@string> + { + public override @string Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return @string.__Deserialize(reader.GetString()); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, @string value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.Value); + } + +#if NET6_0_OR_GREATER + public override @string ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return @string.__Deserialize(reader.GetString()); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @string value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value); + } +#endif + } + + + class @stringTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + var stringValue = value as global::System.String; + if (stringValue is not null) + { + return @string.__Deserialize(stringValue); + } + + return base.ConvertFrom(context, culture, value); + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is @string idValue) + { + if (destinationType == typeof(global::System.String)) + { + return idValue.Value; + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class @stringDebugView + { + private readonly @string _t; + + @stringDebugView(@string t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.String"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo1SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo1TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo1DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial struct MyVo1 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo1() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo1(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo1 From(System.Int32 value) + { + + + + + MyVo1 instance = new MyVo1(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 vo) +{ + + + + + + vo = new MyVo1(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError(new MyVo1(value)); +} + + public bool IsInitialized() => _isInitialized; + + + + public static explicit operator MyVo1(System.Int32 value) => From(value); + public static explicit operator System.Int32(MyVo1 value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo1 __Deserialize(System.Int32 value) + { + + + + + return new MyVo1(value); + } + public readonly global::System.Boolean Equals(MyVo1 other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo1 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is MyVo1 && Equals((MyVo1) obj); + } + + public static global::System.Boolean operator ==(MyVo1 left, MyVo1 right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVo1 left, MyVo1 right) => !(left == right); + + public static global::System.Boolean operator ==(MyVo1 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo1 left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, MyVo1 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, MyVo1 right) => !Equals(left, right.Value); + + public int CompareTo(MyVo1 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo1 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo1", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo1 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo1(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo1 Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + /// + /// Converts a MyVo1 to or from JSON. + /// + public class MyVo1SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo1 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return MyVo1.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return MyVo1.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo1 value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override MyVo1 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo1.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo1 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class MyVo1TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => MyVo1.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo1.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo1 idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class MyVo1DebugView + { + private readonly MyVo1 _t; + + MyVo1DebugView(MyVo1 t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Int32"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo2SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo2TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo2DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] + public partial class MyVo2 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + private readonly global::System.Boolean _isInitialized; + private readonly System.String _value; + +/// +/// Gets the underlying value if set, otherwise a is thrown. +/// +public System.String Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo2() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo2(System.String value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo2 From(System.String value) + { + if (value is null) + { + throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + } + + + + + + + MyVo2 instance = new MyVo2(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.String value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo2 vo) +{ + if (value is null) + { + vo = default; + return false; + } + + + + + + vo = new MyVo2(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.String value) +{ + if (value is null) + { + return new ValueObjectOrError(Validation.Invalid("The value provided was null")); + } + + + + + + + return new ValueObjectOrError(new MyVo2(value)); +} + + public bool IsInitialized() => _isInitialized; + + + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo2 __Deserialize(System.String value) + { + if (value is null) + { + throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); + } + + + + + + + return new MyVo2(value); + } + + public global::System.Boolean Equals(MyVo2 other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo2 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public global::System.Boolean Equals(System.String primitive) + { + return Value.Equals(primitive); + } + + public global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) + { + return comparer.Equals(Value, primitive); + } + public override global::System.Boolean Equals(global::System.Object obj) + { + return Equals(obj as MyVo2); + } + + public static global::System.Boolean operator ==(MyVo2 left, MyVo2 right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVo2 left, MyVo2 right) => !Equals(left, right); + + public static global::System.Boolean operator ==(MyVo2 left, System.String right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo2 left, System.String right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.String left, MyVo2 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.String left, MyVo2 right) => !Equals(left, right.Value); + + public static explicit operator MyVo2(System.String value) => From(value); + public static explicit operator System.String(MyVo2 value) => value.Value; + + public int CompareTo(MyVo2 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo2 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo2", nameof(other)); + } + + + /// + /// + /// + /// True if the value passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.String s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo2 result) { + + + result = new MyVo2(s); + return true; + } + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo2 Parse(global::System.String s, global::System.IFormatProvider provider) { + return From(s); + } + + + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32) 2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + private void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + /// Returns the string representation of the underlying . + public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + /// + /// Converts a MyVo2 to or from JSON. + /// + public class MyVo2SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo2 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo2.__Deserialize(reader.GetString()); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo2 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.Value); + } + +#if NET6_0_OR_GREATER + public override MyVo2 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo2.__Deserialize(reader.GetString()); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo2 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value); + } +#endif + } + + + class MyVo2TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + var stringValue = value as global::System.String; + if (stringValue is not null) + { + return MyVo2.__Deserialize(stringValue); + } + + return base.ConvertFrom(context, culture, value); + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo2 idValue) + { + if (destinationType == typeof(global::System.String)) + { + return idValue.Value; + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + internal sealed class MyVo2DebugView + { + private readonly MyVo2 _t; + + MyVo2DebugView(MyVo2 t) + { + _t = t; + } + + public global::System.String UnderlyingType => "System.String"; + public System.String Value => _t.Value ; + + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo2SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo2TypeConverter))] +"; + } + } + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo3SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo3TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo3DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] + public readonly partial struct MyVo3 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.String _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.String Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo3() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo3(System.String value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo3 From(System.String value) + { + + + + + MyVo3 instance = new MyVo3(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.String value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo3 vo) +{ + + + + + + vo = new MyVo3(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.String value) +{ + + + + + + + return new ValueObjectOrError(new MyVo3(value)); +} + + public bool IsInitialized() => _isInitialized; + + + + public static explicit operator MyVo3(System.String value) => From(value); + public static explicit operator System.String(MyVo3 value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo3 __Deserialize(System.String value) + { + + + + + return new MyVo3(value); + } + public readonly global::System.Boolean Equals(MyVo3 other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo3 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.String primitive) + { + return Value.Equals(primitive); + } + + public readonly global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) + { + return comparer.Equals(Value, primitive); + } + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is MyVo3 && Equals((MyVo3) obj); + } + + public static global::System.Boolean operator ==(MyVo3 left, MyVo3 right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVo3 left, MyVo3 right) => !(left == right); + + public static global::System.Boolean operator ==(MyVo3 left, System.String right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo3 left, System.String right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.String left, MyVo3 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.String left, MyVo3 right) => !Equals(left, right.Value); + + public int CompareTo(MyVo3 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo3 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo3", nameof(other)); + } + + + /// + /// + /// + /// True if the value passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.String s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo3 result) { + + + result = new MyVo3(s); + return true; + } + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo3 Parse(global::System.String s, global::System.IFormatProvider provider) { + return From(s); + } + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + /// + /// Converts a MyVo3 to or from JSON. + /// + public class MyVo3SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo3 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo3.__Deserialize(reader.GetString()); + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo3 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WriteStringValue(value.Value); + } + +#if NET6_0_OR_GREATER + public override MyVo3 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo3.__Deserialize(reader.GetString()); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo3 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value); + } +#endif + } + + + class MyVo3TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + var stringValue = value as global::System.String; + if (stringValue is not null) + { + return MyVo3.__Deserialize(stringValue); + } + + return base.ConvertFrom(context, culture, value); + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo3 idValue) + { + if (destinationType == typeof(global::System.String)) + { + return idValue.Value; + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class MyVo3DebugView + { + private readonly MyVo3 _t; + + MyVo3DebugView(MyVo3 t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.String"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo4SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo4TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo4DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public readonly partial struct MyVo4 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo4() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo4(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo4 From(System.Int32 value) + { + + + + + MyVo4 instance = new MyVo4(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 vo) +{ + + + + + + vo = new MyVo4(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError(new MyVo4(value)); +} + + public bool IsInitialized() => _isInitialized; + + + + public static explicit operator MyVo4(System.Int32 value) => From(value); + public static explicit operator System.Int32(MyVo4 value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo4 __Deserialize(System.Int32 value) + { + + + + + return new MyVo4(value); + } + public readonly global::System.Boolean Equals(MyVo4 other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo4 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is MyVo4 && Equals((MyVo4) obj); + } + + public static global::System.Boolean operator ==(MyVo4 left, MyVo4 right) => Equals(left, right); + public static global::System.Boolean operator !=(MyVo4 left, MyVo4 right) => !(left == right); + + public static global::System.Boolean operator ==(MyVo4 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo4 left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, MyVo4 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, MyVo4 right) => !Equals(left, right.Value); + + public int CompareTo(MyVo4 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo4 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo4", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo4 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo4(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo4 Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + /// + /// Converts a MyVo4 to or from JSON. + /// + public class MyVo4SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo4 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return MyVo4.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return MyVo4.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo4 value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override MyVo4 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo4.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo4 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class MyVo4TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => MyVo4.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo4.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo4 idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class MyVo4DebugView + { + private readonly MyVo4 _t; + + MyVo4DebugView(MyVo4 t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Int32"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo5SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo5TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo5DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public readonly partial record struct MyVo5 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo5() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo5(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo5 From(System.Int32 value) + { + + + + + MyVo5 instance = new MyVo5(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 vo) +{ + + + + + + vo = new MyVo5(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError(new MyVo5(value)); +} + + public bool IsInitialized() => _isInitialized; + + + public static explicit operator MyVo5(System.Int32 value) => From(value); + public static explicit operator System.Int32(MyVo5 value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo5 __Deserialize(System.Int32 value) + { + + + + + return new MyVo5(value); + } + public readonly global::System.Boolean Equals(MyVo5 other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo5 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + + public static global::System.Boolean operator ==(MyVo5 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo5 left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, MyVo5 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, MyVo5 right) => !Equals(left, right.Value); + + public int CompareTo(MyVo5 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo5 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo5", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo5 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo5(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo5 Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + + + /// + /// Converts a MyVo5 to or from JSON. + /// + public class MyVo5SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo5 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return MyVo5.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return MyVo5.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo5 value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override MyVo5 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo5.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo5 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class MyVo5TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => MyVo5.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo5.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo5 idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class MyVo5DebugView + { + private readonly MyVo5 _t; + + MyVo5DebugView(MyVo5 t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Int32"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo6SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo6TypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo6DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial record class MyVo6 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + private readonly global::System.Boolean _isInitialized; + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyVo6() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyVo6(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyVo6 From(System.Int32 value) + { + + + + + + + MyVo6 instance = new MyVo6(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 vo) +{ + + + + + + vo = new MyVo6(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError(new MyVo6(value)); +} + + public bool IsInitialized() => _isInitialized; + + + // only called internally when something has been deserialized into + // its primitive type. + private static MyVo6 __Deserialize(System.Int32 value) + { + + + + + + + return new MyVo6(value); + } + + public virtual global::System.Boolean Equals(MyVo6 other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyVo6 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + + public static global::System.Boolean operator ==(MyVo6 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyVo6 left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, MyVo6 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, MyVo6 right) => !Equals(left, right.Value); + + public static explicit operator MyVo6(System.Int32 value) => From(value); + public static explicit operator System.Int32(MyVo6 value) => value.Value; + + public int CompareTo(MyVo6 other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyVo6 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo6", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyVo6 result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyVo6(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyVo6 Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32) 2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + private void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + /// + /// Converts a MyVo6 to or from JSON. + /// + public class MyVo6SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyVo6 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return MyVo6.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return MyVo6.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo6 value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override MyVo6 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyVo6.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo6 value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class MyVo6TypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => MyVo6.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo6.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyVo6 idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + internal sealed class MyVo6DebugView + { + private readonly MyVo6 _t; + + MyVo6DebugView(MyVo6 t) + { + _t = t; + } + + public global::System.String UnderlyingType => "System.Int32"; + public System.Int32 Value => _t.Value ; + + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo6SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyVo6TypeConverter))] +"; + } + } + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(@intSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(@intTypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@intDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial record struct @int : global::System.IEquatable<@int>, global::System.IEquatable , global::System.IComparable<@int>, global::System.IComparable, global::System.IParsable<@int>, global::System.ISpanParsable<@int>, global::System.IUtf8SpanParsable<@int> + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public @int() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private @int(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static @int From(System.Int32 value) + { + + + + + @int instance = new @int(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int vo) +{ + + + + + + vo = new @int(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError<@int> TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError<@int>(new @int(value)); +} + + public bool IsInitialized() => _isInitialized; + + + public static explicit operator @int(System.Int32 value) => From(value); + public static explicit operator System.Int32(@int value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static @int __Deserialize(System.Int32 value) + { + + + + + return new @int(value); + } + public readonly global::System.Boolean Equals(@int other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(@int other, global::System.Collections.Generic.IEqualityComparer<@int> comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + + public static global::System.Boolean operator ==(@int left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(@int left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, @int right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, @int right) => !Equals(left, right.Value); + + public int CompareTo(@int other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is @int x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type @int", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @int result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new @int(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @int Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + + + /// + /// Converts a @int to or from JSON. + /// + public class @intSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@int> + { + public override @int Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return @int.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return @int.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, @int value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override @int ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return @int.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @int value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class @intTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => @int.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => @int.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is @int idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class @intDebugView + { + private readonly @int _t; + + @intDebugView(@int t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Int32"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(@byteSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(@byteTypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@byteDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial record struct @byte : global::System.IEquatable<@byte>, global::System.IEquatable , global::System.IComparable<@byte>, global::System.IComparable, global::System.IParsable<@byte>, global::System.ISpanParsable<@byte>, global::System.IUtf8SpanParsable<@byte> + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + + private readonly global::System.Boolean _isInitialized; + + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public @byte() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private @byte(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static @byte From(System.Int32 value) + { + + + + + @byte instance = new @byte(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte vo) +{ + + + + + + vo = new @byte(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError<@byte> TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError<@byte>(new @byte(value)); +} + + public bool IsInitialized() => _isInitialized; + + + public static explicit operator @byte(System.Int32 value) => From(value); + public static explicit operator System.Int32(@byte value) => value.Value; + + // only called internally when something has been deserialized into + // its primitive type. + private static @byte __Deserialize(System.Int32 value) + { + + + + + return new @byte(value); + } + public readonly global::System.Boolean Equals(@byte other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(@byte other, global::System.Collections.Generic.IEqualityComparer<@byte> comparer) + { + return comparer.Equals(this, other); + } + + + public readonly global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + + public static global::System.Boolean operator ==(@byte left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(@byte left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, @byte right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, @byte right) => !Equals(left, right.Value); + + public int CompareTo(@byte other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is @byte x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type @byte", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out @byte result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new @byte(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static @byte Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public readonly override global::System.Int32 GetHashCode() + { + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + } + + private readonly void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + + + /// + /// Converts a @byte to or from JSON. + /// + public class @byteSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@byte> + { + public override @byte Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return @byte.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return @byte.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override @byte ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return @byte.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class @byteTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => @byte.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => @byte.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is @byte idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + + internal sealed class @byteDebugView + { + private readonly @byte _t; + + @byteDebugView(@byte t) + { + _t = t; + } + + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.Int32"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; + + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif + + public global::System.String Conversions => @"Default"; + } + +} + +} + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +using Vogen; + +namespace Whatever +{ + + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(MyIntSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyIntTypeConverter))] + + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyIntDebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial record class MyInt : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + { +#if DEBUG + private readonly global::System.Diagnostics.StackTrace _stackTrace = null; +#endif + private readonly global::System.Boolean _isInitialized; + private readonly System.Int32 _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public System.Int32 Value + { + [global::System.Diagnostics.DebuggerStepThroughAttribute] + get + { + EnsureInitialized(); + return _value; + } + [global::System.Diagnostics.DebuggerStepThroughAttribute] + init + { + + + + + + + _value = value; + } + } + + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public MyInt() + { +#if DEBUG + _stackTrace = new global::System.Diagnostics.StackTrace(); +#endif + _isInitialized = false; + _value = default; + } + + [global::System.Diagnostics.DebuggerStepThroughAttribute] + private MyInt(System.Int32 value) + { + _value = value; + _isInitialized = true; + } + + /// + /// Builds an instance from the provided underlying type. + /// + /// The underlying type. + /// An instance of this type. + public static MyInt From(System.Int32 value) + { + + + + + + + MyInt instance = new MyInt(value); + + return instance; + } + + /// +/// Tries to build an instance from the provided underlying type. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, false will be returned. +/// +/// The underlying type. +/// An instance of the value object. +/// True if the value object can be built, otherwise false. +public static bool TryFrom(System.Int32 value, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt vo) +{ + + + + + + vo = new MyInt(value); + + return true; +}/// +/// Tries to build an instance from the provided underlying value. +/// If a normalization method is provided, it will be called. +/// If validation is provided, and it fails, an error will be returned. +/// +/// The primitive value. +/// A containing either the value object, or an error. +public static ValueObjectOrError TryFrom(System.Int32 value) +{ + + + + + + + return new ValueObjectOrError(new MyInt(value)); +} + + public bool IsInitialized() => _isInitialized; + + + // only called internally when something has been deserialized into + // its primitive type. + private static MyInt __Deserialize(System.Int32 value) + { + + + + + + + return new MyInt(value); + } + + public virtual global::System.Boolean Equals(MyInt other) + { + if (ReferenceEquals(null, other)) + { + return false; + } + + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; + + if (ReferenceEquals(this, other)) + { + return true; + } + + return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(MyInt other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } + + + public global::System.Boolean Equals(System.Int32 primitive) + { + return Value.Equals(primitive); + } + + + public static global::System.Boolean operator ==(MyInt left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(MyInt left, System.Int32 right) => !Equals(left.Value, right); + + public static global::System.Boolean operator ==(System.Int32 left, MyInt right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, MyInt right) => !Equals(left, right.Value); + + public static explicit operator MyInt(System.Int32 value) => From(value); + public static explicit operator System.Int32(MyInt value) => value.Value; + + public int CompareTo(MyInt other) => Value.CompareTo(other.Value); + public int CompareTo(object other) { + if(other is null) return 1; + if(other is MyInt x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyInt", nameof(other)); + } + + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, provider, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). + /// + public static global::System.Boolean TryParse(string s, +#if NETCOREAPP3_0_OR_GREATER +[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] +#endif + out MyInt result) { + if(System.Int32.TryParse(s, out var __v)) { + + + result = new MyInt(__v); + return true; + } + + result = default; + return false; + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(string s) { + var r = System.Int32.Parse(s); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); + return From(r); + } + + /// + /// + /// + /// + /// The value created via the method. + /// + /// Thrown when the value can be parsed, but is not valid. + public static MyInt Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); + return From(r); + } + + + + public override global::System.Int32 GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + global::System.Int32 hash = (global::System.Int32) 2166136261; + hash = (hash * 16777619) ^ GetType().GetHashCode(); + hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return hash; + } + } + + private void EnsureInitialized() + { + if (!_isInitialized) + { +#if DEBUG + global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; +#else + global::System.String message = "Use of uninitialized Value Object."; +#endif + + throw new global::Vogen.ValueObjectValidationException(message); + } + } + + + + + // record enumerates fields - we just want our Value and to throw if it's not initialized. + /// Returns the string representation of the underlying . + public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + + /// + /// Converts a MyInt to or from JSON. + /// + public class MyIntSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + public override MyInt Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { +#if NET5_0_OR_GREATER + return MyInt.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); +#else + return MyInt.__Deserialize(reader.GetInt32()); +#endif + } + + public override void Write(System.Text.Json.Utf8JsonWriter writer, MyInt value, global::System.Text.Json.JsonSerializerOptions options) + { + #if NET5_0_OR_GREATER + global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); + #else + writer.WriteNumberValue(value.Value); + #endif + } + +#if NET6_0_OR_GREATER + public override MyInt ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + { + return MyInt.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + } + + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyInt value, global::System.Text.Json.JsonSerializerOptions options) + { + writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); + } +#endif + } + + + class MyIntTypeConverter : global::System.ComponentModel.TypeConverter + { + public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + } + + public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) + { + return value switch + { + global::System.Int32 intValue => MyInt.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyInt.__Deserialize(result), + _ => base.ConvertFrom(context, culture, value), + }; + } + + public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) + { + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + } + + public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) + { + if (value is MyInt idValue) + { + if (destinationType == typeof(global::System.Int32)) + { + return idValue.Value; + } + + if (destinationType == typeof(global::System.String)) + { + return idValue.Value.ToString(); + } + } + + return base.ConvertTo(context, culture, value, destinationType); + } + } + + + + + + internal sealed class MyIntDebugView + { + private readonly MyInt _t; + + MyIntDebugView(MyInt t) + { + _t = t; + } + + public global::System.String UnderlyingType => "System.Int32"; + public System.Int32 Value => _t.Value ; + + public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyIntSystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(MyIntTypeConverter))] +"; + } + } + +} +] \ No newline at end of file From 69646a0f81ac56fd02229569b1a913ceece41b02 Mon Sep 17 00:00:00 2001 From: Steve Dunn Date: Wed, 19 Jun 2024 06:38:06 +0100 Subject: [PATCH 2/4] Fix EFCore code generation - make the target EFCoreConverters method have either internal or public. --- samples/Onion/Infra/EfCoreScenario.cs | 47 +- ...BuildEfCoreConverterSpecsFromAttributes.cs | 6 +- src/Vogen/EfCoreConverterSpec.cs | 6 + src/Vogen/EfCoreConverterSpecResult.cs | 28 +- src/Vogen/ManageAttributes.cs | 9 +- src/Vogen/WriteEfCoreSpecs.cs | 114 +- ...EscapedTypes_00f0de357be35a08.verified.txt | 42 + ...EscapedTypes_049e1105bdb5b16f.verified.txt | 42 + ...EscapedTypes_052e16fec4629741.verified.txt | 42 + ...EscapedTypes_0590614523929cc3.verified.txt | 42 + ...EscapedTypes_098b6dd0f897d9ff.verified.txt | 42 + ...EscapedTypes_0b2fc80039bc486f.verified.txt | 42 + ...EscapedTypes_0b7f903719aec0ae.verified.txt | 42 + ...EscapedTypes_0bcbcad90e27a604.verified.txt | 42 + ...EscapedTypes_0cbbf1c55e2ecb5f.verified.txt | 42 + ...EscapedTypes_0ce7ae6837856e5b.verified.txt | 42 + ...EscapedTypes_0e56e391c0ee11e4.verified.txt | 42 + ...EscapedTypes_0fc974512297a532.verified.txt | 42 + ...EscapedTypes_104a5ff05f0db967.verified.txt | 42 + ...EscapedTypes_11bee1513b16a9be.verified.txt | 42 + ...EscapedTypes_12959028f2a26baf.verified.txt | 42 + ...EscapedTypes_135c59118680f48e.verified.txt | 42 + ...EscapedTypes_13a859c74cc583d9.verified.txt | 42 + ...EscapedTypes_14fcaba0069c3471.verified.txt | 42 + ...EscapedTypes_154fdf2a505ad70f.verified.txt | 42 + ...EscapedTypes_1c2d156c8a03a890.verified.txt | 42 + ...EscapedTypes_2019586ce528e918.verified.txt | 42 + ...EscapedTypes_202d284430690bc3.verified.txt | 42 + ...EscapedTypes_220f74c7d3a85802.verified.txt | 42 + ...EscapedTypes_2761b27537f8291c.verified.txt | 42 + ...EscapedTypes_28954f7737bb1e3b.verified.txt | 42 + ...EscapedTypes_28be836f2ab033dc.verified.txt | 42 + ...EscapedTypes_291b6fd076c0e246.verified.txt | 42 + ...EscapedTypes_291d0bc9a252cc85.verified.txt | 42 + ...EscapedTypes_2b00d0498e1e2bea.verified.txt | 42 + ...EscapedTypes_2b2e0f2cc7937095.verified.txt | 42 + ...EscapedTypes_2c206cfd26ccddf4.verified.txt | 42 + ...EscapedTypes_2c64941008d821bf.verified.txt | 42 + ...EscapedTypes_2e6e70e587c2deee.verified.txt | 42 + ...EscapedTypes_3134c71ff591ca80.verified.txt | 42 + ...EscapedTypes_32d4ca4eaf410803.verified.txt | 42 + ...EscapedTypes_34994310a7dfcd4a.verified.txt | 42 + ...EscapedTypes_34ead07521566571.verified.txt | 42 + ...EscapedTypes_365592047b7d5a26.verified.txt | 42 + ...EscapedTypes_36ea7219461091f8.verified.txt | 42 + ...EscapedTypes_36ed836857ad1074.verified.txt | 42 + ...EscapedTypes_383a5e8d4338a7bb.verified.txt | 42 + ...EscapedTypes_392023cc6b8fb14b.verified.txt | 42 + ...EscapedTypes_39c3a97689cb51d7.verified.txt | 42 + ...EscapedTypes_39f9bf5950778f06.verified.txt | 42 + ...EscapedTypes_3eb68bb1fa630097.verified.txt | 42 + ...EscapedTypes_40f047adf1f3532b.verified.txt | 42 + ...EscapedTypes_4104d6b55e0a1cb9.verified.txt | 42 + ...EscapedTypes_419f5620f51f5005.verified.txt | 42 + ...EscapedTypes_42add94033693d2d.verified.txt | 42 + ...EscapedTypes_45781cab9ba25260.verified.txt | 42 + ...EscapedTypes_49f3ef6fe2097517.verified.txt | 42 + ...EscapedTypes_4a5a05131065420a.verified.txt | 42 + ...EscapedTypes_4a7513785f4cdd07.verified.txt | 42 + ...EscapedTypes_4b00975e163f6b86.verified.txt | 42 + ...EscapedTypes_50107e37b6c281f7.verified.txt | 42 + ...EscapedTypes_514a373485034698.verified.txt | 42 + ...EscapedTypes_530208c3e2dc0b18.verified.txt | 42 + ...EscapedTypes_54f6c6bc47a57718.verified.txt | 42 + ...EscapedTypes_55643e687d05cfc0.verified.txt | 42 + ...EscapedTypes_559541802660cc1e.verified.txt | 42 + ...EscapedTypes_567c13855e60ba86.verified.txt | 42 + ...EscapedTypes_56cdbdd02263713a.verified.txt | 42 + ...EscapedTypes_57b0dc74cdf7a3fc.verified.txt | 42 + ...EscapedTypes_58038a78fa49c898.verified.txt | 42 + ...EscapedTypes_5820ed23da537184.verified.txt | 42 + ...EscapedTypes_59cc456cc2129277.verified.txt | 42 + ...EscapedTypes_5aad9b299994231f.verified.txt | 42 + ...EscapedTypes_5b1ad911864ba3da.verified.txt | 42 + ...EscapedTypes_5c37d6801a14f2c1.verified.txt | 42 + ...EscapedTypes_5d4ce8aa9c41ec84.verified.txt | 42 + ...EscapedTypes_5e7994a6f879d7ce.verified.txt | 42 + ...EscapedTypes_5edbdb5eb793771b.verified.txt | 42 + ...EscapedTypes_5fb51b398500011d.verified.txt | 42 + ...EscapedTypes_5fe3a4da9d2800b4.verified.txt | 42 + ...EscapedTypes_60d02d7b8944ec5d.verified.txt | 42 + ...EscapedTypes_655c68b8972ec1f0.verified.txt | 42 + ...EscapedTypes_658b055b26454057.verified.txt | 42 + ...EscapedTypes_66aa605d729a3bb6.verified.txt | 42 + ...EscapedTypes_68b502d9cfbeaccf.verified.txt | 42 + ...EscapedTypes_6972d3ea4a6545ae.verified.txt | 42 + ...EscapedTypes_6983dde9000415aa.verified.txt | 42 + ...EscapedTypes_698bd164cfb9c4ce.verified.txt | 42 + ...EscapedTypes_6a70dfd519513c1f.verified.txt | 42 + ...EscapedTypes_6c4eba76ec5d1088.verified.txt | 42 + ...EscapedTypes_6c9f6f1768b14e62.verified.txt | 42 + ...EscapedTypes_6fa9b36dcc44f917.verified.txt | 42 + ...EscapedTypes_6fc3c4fff8f21f4b.verified.txt | 42 + ...EscapedTypes_6fdf702b98da6651.verified.txt | 42 + ...EscapedTypes_7154da464c57c9ad.verified.txt | 42 + ...EscapedTypes_768e4714a020767d.verified.txt | 42 + ...EscapedTypes_76e4ba2a03a54432.verified.txt | 42 + ...EscapedTypes_76fcc90c4238fccf.verified.txt | 42 + ...EscapedTypes_77b43a623684d39c.verified.txt | 42 + ...EscapedTypes_7a2076c9ed29e130.verified.txt | 42 + ...EscapedTypes_7a64bcd539d02a7c.verified.txt | 42 + ...EscapedTypes_7b85220c41b26579.verified.txt | 42 + ...EscapedTypes_7c3db125e2b5aa08.verified.txt | 42 + ...EscapedTypes_7c5366fdd9f5e24f.verified.txt | 42 + ...EscapedTypes_7cef0be2c9de225c.verified.txt | 42 + ...EscapedTypes_7d31c8f598d3d04e.verified.txt | 42 + ...EscapedTypes_7dd3502a913cc0be.verified.txt | 42 + ...EscapedTypes_837c6887223e61fe.verified.txt | 42 + ...EscapedTypes_84157b207efe4e39.verified.txt | 42 + ...EscapedTypes_845209a08faecfcc.verified.txt | 42 + ...EscapedTypes_861e9a0628940c67.verified.txt | 42 + ...EscapedTypes_8701acaae4a8b8f1.verified.txt | 42 + ...EscapedTypes_872ae19f3cc5d340.verified.txt | 42 + ...EscapedTypes_87c2d444a420d3ea.verified.txt | 42 + ...EscapedTypes_89debf17677b0ab1.verified.txt | 42 + ...EscapedTypes_8d28a64726c90f03.verified.txt | 42 + ...EscapedTypes_8e556a0e181055d2.verified.txt | 42 + ...EscapedTypes_8ffe3d100bd190b6.verified.txt | 42 + ...EscapedTypes_912b1bb466ce89e1.verified.txt | 42 + ...EscapedTypes_92272c4111559756.verified.txt | 42 + ...EscapedTypes_923d218668d9099a.verified.txt | 42 + ...EscapedTypes_95733862f544af43.verified.txt | 42 + ...EscapedTypes_96135dc4bcf54d2b.verified.txt | 42 + ...EscapedTypes_9995b33a722d5621.verified.txt | 42 + ...EscapedTypes_99ed2d8a7af7c322.verified.txt | 42 + ...EscapedTypes_9a0e1c590d3ebd3b.verified.txt | 42 + ...EscapedTypes_9b38eefdbaafb0a5.verified.txt | 42 + ...EscapedTypes_9b80372401082da7.verified.txt | 42 + ...EscapedTypes_9b926e43df789556.verified.txt | 42 + ...EscapedTypes_9c3cdb75db1f84c7.verified.txt | 42 + ...EscapedTypes_9c55fb544d498ed1.verified.txt | 42 + ...EscapedTypes_9dc25d08b78337e0.verified.txt | 42 + ...EscapedTypes_9edf75aa18e466ac.verified.txt | 42 + ...EscapedTypes_9f95f94f07a018bc.verified.txt | 42 + ...EscapedTypes_a0e6609507fce982.verified.txt | 42 + ...EscapedTypes_a2c530119d8a204e.verified.txt | 42 + ...EscapedTypes_a359e9efe1aa826c.verified.txt | 42 + ...EscapedTypes_a410b05ac7f073f8.verified.txt | 42 + ...EscapedTypes_a575815cef8c1341.verified.txt | 42 + ...EscapedTypes_a5bc5714811aac66.verified.txt | 42 + ...EscapedTypes_a6778febf60f35cb.verified.txt | 42 + ...EscapedTypes_a72ed016f540f3e5.verified.txt | 42 + ...EscapedTypes_a7cbf9d3b7dbba8f.verified.txt | 42 + ...EscapedTypes_a86791e3a97daabc.verified.txt | 42 + ...EscapedTypes_a8d09ae5f3ed1675.verified.txt | 42 + ...EscapedTypes_ac22f436dda4f72a.verified.txt | 42 + ...EscapedTypes_ad1a3689ed3c418f.verified.txt | 42 + ...EscapedTypes_ae319bbc936a946d.verified.txt | 42 + ...EscapedTypes_aec8592ffdf1fdd4.verified.txt | 42 + ...EscapedTypes_aed2c28062246796.verified.txt | 42 + ...EscapedTypes_affaac1393a5dbeb.verified.txt | 42 + ...EscapedTypes_b0214b8897241926.verified.txt | 42 + ...EscapedTypes_b07372acbe7b784d.verified.txt | 42 + ...EscapedTypes_b1173c52d299b220.verified.txt | 42 + ...EscapedTypes_b1d736c2e00cc0f2.verified.txt | 42 + ...EscapedTypes_b3df095c06c8dc2a.verified.txt | 42 + ...EscapedTypes_b4bf1d9a579f0d54.verified.txt | 42 + ...EscapedTypes_b5b124a9900bc123.verified.txt | 42 + ...EscapedTypes_b5d3f777ebd806d7.verified.txt | 42 + ...EscapedTypes_b643b795dcbab422.verified.txt | 42 + ...EscapedTypes_b7d403c82ba63992.verified.txt | 42 + ...EscapedTypes_b8834e0d8c0a7d1a.verified.txt | 42 + ...EscapedTypes_ba76c308aba91a6b.verified.txt | 42 + ...EscapedTypes_bb32723f73578e2f.verified.txt | 42 + ...EscapedTypes_bc48197e16e11cff.verified.txt | 42 + ...EscapedTypes_c11a49a245573020.verified.txt | 42 + ...EscapedTypes_c19b0d0af9db430d.verified.txt | 42 + ...EscapedTypes_c3ce74c46dcdcc12.verified.txt | 42 + ...EscapedTypes_c4d92e574fe04430.verified.txt | 42 + ...EscapedTypes_c582a1bbca9b6853.verified.txt | 42 + ...EscapedTypes_c595ab4ebac76a83.verified.txt | 42 + ...EscapedTypes_c5c017cc376093a8.verified.txt | 42 + ...EscapedTypes_cde6136eb635fcca.verified.txt | 42 + ...EscapedTypes_ce6f86880328babd.verified.txt | 42 + ...EscapedTypes_ce9a45e95087de82.verified.txt | 42 + ...EscapedTypes_cf872c78c03f743e.verified.txt | 42 + ...EscapedTypes_d11a2cb3500bd652.verified.txt | 42 + ...EscapedTypes_d161ce7be9b82eac.verified.txt | 42 + ...EscapedTypes_d1b0204416c2be2b.verified.txt | 42 + ...EscapedTypes_d1d290471740b346.verified.txt | 42 + ...EscapedTypes_d20c19887f82465f.verified.txt | 42 + ...EscapedTypes_d26d343b5d99ac82.verified.txt | 42 + ...EscapedTypes_d2d28f4648bb382a.verified.txt | 42 + ...EscapedTypes_d40f38803a496eb1.verified.txt | 42 + ...EscapedTypes_d47765eafe36b769.verified.txt | 42 + ...EscapedTypes_d5597a9e0669d828.verified.txt | 42 + ...EscapedTypes_d682d2491abae2f5.verified.txt | 42 + ...EscapedTypes_d6c2f5a672e0986a.verified.txt | 42 + ...EscapedTypes_d87695b2c62eb858.verified.txt | 42 + ...EscapedTypes_db1e773c05fc2bd6.verified.txt | 42 + ...EscapedTypes_db9fbc55f74b632c.verified.txt | 42 + ...EscapedTypes_dd12025652160002.verified.txt | 42 + ...EscapedTypes_ddaf1496f6dff47b.verified.txt | 42 + ...EscapedTypes_debf2d08228c151e.verified.txt | 42 + ...EscapedTypes_e009ee077abcb511.verified.txt | 42 + ...EscapedTypes_e292c8e523c94d1d.verified.txt | 42 + ...EscapedTypes_e44b08cd14704023.verified.txt | 42 + ...EscapedTypes_e52c2b386e46146f.verified.txt | 42 + ...EscapedTypes_e5e444f1a2061cef.verified.txt | 42 + ...EscapedTypes_e74f2367a1f05be8.verified.txt | 42 + ...EscapedTypes_e933201f374e2884.verified.txt | 42 + ...EscapedTypes_ea9b1d3c50f164d5.verified.txt | 42 + ...EscapedTypes_eac1116bb9ee271b.verified.txt | 42 + ...EscapedTypes_ebd557cbdb9ce19a.verified.txt | 42 + ...EscapedTypes_ecba4ff8b0c68c7c.verified.txt | 42 + ...EscapedTypes_edb0ce159df119ba.verified.txt | 42 + ...EscapedTypes_ee572359c8b6cbca.verified.txt | 42 + ...EscapedTypes_f480b93b6767cae7.verified.txt | 42 + ...EscapedTypes_f61fd3251a43bf0f.verified.txt | 42 + ...EscapedTypes_f87538e4fc21065e.verified.txt | 42 + ...EscapedTypes_fae889c1ae954e1c.verified.txt | 42 + ...EscapedTypes_fc17d08f1c5b8939.verified.txt | 42 + ...EscapedTypes_fc7381c65f43fcd7.verified.txt | 42 + ...EscapedTypes_fdf47643aed6e936.verified.txt | 42 + ...EscapedTypes_fec5b685544eecd8.verified.txt | 42 + ...EscapedTypes_ff613f675ddb935a.verified.txt | 42 + ...eConverters.MixtureOfKeywords.verified.txt | 87 + .../GeneralStuff/GeneralTests.cs | 49 + ...esent_and_on_net_8_or_greater.verified.txt | 5329 ++--------------- ...rters_that_respect_namespaces.verified.txt | 84 + 220 files changed, 9711 insertions(+), 4868 deletions(-) diff --git a/samples/Onion/Infra/EfCoreScenario.cs b/samples/Onion/Infra/EfCoreScenario.cs index 01ce961683..2b433b3b81 100644 --- a/samples/Onion/Infra/EfCoreScenario.cs +++ b/samples/Onion/Infra/EfCoreScenario.cs @@ -7,27 +7,27 @@ namespace UsingTypesGeneratedInTheSameProject; /* - * In this scenario, we want to use the System.Text.Json converters - * for the value objects that were generated by Vogen in this project. + * In this scenario, we want to use the EFCore value converters and comparers + * for the value objects that were generated by Vogen in the Domain project. * - * We create a `Supplier` which contains value objects, we serialize it to a string, - * and we deserialize back into an Order. + * We create an `EfCoreConverters` class, and decorate it with attributes, where each attribute says which value object should have + * a converter generated for it. * - * We use the `SupplierGenerationContext` below and tell it about `Supplier`. It then goes through its properties - * and builds a mapping of converters. - * - * **NOTE** - because the value objects WERE BUILT IN THIS PROJECT, they are not 'fully formed', so we need to - * tell System.Text.Json to use the 'type factory' that Vogen generates (Infra.VogenTypesFactory) to get its hints about - * mapping types to converters. + * Then, we have two ways of registering all of these converters; + * 1. override `ConfigureConventions` and call `RegisterAllInEfCoreConverters` + * 2. call `HasVogenConversion` in `OnModelCreating`. */ +// By having this partial class, Vogen will generate converters for each value object mentioned in the attributes. +// The naming of this class is later used to get the converters, or for when registering them via the generated extension +// methods like `RegisterAllInEfCoreConverters` or `HasVogenConversion` [EfCoreConverter] [EfCoreConverter] [EfCoreConverter] [EfCoreConverter] [EfCoreConverter] -public partial class EfCoreConverters; +internal sealed partial class EfCoreConverters; public static class EfCoreScenario { @@ -82,23 +82,34 @@ internal class DbContext : Microsoft.EntityFrameworkCore.DbContext // return Math.Max(maxLocalId, maxSavedId) + 1; // } + protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) + { + base.ConfigureConventions(configurationBuilder); + + // There are two ways of registering these, you can call the generated extension method here, + // or register the converters individually, like below in `OnModelCreating`. + configurationBuilder.RegisterAllInEfCoreConverters(); + } + protected override void OnModelCreating(ModelBuilder builder) { builder.Entity(b => { b.HasKey(x => x.Id); b.Property(e => e.Id).HasValueGenerator(); - b.Property(e => e.Id).HasVogenConversion(); - b.Property(e => e.Name).HasVogenConversion(); - b.Property(e => e.Department).HasVogenConversion(); - b.Property(e => e.HireDate).HasVogenConversion(); + + // There are two ways of registering these, you can do them inline here, + // or with the `RegisterAllIn[xxx]` like above in `ConfigureConventions` + + // b.Property(e => e.Id).HasVogenConversion(); + // b.Property(e => e.Name).HasVogenConversion(); + // b.Property(e => e.Department).HasVogenConversion(); + // b.Property(e => e.HireDate).HasVogenConversion(); }); } - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) => optionsBuilder.UseInMemoryDatabase("SomeDB"); - } } internal class SomeIdValueGenerator : ValueGenerator diff --git a/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs b/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs index 76c1e5203a..3624f27565 100644 --- a/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs +++ b/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs @@ -11,7 +11,7 @@ namespace Vogen; internal static class BuildEfCoreConverterSpecsFromAttributes { - public static EfCoreConverterSpecResult? TryBuild(AttributeData att, INamedTypeSymbol? symbol) + public static EfCoreConverterSpecResult? TryBuild(AttributeData att, in INamedTypeSymbol? sourceSymbol) { ImmutableArray args = att.ConstructorArguments; @@ -37,7 +37,7 @@ internal static class BuildEfCoreConverterSpecsFromAttributes if (!VoFilter.IsTarget(voSymbol)) { - return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.EfCoreTargetMustBeAVo(symbol!, voSymbol)); + return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.EfCoreTargetMustBeAVo(sourceSymbol!, voSymbol)); } List attrs = VoFilter.TryGetValueObjectAttributes(voSymbol).ToList(); @@ -59,7 +59,7 @@ internal static class BuildEfCoreConverterSpecsFromAttributes return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.VoMustExplicitlySpecifyPrimitiveToBeAnEfCoreTarget(voSymbol)); } - return EfCoreConverterSpecResult.Ok(voSymbol, underlyingType, symbol!); + return EfCoreConverterSpecResult.Ok(voSymbol, underlyingType, sourceSymbol!); } private static INamedTypeSymbol? ResolveUnderlyingType(INamedTypeSymbol method) diff --git a/src/Vogen/EfCoreConverterSpec.cs b/src/Vogen/EfCoreConverterSpec.cs index e4144f9b5a..37ff82b97b 100644 --- a/src/Vogen/EfCoreConverterSpec.cs +++ b/src/Vogen/EfCoreConverterSpec.cs @@ -2,4 +2,10 @@ namespace Vogen; +/// +/// Represents an instance of an EfCoreConverter attribute on the source method. +/// +/// The symbol for the value object being referenced. In effect, the generic value of the attribute. +/// The symbol for the underlying type that is represented by the value object. +/// The symbol for the method that contains the `EfCoreConverter` attribute(s). internal record class EfCoreConverterSpec(INamedTypeSymbol VoSymbol, INamedTypeSymbol UnderlyingType, INamedTypeSymbol SourceType); \ No newline at end of file diff --git a/src/Vogen/EfCoreConverterSpecResult.cs b/src/Vogen/EfCoreConverterSpecResult.cs index 46b557972b..a1db8cbb42 100644 --- a/src/Vogen/EfCoreConverterSpecResult.cs +++ b/src/Vogen/EfCoreConverterSpecResult.cs @@ -4,9 +4,19 @@ namespace Vogen; +/// +/// Represents a collection of results that are all associated with the same source symbol (that is, +/// the method containing the `EfCoreConverter` attributes. +/// internal sealed class EfCoreConverterSpecResults { - public EfCoreConverterSpecResults(IEnumerable results) => Results = results.Where(r => r is not null)!; + public INamedTypeSymbol? SourceSymbol { get; } + + public EfCoreConverterSpecResults(INamedTypeSymbol? sourceSymbol, IEnumerable results) + { + SourceSymbol = sourceSymbol; + Results = results.Where(r => r is not null)!; + } private IEnumerable Results { get; } @@ -14,22 +24,26 @@ internal sealed class EfCoreConverterSpecResults public IEnumerable Specs => Results; } +/// +/// Represents the result of an 'EFCore Converter Spec' - that is, a partial class decorated with an `EfCoreConverter<>` +/// attribute. This is the singular item; a particular attribute on the method, and contains the symbol for the +/// value object being references, a symbol for the underlying type of the value object, and a symbol for the method +/// containing the attribute. +/// internal sealed class EfCoreConverterSpecResult { public EfCoreConverterSpecResult(EfCoreConverterSpec? spec, IEnumerable diagnostics) { - Specs = spec; + Spec = spec; Diagnostics = diagnostics.ToList(); } - public EfCoreConverterSpec? Specs { get; } + public EfCoreConverterSpec? Spec { get; } public List Diagnostics { get; } - public bool HasDiagnostics => Diagnostics.Any(); - public static EfCoreConverterSpecResult Error(Diagnostic diag) => new(null, [diag]); - public static EfCoreConverterSpecResult Ok(INamedTypeSymbol voSymbol, INamedTypeSymbol underlyingType, INamedTypeSymbol symbol) => - new(spec: new EfCoreConverterSpec(voSymbol, underlyingType, symbol), diagnostics: []); + public static EfCoreConverterSpecResult Ok(INamedTypeSymbol voSymbol, INamedTypeSymbol underlyingTypeSymbol, INamedTypeSymbol sourceSymbol) => + new(spec: new EfCoreConverterSpec(voSymbol, underlyingTypeSymbol, sourceSymbol), diagnostics: []); } \ No newline at end of file diff --git a/src/Vogen/ManageAttributes.cs b/src/Vogen/ManageAttributes.cs index cae914b8bc..6ccb5d9f78 100644 --- a/src/Vogen/ManageAttributes.cs +++ b/src/Vogen/ManageAttributes.cs @@ -34,14 +34,15 @@ public static VogenConfigurationBuildResult GetDefaultConfigFromGlobalAttribute( public static EfCoreConverterSpecResults GetEfCoreConverterSpecFromAttribute(GeneratorAttributeSyntaxContext ctx) { INamedTypeSymbol? symbol = ctx.TargetSymbol as INamedTypeSymbol; - var assemblyAttributes = ctx.Attributes; - if (assemblyAttributes.IsDefaultOrEmpty) + var attrs = ctx.Attributes; + + if (attrs.IsDefaultOrEmpty) { - return new EfCoreConverterSpecResults([]); + return new EfCoreConverterSpecResults(symbol, []); } - return new EfCoreConverterSpecResults(assemblyAttributes.Select(a => BuildEfCoreConverterSpecsFromAttributes.TryBuild(a, symbol))); + return new EfCoreConverterSpecResults(symbol, attrs.Select(a => BuildEfCoreConverterSpecsFromAttributes.TryBuild(a, symbol))); } /// diff --git a/src/Vogen/WriteEfCoreSpecs.cs b/src/Vogen/WriteEfCoreSpecs.cs index 28884f2aed..8793367735 100644 --- a/src/Vogen/WriteEfCoreSpecs.cs +++ b/src/Vogen/WriteEfCoreSpecs.cs @@ -16,8 +16,11 @@ public static void WriteIfNeeded(SourceProductionContext context, Compilation co { return; } - foreach (var eachSpecs in convertSpecs) + + foreach (EfCoreConverterSpecResults? eachSpecs in convertSpecs) { + WriteEncompassingExtensionMethod(eachSpecs, context); + foreach (var eachSpec in eachSpecs.Specs) { WriteEachIfNeeded(context, eachSpec); @@ -25,9 +28,103 @@ public static void WriteIfNeeded(SourceProductionContext context, Compilation co } } + private static void WriteEncompassingExtensionMethod(EfCoreConverterSpecResults resultsParticularMethod, SourceProductionContext context) + { + var sourceSymbol = resultsParticularMethod.SourceSymbol; + if (sourceSymbol is null) + { + return; + } + + var fullNamespace = sourceSymbol.FullNamespace(); + + var isPublic = sourceSymbol.DeclaredAccessibility.HasFlag(Accessibility.Public); + var accessor = isPublic ? "public" : "internal"; + + var ns = string.IsNullOrEmpty(fullNamespace) ? string.Empty : $"namespace {fullNamespace};"; + + string allCalls = GenerateBody(); + + string sb = + $$""" + #if NET8_0_OR_GREATER + + {{GeneratedCodeSegments.Preamble}} + + {{ns}} + + {{accessor}} static class {{sourceSymbol.Name}}__Ext + { + {{accessor}} static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllIn{{sourceSymbol.Name}}(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + {{allCalls}} + + return configurationBuilder; + } + } + + #endif + """; + + SourceText sourceText = SourceText.From(sb, Encoding.UTF8); + + var unsanitized = $"{sourceSymbol.ToDisplayString()}.g.cs"; + + string filename = sanitizeToALegalFilename(unsanitized); + + tryWriteUsingUniqueFilename(); + + static string sanitizeToALegalFilename(string input) + { + return input.Replace('@', '_'); + } + + void tryWriteUsingUniqueFilename() + { + int count = 0; + string hintName = filename; + + while (true) + { + try + { + context.AddSource(hintName, sourceText); + return; + } + catch(ArgumentException) + { + if (++count >= 10) + { + throw; + } + + hintName = $"{count}{filename}"; + } + } + } + + string GenerateBody() + { + StringBuilder sb2 = new StringBuilder(); + + foreach (EfCoreConverterSpecResult eachSpec in resultsParticularMethod.Specs) + { + if (eachSpec.Spec is null) + { + continue; + } + + var voSymbol = eachSpec.Spec.VoSymbol; + sb2.AppendLine($$"""configurationBuilder.Properties<{{voSymbol.FullName()}}>().HaveConversion<{{resultsParticularMethod.SourceSymbol.FullName()}}.{{voSymbol.Name}}EfCoreValueConverter, {{resultsParticularMethod.SourceSymbol.FullName()}}.{{voSymbol.Name}}EfCoreValueComparer>();"""); + } + + return sb2.ToString(); + } + } + private static void WriteEachIfNeeded(SourceProductionContext context, EfCoreConverterSpecResult specResult) { - var spec = specResult.Specs; + var spec = specResult.Spec; if (spec is null) { @@ -36,15 +133,24 @@ private static void WriteEachIfNeeded(SourceProductionContext context, EfCoreCon var body = GenerateEfCoreTypes.GenerateOuter(spec.UnderlyingType, spec.VoSymbol.IsValueType, spec.VoSymbol); var extensionMethod = GenerateEfCoreTypes.GenerateOuterExtensionMethod(spec); + + var fullNamespace = spec.SourceType.FullNamespace(); + + var isPublic = spec.SourceType.DeclaredAccessibility.HasFlag(Accessibility.Public); + var accessor = isPublic ? "public" : "internal"; + + var ns = string.IsNullOrEmpty(fullNamespace) ? string.Empty : $"namespace {fullNamespace};"; + + string sb = $$""" #if NET8_0_OR_GREATER {{GeneratedCodeSegments.Preamble}} -namespace {{spec.SourceType.FullNamespace()}}; +{{ns}} -public partial class {{spec.SourceType.Name}} +{{accessor}} partial class {{spec.SourceType.Name}} { {{body}} } diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_00f0de357be35a08.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_00f0de357be35a08.verified.txt index 757d33fe72..29a8310f48 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_00f0de357be35a08.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_00f0de357be35a08.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_049e1105bdb5b16f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_049e1105bdb5b16f.verified.txt index a01367902e..c8f8cf55b4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_049e1105bdb5b16f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_049e1105bdb5b16f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_052e16fec4629741.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_052e16fec4629741.verified.txt index 158d0804d8..00b2b56a15 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_052e16fec4629741.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_052e16fec4629741.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0590614523929cc3.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0590614523929cc3.verified.txt index 26cfbed9ab..806c6b866e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0590614523929cc3.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0590614523929cc3.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_098b6dd0f897d9ff.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_098b6dd0f897d9ff.verified.txt index 3025616486..047354817d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_098b6dd0f897d9ff.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_098b6dd0f897d9ff.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b2fc80039bc486f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b2fc80039bc486f.verified.txt index 3f62c3bcaf..25e9bed6dc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b2fc80039bc486f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b2fc80039bc486f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b7f903719aec0ae.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b7f903719aec0ae.verified.txt index ac29da8800..243925403e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b7f903719aec0ae.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0b7f903719aec0ae.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0bcbcad90e27a604.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0bcbcad90e27a604.verified.txt index 09f66e3eba..ecbf7c513e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0bcbcad90e27a604.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0bcbcad90e27a604.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0cbbf1c55e2ecb5f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0cbbf1c55e2ecb5f.verified.txt index 6a3d3834fb..350b1ee25b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0cbbf1c55e2ecb5f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0cbbf1c55e2ecb5f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0ce7ae6837856e5b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0ce7ae6837856e5b.verified.txt index eda5c2308e..ffd72f95ec 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0ce7ae6837856e5b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0ce7ae6837856e5b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0e56e391c0ee11e4.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0e56e391c0ee11e4.verified.txt index da72c41468..f636410c67 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0e56e391c0ee11e4.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0e56e391c0ee11e4.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0fc974512297a532.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0fc974512297a532.verified.txt index d8287e4264..271a8a2b28 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0fc974512297a532.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_0fc974512297a532.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_104a5ff05f0db967.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_104a5ff05f0db967.verified.txt index f2e02caa7a..06c5f4e11b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_104a5ff05f0db967.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_104a5ff05f0db967.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_11bee1513b16a9be.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_11bee1513b16a9be.verified.txt index ad6dbcef4d..37b0bbb27f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_11bee1513b16a9be.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_11bee1513b16a9be.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_12959028f2a26baf.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_12959028f2a26baf.verified.txt index c6eb932375..61c4b5c564 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_12959028f2a26baf.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_12959028f2a26baf.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_135c59118680f48e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_135c59118680f48e.verified.txt index c05f32987d..487fa33b20 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_135c59118680f48e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_135c59118680f48e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_13a859c74cc583d9.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_13a859c74cc583d9.verified.txt index 90e2faaecd..20aded2e2e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_13a859c74cc583d9.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_13a859c74cc583d9.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_14fcaba0069c3471.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_14fcaba0069c3471.verified.txt index d6d174bdbc..57d0686e60 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_14fcaba0069c3471.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_14fcaba0069c3471.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_154fdf2a505ad70f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_154fdf2a505ad70f.verified.txt index 0da700bf50..1c3333f0cd 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_154fdf2a505ad70f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_154fdf2a505ad70f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_1c2d156c8a03a890.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_1c2d156c8a03a890.verified.txt index 9adb772bb5..9cb115bb79 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_1c2d156c8a03a890.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_1c2d156c8a03a890.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2019586ce528e918.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2019586ce528e918.verified.txt index 86764b11c0..4f88b91d79 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2019586ce528e918.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2019586ce528e918.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_202d284430690bc3.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_202d284430690bc3.verified.txt index 2cc82d6fc6..0309789c1f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_202d284430690bc3.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_202d284430690bc3.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_220f74c7d3a85802.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_220f74c7d3a85802.verified.txt index 7b710b0283..50c5012780 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_220f74c7d3a85802.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_220f74c7d3a85802.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2761b27537f8291c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2761b27537f8291c.verified.txt index 58f684741f..408c716844 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2761b27537f8291c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2761b27537f8291c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28954f7737bb1e3b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28954f7737bb1e3b.verified.txt index db5678c6dd..b4b5da4593 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28954f7737bb1e3b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28954f7737bb1e3b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28be836f2ab033dc.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28be836f2ab033dc.verified.txt index bf18c24ac1..a1c4ebb861 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28be836f2ab033dc.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_28be836f2ab033dc.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291b6fd076c0e246.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291b6fd076c0e246.verified.txt index 9376513992..ccbc0e1e94 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291b6fd076c0e246.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291b6fd076c0e246.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291d0bc9a252cc85.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291d0bc9a252cc85.verified.txt index dcfcdba1dc..d07e5f746d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291d0bc9a252cc85.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_291d0bc9a252cc85.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b00d0498e1e2bea.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b00d0498e1e2bea.verified.txt index 749c14225b..86fe1b7a05 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b00d0498e1e2bea.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b00d0498e1e2bea.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b2e0f2cc7937095.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b2e0f2cc7937095.verified.txt index ec34034a28..167e67363b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b2e0f2cc7937095.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2b2e0f2cc7937095.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c206cfd26ccddf4.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c206cfd26ccddf4.verified.txt index 55f02f1942..421ba513a0 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c206cfd26ccddf4.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c206cfd26ccddf4.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c64941008d821bf.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c64941008d821bf.verified.txt index fef29e2727..7550ce0156 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c64941008d821bf.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2c64941008d821bf.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2e6e70e587c2deee.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2e6e70e587c2deee.verified.txt index 708d01f891..b271cff56c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2e6e70e587c2deee.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_2e6e70e587c2deee.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3134c71ff591ca80.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3134c71ff591ca80.verified.txt index 5d317f7332..ffa010bf3b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3134c71ff591ca80.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3134c71ff591ca80.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_32d4ca4eaf410803.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_32d4ca4eaf410803.verified.txt index 344abfd185..dee639b31e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_32d4ca4eaf410803.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_32d4ca4eaf410803.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34994310a7dfcd4a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34994310a7dfcd4a.verified.txt index 31a260d0d0..113b1253f2 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34994310a7dfcd4a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34994310a7dfcd4a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34ead07521566571.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34ead07521566571.verified.txt index 67b11a2908..a4b9c2c64f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34ead07521566571.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_34ead07521566571.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_365592047b7d5a26.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_365592047b7d5a26.verified.txt index f86bfd859b..028256f70a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_365592047b7d5a26.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_365592047b7d5a26.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ea7219461091f8.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ea7219461091f8.verified.txt index 33e8761e67..ec013a4d54 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ea7219461091f8.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ea7219461091f8.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ed836857ad1074.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ed836857ad1074.verified.txt index db85b75ccb..59e7ced833 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ed836857ad1074.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_36ed836857ad1074.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_383a5e8d4338a7bb.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_383a5e8d4338a7bb.verified.txt index ec7cdf1420..92bcb85805 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_383a5e8d4338a7bb.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_383a5e8d4338a7bb.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_392023cc6b8fb14b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_392023cc6b8fb14b.verified.txt index a243f76c7e..c2e279d454 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_392023cc6b8fb14b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_392023cc6b8fb14b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39c3a97689cb51d7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39c3a97689cb51d7.verified.txt index c81be95f97..268dd30137 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39c3a97689cb51d7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39c3a97689cb51d7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39f9bf5950778f06.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39f9bf5950778f06.verified.txt index f88ec7107d..91a4be8a59 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39f9bf5950778f06.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_39f9bf5950778f06.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3eb68bb1fa630097.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3eb68bb1fa630097.verified.txt index a3b925b8f1..8e6d147aed 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3eb68bb1fa630097.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_3eb68bb1fa630097.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_40f047adf1f3532b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_40f047adf1f3532b.verified.txt index 50c0da5d25..65039c9d52 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_40f047adf1f3532b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_40f047adf1f3532b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4104d6b55e0a1cb9.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4104d6b55e0a1cb9.verified.txt index 5e8ae6ef77..0d04ab83cc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4104d6b55e0a1cb9.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4104d6b55e0a1cb9.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_419f5620f51f5005.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_419f5620f51f5005.verified.txt index dd3c008800..47203d08cd 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_419f5620f51f5005.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_419f5620f51f5005.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_42add94033693d2d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_42add94033693d2d.verified.txt index e96a6488f6..23e5a63be7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_42add94033693d2d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_42add94033693d2d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_45781cab9ba25260.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_45781cab9ba25260.verified.txt index c9483e03f9..78fb2a9858 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_45781cab9ba25260.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_45781cab9ba25260.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_49f3ef6fe2097517.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_49f3ef6fe2097517.verified.txt index 00bb5acb64..2ff5265110 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_49f3ef6fe2097517.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_49f3ef6fe2097517.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a5a05131065420a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a5a05131065420a.verified.txt index a10cd53804..3e0de29fc7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a5a05131065420a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a5a05131065420a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a7513785f4cdd07.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a7513785f4cdd07.verified.txt index f1a8fef36b..4807629213 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a7513785f4cdd07.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4a7513785f4cdd07.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4b00975e163f6b86.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4b00975e163f6b86.verified.txt index b5a55942c9..781230102f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4b00975e163f6b86.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_4b00975e163f6b86.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_50107e37b6c281f7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_50107e37b6c281f7.verified.txt index 43652d802d..64c07eb084 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_50107e37b6c281f7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_50107e37b6c281f7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_514a373485034698.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_514a373485034698.verified.txt index edfd5c42fd..8a74db583c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_514a373485034698.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_514a373485034698.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_530208c3e2dc0b18.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_530208c3e2dc0b18.verified.txt index fc6797fbcb..53670f9168 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_530208c3e2dc0b18.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_530208c3e2dc0b18.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_54f6c6bc47a57718.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_54f6c6bc47a57718.verified.txt index 4683298b24..8b23dd0b3b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_54f6c6bc47a57718.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_54f6c6bc47a57718.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_55643e687d05cfc0.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_55643e687d05cfc0.verified.txt index d6a41f0a12..7f946de7c0 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_55643e687d05cfc0.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_55643e687d05cfc0.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_559541802660cc1e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_559541802660cc1e.verified.txt index 3a8c972783..c26ab0dd5c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_559541802660cc1e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_559541802660cc1e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_567c13855e60ba86.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_567c13855e60ba86.verified.txt index 29001781cc..9409a76018 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_567c13855e60ba86.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_567c13855e60ba86.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_56cdbdd02263713a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_56cdbdd02263713a.verified.txt index f5d6fcc1c8..14e7fb3cc6 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_56cdbdd02263713a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_56cdbdd02263713a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_57b0dc74cdf7a3fc.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_57b0dc74cdf7a3fc.verified.txt index eadc017f87..a2167d8329 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_57b0dc74cdf7a3fc.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_57b0dc74cdf7a3fc.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_58038a78fa49c898.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_58038a78fa49c898.verified.txt index 064ede2200..b00d44490a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_58038a78fa49c898.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_58038a78fa49c898.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5820ed23da537184.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5820ed23da537184.verified.txt index 009dff362a..6db75245a1 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5820ed23da537184.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5820ed23da537184.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_59cc456cc2129277.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_59cc456cc2129277.verified.txt index 5c027653d3..97fdb32c62 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_59cc456cc2129277.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_59cc456cc2129277.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5aad9b299994231f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5aad9b299994231f.verified.txt index d70224eac6..dcf63d3bdc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5aad9b299994231f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5aad9b299994231f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5b1ad911864ba3da.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5b1ad911864ba3da.verified.txt index a787306e0f..1f838326de 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5b1ad911864ba3da.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5b1ad911864ba3da.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5c37d6801a14f2c1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5c37d6801a14f2c1.verified.txt index 23b3440aee..cbaafeb47b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5c37d6801a14f2c1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5c37d6801a14f2c1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5d4ce8aa9c41ec84.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5d4ce8aa9c41ec84.verified.txt index f16269823d..91be544dc8 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5d4ce8aa9c41ec84.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5d4ce8aa9c41ec84.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5e7994a6f879d7ce.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5e7994a6f879d7ce.verified.txt index 99995e624f..f999b49bd7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5e7994a6f879d7ce.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5e7994a6f879d7ce.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5edbdb5eb793771b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5edbdb5eb793771b.verified.txt index 89727675ac..9ca9d12f12 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5edbdb5eb793771b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5edbdb5eb793771b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fb51b398500011d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fb51b398500011d.verified.txt index 65c359d978..1da8b3dedc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fb51b398500011d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fb51b398500011d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fe3a4da9d2800b4.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fe3a4da9d2800b4.verified.txt index e1ef7af5da..8fcdad2e6f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fe3a4da9d2800b4.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_5fe3a4da9d2800b4.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_60d02d7b8944ec5d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_60d02d7b8944ec5d.verified.txt index e1f8815fa9..6f258ffcc4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_60d02d7b8944ec5d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_60d02d7b8944ec5d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_655c68b8972ec1f0.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_655c68b8972ec1f0.verified.txt index 533cf1d7a6..bc0cdc4b57 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_655c68b8972ec1f0.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_655c68b8972ec1f0.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_658b055b26454057.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_658b055b26454057.verified.txt index 87ed73464b..ccb2e83e42 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_658b055b26454057.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_658b055b26454057.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_66aa605d729a3bb6.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_66aa605d729a3bb6.verified.txt index 85165e64e1..e8ca6e7bed 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_66aa605d729a3bb6.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_66aa605d729a3bb6.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_68b502d9cfbeaccf.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_68b502d9cfbeaccf.verified.txt index 945c166239..43b861366b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_68b502d9cfbeaccf.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_68b502d9cfbeaccf.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6972d3ea4a6545ae.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6972d3ea4a6545ae.verified.txt index 35545c1124..9aa4f1cf42 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6972d3ea4a6545ae.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6972d3ea4a6545ae.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6983dde9000415aa.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6983dde9000415aa.verified.txt index c02be632ba..92db445ede 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6983dde9000415aa.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6983dde9000415aa.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_698bd164cfb9c4ce.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_698bd164cfb9c4ce.verified.txt index 760d20bbee..c2d868a715 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_698bd164cfb9c4ce.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_698bd164cfb9c4ce.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6a70dfd519513c1f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6a70dfd519513c1f.verified.txt index 9cc372b773..fe44044659 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6a70dfd519513c1f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6a70dfd519513c1f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c4eba76ec5d1088.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c4eba76ec5d1088.verified.txt index fcd52f56d0..19ccf50368 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c4eba76ec5d1088.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c4eba76ec5d1088.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c9f6f1768b14e62.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c9f6f1768b14e62.verified.txt index 8d4ccacb93..e945e5f3c8 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c9f6f1768b14e62.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6c9f6f1768b14e62.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fa9b36dcc44f917.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fa9b36dcc44f917.verified.txt index 9cec985f94..00e299031d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fa9b36dcc44f917.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fa9b36dcc44f917.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fc3c4fff8f21f4b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fc3c4fff8f21f4b.verified.txt index fafb873e12..c32a2b2c5d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fc3c4fff8f21f4b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fc3c4fff8f21f4b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fdf702b98da6651.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fdf702b98da6651.verified.txt index bf11dbac42..98d1435442 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fdf702b98da6651.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_6fdf702b98da6651.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7154da464c57c9ad.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7154da464c57c9ad.verified.txt index df9c0a585e..527f39cfc1 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7154da464c57c9ad.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7154da464c57c9ad.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_768e4714a020767d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_768e4714a020767d.verified.txt index 41a9007f1f..2dd3a9f4d6 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_768e4714a020767d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_768e4714a020767d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76e4ba2a03a54432.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76e4ba2a03a54432.verified.txt index ab59307dea..43022c941a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76e4ba2a03a54432.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76e4ba2a03a54432.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76fcc90c4238fccf.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76fcc90c4238fccf.verified.txt index 03f44bf73a..91cc328bf7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76fcc90c4238fccf.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_76fcc90c4238fccf.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_77b43a623684d39c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_77b43a623684d39c.verified.txt index d702760c1b..bd24f7e5b4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_77b43a623684d39c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_77b43a623684d39c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a2076c9ed29e130.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a2076c9ed29e130.verified.txt index 266b23df57..6f73c52bc2 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a2076c9ed29e130.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a2076c9ed29e130.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a64bcd539d02a7c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a64bcd539d02a7c.verified.txt index 08113c679c..1a7c201e4a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a64bcd539d02a7c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7a64bcd539d02a7c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7b85220c41b26579.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7b85220c41b26579.verified.txt index 666c705ba6..68c2ceb6fe 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7b85220c41b26579.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7b85220c41b26579.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c3db125e2b5aa08.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c3db125e2b5aa08.verified.txt index c8e0e1e0dd..b4e7bc67e5 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c3db125e2b5aa08.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c3db125e2b5aa08.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c5366fdd9f5e24f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c5366fdd9f5e24f.verified.txt index 1592ecfacc..0b4ccd74bb 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c5366fdd9f5e24f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7c5366fdd9f5e24f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7cef0be2c9de225c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7cef0be2c9de225c.verified.txt index a4a5dc3355..c77b913271 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7cef0be2c9de225c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7cef0be2c9de225c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7d31c8f598d3d04e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7d31c8f598d3d04e.verified.txt index b9f556aa6f..af9d27d80c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7d31c8f598d3d04e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7d31c8f598d3d04e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7dd3502a913cc0be.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7dd3502a913cc0be.verified.txt index 8099cfa01a..fb3a2cd910 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7dd3502a913cc0be.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_7dd3502a913cc0be.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_837c6887223e61fe.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_837c6887223e61fe.verified.txt index c09d8352d8..2767b6896d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_837c6887223e61fe.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_837c6887223e61fe.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_84157b207efe4e39.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_84157b207efe4e39.verified.txt index 704156e60d..35730559ac 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_84157b207efe4e39.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_84157b207efe4e39.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_845209a08faecfcc.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_845209a08faecfcc.verified.txt index 771b707de5..ee42a1610e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_845209a08faecfcc.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_845209a08faecfcc.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_861e9a0628940c67.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_861e9a0628940c67.verified.txt index 32b62ebb1b..6dc7791dba 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_861e9a0628940c67.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_861e9a0628940c67.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8701acaae4a8b8f1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8701acaae4a8b8f1.verified.txt index 20a083add1..9317813f7e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8701acaae4a8b8f1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8701acaae4a8b8f1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_872ae19f3cc5d340.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_872ae19f3cc5d340.verified.txt index e364e183e9..8b40c2227d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_872ae19f3cc5d340.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_872ae19f3cc5d340.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_87c2d444a420d3ea.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_87c2d444a420d3ea.verified.txt index 9431f7f3a1..66e2337a07 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_87c2d444a420d3ea.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_87c2d444a420d3ea.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_89debf17677b0ab1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_89debf17677b0ab1.verified.txt index 93c11d9809..c3a7319a0c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_89debf17677b0ab1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_89debf17677b0ab1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8d28a64726c90f03.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8d28a64726c90f03.verified.txt index fac8920da9..2252ad7581 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8d28a64726c90f03.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8d28a64726c90f03.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8e556a0e181055d2.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8e556a0e181055d2.verified.txt index 6aff354319..bee139ab4b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8e556a0e181055d2.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8e556a0e181055d2.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8ffe3d100bd190b6.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8ffe3d100bd190b6.verified.txt index 0fbbd47c7c..14e2f37608 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8ffe3d100bd190b6.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_8ffe3d100bd190b6.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_912b1bb466ce89e1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_912b1bb466ce89e1.verified.txt index 551c7e12a4..98fe8db53e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_912b1bb466ce89e1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_912b1bb466ce89e1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_92272c4111559756.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_92272c4111559756.verified.txt index 750f7c7489..c7cddf105c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_92272c4111559756.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_92272c4111559756.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_923d218668d9099a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_923d218668d9099a.verified.txt index a4c4c27b79..b73ac9f1c6 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_923d218668d9099a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_923d218668d9099a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_95733862f544af43.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_95733862f544af43.verified.txt index 6cbb3b2283..2221a2f36e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_95733862f544af43.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_95733862f544af43.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_96135dc4bcf54d2b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_96135dc4bcf54d2b.verified.txt index 557dd06320..bf6361f927 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_96135dc4bcf54d2b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_96135dc4bcf54d2b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9995b33a722d5621.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9995b33a722d5621.verified.txt index 758bb642c3..7a152529c8 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9995b33a722d5621.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9995b33a722d5621.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_99ed2d8a7af7c322.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_99ed2d8a7af7c322.verified.txt index 14c486e0af..4ca3b1eb89 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_99ed2d8a7af7c322.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_99ed2d8a7af7c322.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9a0e1c590d3ebd3b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9a0e1c590d3ebd3b.verified.txt index 4631429baf..8c058946e5 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9a0e1c590d3ebd3b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9a0e1c590d3ebd3b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b38eefdbaafb0a5.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b38eefdbaafb0a5.verified.txt index 416432948c..1f9eca85de 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b38eefdbaafb0a5.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b38eefdbaafb0a5.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b80372401082da7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b80372401082da7.verified.txt index 723d866293..87fbec8b93 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b80372401082da7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b80372401082da7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b926e43df789556.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b926e43df789556.verified.txt index d391b96c3f..bca2a23eb1 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b926e43df789556.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9b926e43df789556.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c3cdb75db1f84c7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c3cdb75db1f84c7.verified.txt index 12768ece4a..7f010764de 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c3cdb75db1f84c7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c3cdb75db1f84c7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c55fb544d498ed1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c55fb544d498ed1.verified.txt index da629210e1..90fd5aabd2 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c55fb544d498ed1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9c55fb544d498ed1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9dc25d08b78337e0.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9dc25d08b78337e0.verified.txt index 1b2d6fccdb..73c1cf9b62 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9dc25d08b78337e0.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9dc25d08b78337e0.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9edf75aa18e466ac.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9edf75aa18e466ac.verified.txt index 401a7b4373..f0a211e859 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9edf75aa18e466ac.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9edf75aa18e466ac.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9f95f94f07a018bc.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9f95f94f07a018bc.verified.txt index d01feb78c1..ddd69b5914 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9f95f94f07a018bc.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_9f95f94f07a018bc.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a0e6609507fce982.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a0e6609507fce982.verified.txt index a1d70089b5..852e28b2b4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a0e6609507fce982.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a0e6609507fce982.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a2c530119d8a204e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a2c530119d8a204e.verified.txt index 32706b4270..127051cb55 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a2c530119d8a204e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a2c530119d8a204e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a359e9efe1aa826c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a359e9efe1aa826c.verified.txt index f14460ced9..fcd67ed6a4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a359e9efe1aa826c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a359e9efe1aa826c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a410b05ac7f073f8.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a410b05ac7f073f8.verified.txt index 8110211d04..ab073c1855 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a410b05ac7f073f8.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a410b05ac7f073f8.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a575815cef8c1341.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a575815cef8c1341.verified.txt index c6ffef5e08..f2f30a88a1 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a575815cef8c1341.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a575815cef8c1341.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a5bc5714811aac66.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a5bc5714811aac66.verified.txt index 113055772d..3d8e637f0e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a5bc5714811aac66.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a5bc5714811aac66.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a6778febf60f35cb.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a6778febf60f35cb.verified.txt index 1826b44cd1..4c8e7e81a7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a6778febf60f35cb.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a6778febf60f35cb.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a72ed016f540f3e5.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a72ed016f540f3e5.verified.txt index cc5d84e1a3..80a4221ba0 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a72ed016f540f3e5.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a72ed016f540f3e5.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a7cbf9d3b7dbba8f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a7cbf9d3b7dbba8f.verified.txt index 4b1aa15ddf..60f9200b4f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a7cbf9d3b7dbba8f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a7cbf9d3b7dbba8f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a86791e3a97daabc.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a86791e3a97daabc.verified.txt index 4127a30bbc..6e867acea4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a86791e3a97daabc.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a86791e3a97daabc.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a8d09ae5f3ed1675.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a8d09ae5f3ed1675.verified.txt index 9656fe76a3..c308418eaa 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a8d09ae5f3ed1675.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_a8d09ae5f3ed1675.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ac22f436dda4f72a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ac22f436dda4f72a.verified.txt index 2b219b2f44..fec9b9c778 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ac22f436dda4f72a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ac22f436dda4f72a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ad1a3689ed3c418f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ad1a3689ed3c418f.verified.txt index 53558b5580..a555c5d09b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ad1a3689ed3c418f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ad1a3689ed3c418f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ae319bbc936a946d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ae319bbc936a946d.verified.txt index c983f0bcc6..10b65fb94b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ae319bbc936a946d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ae319bbc936a946d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aec8592ffdf1fdd4.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aec8592ffdf1fdd4.verified.txt index c175ce1a53..94b0fbd7de 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aec8592ffdf1fdd4.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aec8592ffdf1fdd4.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aed2c28062246796.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aed2c28062246796.verified.txt index 6515ee3078..31a69d23fd 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aed2c28062246796.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_aed2c28062246796.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_affaac1393a5dbeb.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_affaac1393a5dbeb.verified.txt index 250b32c06a..1fb79b0fb5 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_affaac1393a5dbeb.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_affaac1393a5dbeb.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b0214b8897241926.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b0214b8897241926.verified.txt index 72715024bb..cc34253743 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b0214b8897241926.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b0214b8897241926.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b07372acbe7b784d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b07372acbe7b784d.verified.txt index 71b1a7745f..01acf6dd95 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b07372acbe7b784d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b07372acbe7b784d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1173c52d299b220.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1173c52d299b220.verified.txt index d2f08f6d31..2d0b057b00 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1173c52d299b220.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1173c52d299b220.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1d736c2e00cc0f2.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1d736c2e00cc0f2.verified.txt index 8317330d92..28752605d7 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1d736c2e00cc0f2.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b1d736c2e00cc0f2.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b3df095c06c8dc2a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b3df095c06c8dc2a.verified.txt index 3b627a7ece..2b3fe4fdd4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b3df095c06c8dc2a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b3df095c06c8dc2a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b4bf1d9a579f0d54.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b4bf1d9a579f0d54.verified.txt index be2bf31180..f653cce834 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b4bf1d9a579f0d54.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b4bf1d9a579f0d54.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5b124a9900bc123.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5b124a9900bc123.verified.txt index c1aa233914..3bc608b360 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5b124a9900bc123.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5b124a9900bc123.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5d3f777ebd806d7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5d3f777ebd806d7.verified.txt index 4508928364..1bbc7a2608 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5d3f777ebd806d7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b5d3f777ebd806d7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b643b795dcbab422.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b643b795dcbab422.verified.txt index e7899cfc9f..deb5fa101f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b643b795dcbab422.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b643b795dcbab422.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b7d403c82ba63992.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b7d403c82ba63992.verified.txt index 5677bcee9d..e40b895865 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b7d403c82ba63992.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b7d403c82ba63992.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b8834e0d8c0a7d1a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b8834e0d8c0a7d1a.verified.txt index dbe32e89f4..904700c84b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b8834e0d8c0a7d1a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_b8834e0d8c0a7d1a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ba76c308aba91a6b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ba76c308aba91a6b.verified.txt index 1445f0e935..890d81d467 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ba76c308aba91a6b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ba76c308aba91a6b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bb32723f73578e2f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bb32723f73578e2f.verified.txt index f67e82d446..7a78bba345 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bb32723f73578e2f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bb32723f73578e2f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bc48197e16e11cff.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bc48197e16e11cff.verified.txt index 298981af63..ab217c1a0a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bc48197e16e11cff.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_bc48197e16e11cff.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c11a49a245573020.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c11a49a245573020.verified.txt index 456cc68cbf..957005be8c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c11a49a245573020.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c11a49a245573020.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c19b0d0af9db430d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c19b0d0af9db430d.verified.txt index ca6684eaf5..f92fcfb7c6 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c19b0d0af9db430d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c19b0d0af9db430d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c3ce74c46dcdcc12.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c3ce74c46dcdcc12.verified.txt index ed2281f24b..7307d22917 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c3ce74c46dcdcc12.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c3ce74c46dcdcc12.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c4d92e574fe04430.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c4d92e574fe04430.verified.txt index 82c74d784d..0eb4f9a072 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c4d92e574fe04430.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c4d92e574fe04430.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c582a1bbca9b6853.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c582a1bbca9b6853.verified.txt index 0c9aeb4b92..c631df4993 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c582a1bbca9b6853.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c582a1bbca9b6853.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c595ab4ebac76a83.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c595ab4ebac76a83.verified.txt index 1b822a7aa5..52e6f9fadb 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c595ab4ebac76a83.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c595ab4ebac76a83.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c5c017cc376093a8.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c5c017cc376093a8.verified.txt index 0e37eed1e2..80844a8d79 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c5c017cc376093a8.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_c5c017cc376093a8.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cde6136eb635fcca.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cde6136eb635fcca.verified.txt index ff3141e180..1406f2d814 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cde6136eb635fcca.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cde6136eb635fcca.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonstring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonstringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NewtonsoftJsonstringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce6f86880328babd.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce6f86880328babd.verified.txt index 7710c46bf4..eeb8f9b28a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce6f86880328babd.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce6f86880328babd.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce9a45e95087de82.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce9a45e95087de82.verified.txt index a7d001f9b1..59f5943f8c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce9a45e95087de82.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ce9a45e95087de82.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cf872c78c03f743e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cf872c78c03f743e.verified.txt index 76d169d89e..bc05275227 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cf872c78c03f743e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_cf872c78c03f743e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d11a2cb3500bd652.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d11a2cb3500bd652.verified.txt index 9c0bb2fdd0..c971348a7b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d11a2cb3500bd652.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d11a2cb3500bd652.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d161ce7be9b82eac.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d161ce7be9b82eac.verified.txt index fbe82caaf7..1c930fcd8b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d161ce7be9b82eac.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d161ce7be9b82eac.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1b0204416c2be2b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1b0204416c2be2b.verified.txt index 2c595812d0..62e90fb70b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1b0204416c2be2b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1b0204416c2be2b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1d290471740b346.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1d290471740b346.verified.txt index 35de24bad6..f2f7b6557d 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1d290471740b346.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d1d290471740b346.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d20c19887f82465f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d20c19887f82465f.verified.txt index d14b113deb..35a8bb0eb6 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d20c19887f82465f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d20c19887f82465f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NoneSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NoneSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NoneSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d26d343b5d99ac82.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d26d343b5d99ac82.verified.txt index 7b1145d70b..3511d8c2ba 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d26d343b5d99ac82.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d26d343b5d99ac82.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d2d28f4648bb382a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d2d28f4648bb382a.verified.txt index 731329c9e8..3c1520606f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d2d28f4648bb382a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d2d28f4648bb382a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d40f38803a496eb1.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d40f38803a496eb1.verified.txt index 82bbbda051..de8bbd48d8 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d40f38803a496eb1.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d40f38803a496eb1.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d47765eafe36b769.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d47765eafe36b769.verified.txt index 145b3fd173..35e8c0ef05 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d47765eafe36b769.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d47765eafe36b769.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d5597a9e0669d828.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d5597a9e0669d828.verified.txt index 9e6d9796ac..0cf8ab6689 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d5597a9e0669d828.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d5597a9e0669d828.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonedouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonedoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonedoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d682d2491abae2f5.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d682d2491abae2f5.verified.txt index 4ec4c93530..398c5b6f3a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d682d2491abae2f5.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d682d2491abae2f5.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d6c2f5a672e0986a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d6c2f5a672e0986a.verified.txt index 25551ea7e1..4d3638bb1c 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d6c2f5a672e0986a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d6c2f5a672e0986a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_Nonerecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d87695b2c62eb858.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d87695b2c62eb858.verified.txt index 4d12813a1b..f9053c7748 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d87695b2c62eb858.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_d87695b2c62eb858.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonebyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonebyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_NonebyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db1e773c05fc2bd6.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db1e773c05fc2bd6.verified.txt index 53f1a431b7..6795aef36b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db1e773c05fc2bd6.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db1e773c05fc2bd6.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db9fbc55f74b632c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db9fbc55f74b632c.verified.txt index bcb2c0de42..433a04b53e 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db9fbc55f74b632c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_db9fbc55f74b632c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_dd12025652160002.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_dd12025652160002.verified.txt index 1ba100ddff..b8b5538b1b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_dd12025652160002.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_dd12025652160002.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ddaf1496f6dff47b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ddaf1496f6dff47b.verified.txt index 0fc651a42a..1735449dc4 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ddaf1496f6dff47b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ddaf1496f6dff47b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_debf2d08228c151e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_debf2d08228c151e.verified.txt index a5f0ad702a..a250f62ced 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_debf2d08228c151e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_debf2d08228c151e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e009ee077abcb511.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e009ee077abcb511.verified.txt index de6a0adf95..ab7eb522cc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e009ee077abcb511.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e009ee077abcb511.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e292c8e523c94d1d.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e292c8e523c94d1d.verified.txt index 6592ba244e..8a6877e6cb 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e292c8e523c94d1d.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e292c8e523c94d1d.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NewtonsoftJsonrecord__struct__float__event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e44b08cd14704023.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e44b08cd14704023.verified.txt index b1975fb321..366cbcb63b 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e44b08cd14704023.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e44b08cd14704023.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e52c2b386e46146f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e52c2b386e46146f.verified.txt index 1e94542e54..43c6df46ed 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e52c2b386e46146f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e52c2b386e46146f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_classConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e5e444f1a2061cef.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e5e444f1a2061cef.verified.txt index c709225be6..7d41aa7968 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e5e444f1a2061cef.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e5e444f1a2061cef.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e74f2367a1f05be8.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e74f2367a1f05be8.verified.txt index e6b7c72b59..a8fe9edc72 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e74f2367a1f05be8.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e74f2367a1f05be8.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e933201f374e2884.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e933201f374e2884.verified.txt index 00637464c7..60fabbef18 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e933201f374e2884.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_e933201f374e2884.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsondouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsondoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsondoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ea9b1d3c50f164d5.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ea9b1d3c50f164d5.verified.txt index 008e554150..068ded921f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ea9b1d3c50f164d5.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ea9b1d3c50f164d5.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_eac1116bb9ee271b.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_eac1116bb9ee271b.verified.txt index 0289428e90..d1096cb649 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_eac1116bb9ee271b.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_eac1116bb9ee271b.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ebd557cbdb9ce19a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ebd557cbdb9ce19a.verified.txt index 7eb2976702..136f567048 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ebd557cbdb9ce19a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ebd557cbdb9ce19a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ecba4ff8b0c68c7c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ecba4ff8b0c68c7c.verified.txt index ef371d4b23..76379fb8ae 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ecba4ff8b0c68c7c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ecba4ff8b0c68c7c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonSystem_Guid>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonSystem_GuidEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_edb0ce159df119ba.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_edb0ce159df119ba.verified.txt index 0beafe9e3e..032ace25de 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_edb0ce159df119ba.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_edb0ce159df119ba.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_Nonerecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ee572359c8b6cbca.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ee572359c8b6cbca.verified.txt index 9b9c0992d8..6351c91ef2 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ee572359c8b6cbca.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ee572359c8b6cbca.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimal>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_recordConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__decimalEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f480b93b6767cae7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f480b93b6767cae7.verified.txt index 8a59256988..0a289c2f86 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f480b93b6767cae7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f480b93b6767cae7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f61fd3251a43bf0f.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f61fd3251a43bf0f.verified.txt index 8de71c5b3d..15e34e88c8 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f61fd3251a43bf0f.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f61fd3251a43bf0f.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f87538e4fc21065e.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f87538e4fc21065e.verified.txt index 50f4ae3218..0d427a9b67 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f87538e4fc21065e.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_f87538e4fc21065e.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fae889c1ae954e1c.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fae889c1ae954e1c.verified.txt index 25b3343ced..102ebdc357 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fae889c1ae954e1c.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fae889c1ae954e1c.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_readonly_partial_record_structConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc17d08f1c5b8939.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc17d08f1c5b8939.verified.txt index 8796d558a0..339e0e405a 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc17d08f1c5b8939.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc17d08f1c5b8939.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_recordConversions_Nonestring>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonestringEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_recordConversions_NonestringEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc7381c65f43fcd7.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc7381c65f43fcd7.verified.txt index a5c37f19da..3c03dce755 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc7381c65f43fcd7.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fc7381c65f43fcd7.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_record_classConversions_NewtonsoftJsonrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fdf47643aed6e936.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fdf47643aed6e936.verified.txt index 1e74b039d3..0f66d413bc 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fdf47643aed6e936.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fdf47643aed6e936.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_classConversions_NewtonsoftJsonbyte>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonbyteEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_classConversions_NewtonsoftJsonbyteEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fec5b685544eecd8.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fec5b685544eecd8.verified.txt index 60c87a4dbe..47bf99184f 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fec5b685544eecd8.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_fec5b685544eecd8.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdouble>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_sealed_partial_classConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterdoubleEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ff613f675ddb935a.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ff613f675ddb935a.verified.txt index 103d4d4804..caeedacc07 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ff613f675ddb935a.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.GenerationOfEscapedTypes_ff613f675ddb935a.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @class; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@class.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__event>().HaveConversion<@class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueConverter, @class.EfCoreConverters.escapedTestspublic_partial_record_structConversions_NewtonsoftJson___Conversions_SystemTextJson___Conversions_EfCoreValueConverter___Conversions_DapperTypeHandler___Conversions_LinqToDbValueConverterrecord__struct__float__eventEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @class; public partial class EfCoreConverters diff --git a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.MixtureOfKeywords.verified.txt b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.MixtureOfKeywords.verified.txt index 81087a32d9..54d2ff5737 100644 --- a/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.MixtureOfKeywords.verified.txt +++ b/tests/SnapshotTests/Escaping/snapshots/snap-v8.0/GenerationOfEscapedEfCoreConverters.MixtureOfKeywords.verified.txt @@ -26,6 +26,49 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace @double; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@double.classFromEscapedNamespace>().HaveConversion<@double.EfCoreConverters.classFromEscapedNamespaceEfCoreValueConverter, @double.EfCoreConverters.classFromEscapedNamespaceEfCoreValueComparer>(); +configurationBuilder.Properties<@double.classFromEscapedNamespaceWithReservedUnderlyingType>().HaveConversion<@double.EfCoreConverters.classFromEscapedNamespaceWithReservedUnderlyingTypeEfCoreValueConverter, @double.EfCoreConverters.classFromEscapedNamespaceWithReservedUnderlyingTypeEfCoreValueComparer>(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace @double; public partial class EfCoreConverters @@ -169,6 +212,50 @@ public static class classFromEscapedNamespaceWithReservedUnderlyingType__Ext } +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace @bool.@byte.@short.@float.@object; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties<@bool.@byte.@short.@float.@object.@class>().HaveConversion<@bool.@byte.@short.@float.@object.EfCoreConverters.classEfCoreValueConverter, @bool.@byte.@short.@float.@object.EfCoreConverters.classEfCoreValueComparer>(); +configurationBuilder.Properties<@bool.@byte.@short.@float.@object.@event>().HaveConversion<@bool.@byte.@short.@float.@object.EfCoreConverters.eventEfCoreValueConverter, @bool.@byte.@short.@float.@object.EfCoreConverters.eventEfCoreValueComparer>(); +configurationBuilder.Properties<@bool.@byte.@short.@float.@object.event2>().HaveConversion<@bool.@byte.@short.@float.@object.EfCoreConverters.event2EfCoreValueConverter, @bool.@byte.@short.@float.@object.EfCoreConverters.event2EfCoreValueComparer>(); + + + return configurationBuilder; + } + } + #endif #if NET8_0_OR_GREATER diff --git a/tests/SnapshotTests/GeneralStuff/GeneralTests.cs b/tests/SnapshotTests/GeneralStuff/GeneralTests.cs index 37bf1613ee..e4a2d6b75d 100644 --- a/tests/SnapshotTests/GeneralStuff/GeneralTests.cs +++ b/tests/SnapshotTests/GeneralStuff/GeneralTests.cs @@ -13,6 +13,55 @@ public class GeneralTests { [Fact] public async Task Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater() + { + var source = """ + using System; + using Vogen; + + namespace Foo + { + [ValueObject] + public partial struct Vo1; + + [ValueObject] + public partial struct Vo2; + } + + namespace Bar + { + [ValueObject] + public partial struct Vo1; + + [ValueObject] + public partial struct Vo2; + } + + namespace Baz1 + { + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + } + + namespace Baz2 + { + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + } + """; + + await new SnapshotRunner() + .WithSource(source) + .RunOn(TargetFramework.Net8_0); + } + + [Fact] + public async Task Writes_efcore_converters_for_escaped_types() { var source = """ using System; diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt index 42d9484ad5..e01c1901ef 100644 --- a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt +++ b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt @@ -26,53 +26,21 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz1; -public partial class EfCoreConverters -{ - public class MyVo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter - { - public MyVo1EfCoreValueConverter() : this(null) { } - public MyVo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) - : base( - vo => vo.Value, - value => Deserialize(value), - mappingHints - ) { } - - static Whatever.MyVo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); - - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo1 UnsafeDeserialize(Whatever.MyVo1 @this, System.Int32 value); - } - public class MyVo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer - { - public MyVo1EfCoreValueComparer() : base( - (left, right) => DoCompare(left, right), - instance => instance.IsInitialized() ? instance.GetHashCode() : 0) - { - } - - static bool DoCompare(Whatever.MyVo1 left, Whatever.MyVo1 right) - { - // if neither are initialized, then they're equal - if(!left.IsInitialized() && !right.IsInitialized()) return true; - - return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); - } - private static System.Int32 UnderlyingValue(Whatever.MyVo1 i) => UnsafeValueField(ref i); + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo1 @this); - } -} - -public static class MyVo1__Ext -{ - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); -} + return configurationBuilder; + } + } #endif @@ -103,60 +71,51 @@ public static class MyVo1__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz1; public partial class EfCoreConverters { - public class MyVo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public MyVo2EfCoreValueConverter() : this(null) { } - public MyVo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo1EfCoreValueConverter() : this(null) { } + public Vo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.MyVo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); + static Foo.Vo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo2 UnsafeDeserialize(Whatever.MyVo2 @this, System.String value); + static extern Foo.Vo1 UnsafeDeserialize(Foo.Vo1 @this, System.Int32 value); } - public class MyVo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer - { - public MyVo2EfCoreValueComparer() : base( - (left, right) => DoCompare(left, right), - instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) - { - } - - static bool DoCompare(Whatever.MyVo2 left, Whatever.MyVo2 right) - { - // if both null, then they're equal - if (left is null) return right is null; - - // if only right is null, then they're not equal - if (right is null) return false; - - // if they're both the same reference, then they're equal - if (ReferenceEquals(left, right)) return true; - - // if neither are initialized, then they're equal + public class Vo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + { + public Vo1EfCoreValueComparer() : base( + (left, right) => DoCompare(left, right), + instance => instance.IsInitialized() ? instance.GetHashCode() : 0) + { + } + + static bool DoCompare(Foo.Vo1 left, Foo.Vo1 right) + { + // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; - - return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); - } - private static System.String UnderlyingValue(Whatever.MyVo2 i) => UnsafeValueField( i); + + return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); + } + private static System.Int32 UnderlyingValue(Foo.Vo1 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.String UnsafeValueField( Whatever.MyVo2 @this); -} + static extern ref System.Int32 UnsafeValueField(ref Foo.Vo1 @this); + } } -public static class MyVo2__Ext +public static class Vo1__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -189,51 +148,51 @@ public static class MyVo2__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz1; public partial class EfCoreConverters { - public class MyVo3EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public MyVo3EfCoreValueConverter() : this(null) { } - public MyVo3EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo2EfCoreValueConverter() : this(null) { } + public Vo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.MyVo3 Deserialize(System.String value) => UnsafeDeserialize(default, value); + static Foo.Vo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo3 UnsafeDeserialize(Whatever.MyVo3 @this, System.String value); + static extern Foo.Vo2 UnsafeDeserialize(Foo.Vo2 @this, System.String value); } - public class MyVo3EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + public class Vo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public MyVo3EfCoreValueComparer() : base( + public Vo2EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(Whatever.MyVo3 left, Whatever.MyVo3 right) + static bool DoCompare(Foo.Vo2 left, Foo.Vo2 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.String UnderlyingValue(Whatever.MyVo3 i) => UnsafeValueField(ref i); + private static System.String UnderlyingValue(Foo.Vo2 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.String UnsafeValueField(ref Whatever.MyVo3 @this); + static extern ref System.String UnsafeValueField(ref Foo.Vo2 @this); } } -public static class MyVo3__Ext +public static class Vo2__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -266,51 +225,51 @@ public static class MyVo3__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz1; public partial class EfCoreConverters { - public class MyVo4EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public MyVo4EfCoreValueConverter() : this(null) { } - public MyVo4EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo1EfCoreValueConverter() : this(null) { } + public Vo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.MyVo4 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + static Bar.Vo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo4 UnsafeDeserialize(Whatever.MyVo4 @this, System.Int32 value); + static extern Bar.Vo1 UnsafeDeserialize(Bar.Vo1 @this, System.Int32 value); } - public class MyVo4EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + public class Vo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public MyVo4EfCoreValueComparer() : base( + public Vo1EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(Whatever.MyVo4 left, Whatever.MyVo4 right) + static bool DoCompare(Bar.Vo1 left, Bar.Vo1 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.Int32 UnderlyingValue(Whatever.MyVo4 i) => UnsafeValueField(ref i); + private static System.Int32 UnderlyingValue(Bar.Vo1 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo4 @this); + static extern ref System.Int32 UnsafeValueField(ref Bar.Vo1 @this); } } -public static class MyVo4__Ext +public static class Vo1__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -343,51 +302,51 @@ public static class MyVo4__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz1; public partial class EfCoreConverters { - public class MyVo5EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public MyVo5EfCoreValueConverter() : this(null) { } - public MyVo5EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo2EfCoreValueConverter() : this(null) { } + public Vo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.MyVo5 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + static Bar.Vo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo5 UnsafeDeserialize(Whatever.MyVo5 @this, System.Int32 value); + static extern Bar.Vo2 UnsafeDeserialize(Bar.Vo2 @this, System.String value); } - public class MyVo5EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + public class Vo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public MyVo5EfCoreValueComparer() : base( + public Vo2EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(Whatever.MyVo5 left, Whatever.MyVo5 right) + static bool DoCompare(Bar.Vo2 left, Bar.Vo2 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.Int32 UnderlyingValue(Whatever.MyVo5 i) => UnsafeValueField(ref i); + private static System.String UnderlyingValue(Bar.Vo2 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField(ref Whatever.MyVo5 @this); + static extern ref System.String UnsafeValueField(ref Bar.Vo2 @this); } } -public static class MyVo5__Ext +public static class Vo2__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -420,62 +379,21 @@ public static class MyVo5__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz2; -public partial class EfCoreConverters -{ - public class MyVo6EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter - { - public MyVo6EfCoreValueConverter() : this(null) { } - public MyVo6EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) - : base( - vo => vo.Value, - value => Deserialize(value), - mappingHints - ) { } - - static Whatever.MyVo6 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); - - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyVo6 UnsafeDeserialize(Whatever.MyVo6 @this, System.Int32 value); - } - public class MyVo6EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer - { - public MyVo6EfCoreValueComparer() : base( - (left, right) => DoCompare(left, right), - instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) - { - } - - static bool DoCompare(Whatever.MyVo6 left, Whatever.MyVo6 right) - { - // if both null, then they're equal - if (left is null) return right is null; - - // if only right is null, then they're not equal - if (right is null) return false; - - // if they're both the same reference, then they're equal - if (ReferenceEquals(left, right)) return true; - - // if neither are initialized, then they're equal - if(!left.IsInitialized() && !right.IsInitialized()) return true; - - return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); - } - private static System.Int32 UnderlyingValue(Whatever.MyVo6 i) => UnsafeValueField( i); + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); +configurationBuilder.Properties().HaveConversion(); - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField( Whatever.MyVo6 @this); -} -} - -public static class MyVo6__Ext -{ - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); -} + return configurationBuilder; + } + } #endif @@ -506,51 +424,51 @@ public static class MyVo6__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz2; public partial class EfCoreConverters { - public class intEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public intEfCoreValueConverter() : this(null) { } - public intEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo1EfCoreValueConverter() : this(null) { } + public Vo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.@int Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + static Foo.Vo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.@int UnsafeDeserialize(Whatever.@int @this, System.Int32 value); + static extern Foo.Vo1 UnsafeDeserialize(Foo.Vo1 @this, System.Int32 value); } - public class intEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + public class Vo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public intEfCoreValueComparer() : base( + public Vo1EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(Whatever.@int left, Whatever.@int right) + static bool DoCompare(Foo.Vo1 left, Foo.Vo1 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.Int32 UnderlyingValue(Whatever.@int i) => UnsafeValueField(ref i); + private static System.Int32 UnderlyingValue(Foo.Vo1 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField(ref Whatever.@int @this); + static extern ref System.Int32 UnsafeValueField(ref Foo.Vo1 @this); } } -public static class int__Ext +public static class Vo1__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -583,137 +501,51 @@ public static class int__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace Whatever; +namespace Baz2; public partial class EfCoreConverters { - public class byteEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter + public class Vo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public byteEfCoreValueConverter() : this(null) { } - public byteEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo2EfCoreValueConverter() : this(null) { } + public Vo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static Whatever.@byte Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); + static Foo.Vo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.@byte UnsafeDeserialize(Whatever.@byte @this, System.Int32 value); + static extern Foo.Vo2 UnsafeDeserialize(Foo.Vo2 @this, System.String value); } - public class byteEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer + public class Vo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public byteEfCoreValueComparer() : base( + public Vo2EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(Whatever.@byte left, Whatever.@byte right) + static bool DoCompare(Foo.Vo2 left, Foo.Vo2 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.Int32 UnderlyingValue(Whatever.@byte i) => UnsafeValueField(ref i); + private static System.String UnderlyingValue(Foo.Vo2 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField(ref Whatever.@byte @this); - } -} - -public static class byte__Ext -{ - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); -} - - -#endif - -#if NET8_0_OR_GREATER - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -namespace Whatever; - -public partial class EfCoreConverters -{ - public class MyIntEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter - { - public MyIntEfCoreValueConverter() : this(null) { } - public MyIntEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) - : base( - vo => vo.Value, - value => Deserialize(value), - mappingHints - ) { } - - static Whatever.MyInt Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); - - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern Whatever.MyInt UnsafeDeserialize(Whatever.MyInt @this, System.Int32 value); + static extern ref System.String UnsafeValueField(ref Foo.Vo2 @this); } - public class MyIntEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer - { - public MyIntEfCoreValueComparer() : base( - (left, right) => DoCompare(left, right), - instance => instance.IsInitialized() ? UnderlyingValue(instance).GetHashCode() : 0) - { - } - - static bool DoCompare(Whatever.MyInt left, Whatever.MyInt right) - { - // if both null, then they're equal - if (left is null) return right is null; - - // if only right is null, then they're not equal - if (right is null) return false; - - // if they're both the same reference, then they're equal - if (ReferenceEquals(left, right)) return true; - - // if neither are initialized, then they're equal - if(!left.IsInitialized() && !right.IsInitialized()) return true; - - return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); - } - private static System.Int32 UnderlyingValue(Whatever.MyInt i) => UnsafeValueField( i); - - [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Int32 UnsafeValueField( Whatever.MyInt @this); -} } -public static class MyInt__Ext +public static class Vo2__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => - propertyBuilder.HasConversion(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -746,51 +578,51 @@ public static class MyInt__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace @byte; +namespace Baz2; public partial class EfCoreConverters { - public class byteEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<@int.@byte, System.Byte> + public class Vo1EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public byteEfCoreValueConverter() : this(null) { } - public byteEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo1EfCoreValueConverter() : this(null) { } + public Vo1EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static @int.@byte Deserialize(System.Byte value) => UnsafeDeserialize(default, value); + static Bar.Vo1 Deserialize(System.Int32 value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern @int.@byte UnsafeDeserialize(@int.@byte @this, System.Byte value); + static extern Bar.Vo1 UnsafeDeserialize(Bar.Vo1 @this, System.Int32 value); } - public class byteEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer<@int.@byte> + public class Vo1EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public byteEfCoreValueComparer() : base( + public Vo1EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(@int.@byte left, @int.@byte right) + static bool DoCompare(Bar.Vo1 left, Bar.Vo1 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.Byte UnderlyingValue(@int.@byte i) => UnsafeValueField(ref i); + private static System.Int32 UnderlyingValue(Bar.Vo1 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.Byte UnsafeValueField(ref @int.@byte @this); + static extern ref System.Int32 UnsafeValueField(ref Bar.Vo1 @this); } } -public static class byte__Ext +public static class Vo1__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@byte> HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@byte> propertyBuilder) => - propertyBuilder.HasConversion<@byte.EfCoreConverters.byteEfCoreValueConverter, @byte.EfCoreConverters.byteEfCoreValueComparer>(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -823,51 +655,51 @@ public static class byte__Ext // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 -namespace @byte; +namespace Baz2; public partial class EfCoreConverters { - public class stringEfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter<@int.@string, System.String> + public class Vo2EfCoreValueConverter : global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ValueConverter { - public stringEfCoreValueConverter() : this(null) { } - public stringEfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) + public Vo2EfCoreValueConverter() : this(null) { } + public Vo2EfCoreValueConverter(global::Microsoft.EntityFrameworkCore.Storage.ValueConversion.ConverterMappingHints mappingHints = null) : base( vo => vo.Value, value => Deserialize(value), mappingHints ) { } - static @int.@string Deserialize(System.String value) => UnsafeDeserialize(default, value); + static Bar.Vo2 Deserialize(System.String value) => UnsafeDeserialize(default, value); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.StaticMethod, Name = "__Deserialize")] - static extern @int.@string UnsafeDeserialize(@int.@string @this, System.String value); + static extern Bar.Vo2 UnsafeDeserialize(Bar.Vo2 @this, System.String value); } - public class stringEfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer<@int.@string> + public class Vo2EfCoreValueComparer : global::Microsoft.EntityFrameworkCore.ChangeTracking.ValueComparer { - public stringEfCoreValueComparer() : base( + public Vo2EfCoreValueComparer() : base( (left, right) => DoCompare(left, right), instance => instance.IsInitialized() ? instance.GetHashCode() : 0) { } - static bool DoCompare(@int.@string left, @int.@string right) + static bool DoCompare(Bar.Vo2 left, Bar.Vo2 right) { // if neither are initialized, then they're equal if(!left.IsInitialized() && !right.IsInitialized()) return true; return left.IsInitialized() && right.IsInitialized() && UnderlyingValue(left).Equals(UnderlyingValue(right)); } - private static System.String UnderlyingValue(@int.@string i) => UnsafeValueField(ref i); + private static System.String UnderlyingValue(Bar.Vo2 i) => UnsafeValueField(ref i); [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "_value")] - static extern ref System.String UnsafeValueField(ref @int.@string @this); + static extern ref System.String UnsafeValueField(ref Bar.Vo2 @this); } } -public static class string__Ext +public static class Vo2__Ext { - public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@string> HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<@int.@string> propertyBuilder) => - propertyBuilder.HasConversion<@byte.EfCoreConverters.stringEfCoreValueConverter, @byte.EfCoreConverters.stringEfCoreValueComparer>(); + public static global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasVogenConversion(this global::Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder) => + propertyBuilder.HasConversion(); } @@ -905,7 +737,7 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv public VogenTypesFactory() { } private static readonly global::System.Collections.Generic.Dictionary> _lookup = new global::System.Collections.Generic.Dictionary> { - { typeof(@int.@byte), new global::System.Lazy(() => new @int.@byte.@byteSystemTextJsonConverter()) },{ typeof(@int.@string), new global::System.Lazy(() => new @int.@string.@stringSystemTextJsonConverter()) },{ typeof(Whatever.MyVo1), new global::System.Lazy(() => new Whatever.MyVo1.MyVo1SystemTextJsonConverter()) },{ typeof(Whatever.MyVo2), new global::System.Lazy(() => new Whatever.MyVo2.MyVo2SystemTextJsonConverter()) },{ typeof(Whatever.MyVo3), new global::System.Lazy(() => new Whatever.MyVo3.MyVo3SystemTextJsonConverter()) },{ typeof(Whatever.MyVo4), new global::System.Lazy(() => new Whatever.MyVo4.MyVo4SystemTextJsonConverter()) },{ typeof(Whatever.MyVo5), new global::System.Lazy(() => new Whatever.MyVo5.MyVo5SystemTextJsonConverter()) },{ typeof(Whatever.MyVo6), new global::System.Lazy(() => new Whatever.MyVo6.MyVo6SystemTextJsonConverter()) },{ typeof(Whatever.@int), new global::System.Lazy(() => new Whatever.@int.@intSystemTextJsonConverter()) },{ typeof(Whatever.@byte), new global::System.Lazy(() => new Whatever.@byte.@byteSystemTextJsonConverter()) },{ typeof(Whatever.MyInt), new global::System.Lazy(() => new Whatever.MyInt.MyIntSystemTextJsonConverter()) } + { typeof(Foo.Vo1), new global::System.Lazy(() => new Foo.Vo1.Vo1SystemTextJsonConverter()) },{ typeof(Foo.Vo2), new global::System.Lazy(() => new Foo.Vo2.Vo2SystemTextJsonConverter()) },{ typeof(Bar.Vo1), new global::System.Lazy(() => new Bar.Vo1.Vo1SystemTextJsonConverter()) },{ typeof(Bar.Vo2), new global::System.Lazy(() => new Bar.Vo2.Vo2SystemTextJsonConverter()) } }; public override bool CanConvert(global::System.Type typeToConvert) => _lookup.ContainsKey(typeToConvert); @@ -941,17 +773,17 @@ public class VogenTypesFactory : global::System.Text.Json.Serialization.JsonConv using Vogen; -namespace @int +namespace Foo { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(@byteSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(@byteTypeConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(Vo1SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(Vo1TypeConverter))] - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@byteDebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Byte, Value = { _value }")] - public partial struct @byte : global::System.IEquatable<@byte>, global::System.IEquatable , global::System.IComparable<@byte>, global::System.IComparable, global::System.IParsable<@byte>, global::System.ISpanParsable<@byte>, global::System.IUtf8SpanParsable<@byte> + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(Vo1DebugView))] + [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] + public partial struct Vo1 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; @@ -959,12 +791,12 @@ namespace @int private readonly global::System.Boolean _isInitialized; - private readonly System.Byte _value; + private readonly System.Int32 _value; /// - /// Gets the underlying value if set, otherwise a is thrown. + /// Gets the underlying value if set, otherwise a is thrown. /// - public readonly System.Byte Value + public readonly System.Int32 Value { [global::System.Diagnostics.DebuggerStepThroughAttribute] get @@ -977,7 +809,7 @@ namespace @int [global::System.Diagnostics.DebuggerStepThroughAttribute] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public @byte() + public Vo1() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); @@ -988,7 +820,7 @@ namespace @int } [global::System.Diagnostics.DebuggerStepThroughAttribute] - private @byte(System.Byte value) + private Vo1(System.Int32 value) { _value = value; _isInitialized = true; @@ -999,13 +831,13 @@ namespace @int /// /// The underlying type. /// An instance of this type. - public static @byte From(System.Byte value) + public static Vo1 From(System.Int32 value) { - @byte instance = new @byte(value); + Vo1 instance = new Vo1(value); return instance; } @@ -1018,18 +850,18 @@ namespace @int /// The underlying type. /// An instance of the value object. /// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Byte value, +public static bool TryFrom(System.Int32 value, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte vo) + out Vo1 vo) { - vo = new @byte(value); + vo = new Vo1(value); return true; }/// @@ -1039,7 +871,7 @@ public static bool TryFrom(System.Byte value, /// /// The primitive value. /// A containing either the value object, or an error. -public static ValueObjectOrError<@byte> TryFrom(System.Byte value) +public static ValueObjectOrError TryFrom(System.Int32 value) { @@ -1047,82 +879,82 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) - return new ValueObjectOrError<@byte>(new @byte(value)); + return new ValueObjectOrError(new Vo1(value)); } public bool IsInitialized() => _isInitialized; - public static explicit operator @byte(System.Byte value) => From(value); - public static explicit operator System.Byte(@byte value) => value.Value; + public static explicit operator Vo1(System.Int32 value) => From(value); + public static explicit operator System.Int32(Vo1 value) => value.Value; // only called internally when something has been deserialized into // its primitive type. - private static @byte __Deserialize(System.Byte value) + private static Vo1 __Deserialize(System.Int32 value) { - return new @byte(value); + return new Vo1(value); } - public readonly global::System.Boolean Equals(@byte other) + public readonly global::System.Boolean Equals(Vo1 other) { // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. if(!_isInitialized || !other._isInitialized) return false; - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); } - public global::System.Boolean Equals(@byte other, global::System.Collections.Generic.IEqualityComparer<@byte> comparer) + public global::System.Boolean Equals(Vo1 other, global::System.Collections.Generic.IEqualityComparer comparer) { return comparer.Equals(this, other); } - public readonly global::System.Boolean Equals(System.Byte primitive) + public readonly global::System.Boolean Equals(System.Int32 primitive) { return Value.Equals(primitive); } public readonly override global::System.Boolean Equals(global::System.Object obj) { - return obj is @byte && Equals((@byte) obj); + return obj is Vo1 && Equals((Vo1) obj); } - public static global::System.Boolean operator ==(@byte left, @byte right) => Equals(left, right); - public static global::System.Boolean operator !=(@byte left, @byte right) => !(left == right); + public static global::System.Boolean operator ==(Vo1 left, Vo1 right) => Equals(left, right); + public static global::System.Boolean operator !=(Vo1 left, Vo1 right) => !(left == right); - public static global::System.Boolean operator ==(@byte left, System.Byte right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(@byte left, System.Byte right) => !Equals(left.Value, right); + public static global::System.Boolean operator ==(Vo1 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(Vo1 left, System.Int32 right) => !Equals(left.Value, right); - public static global::System.Boolean operator ==(System.Byte left, @byte right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Byte left, @byte right) => !Equals(left, right.Value); + public static global::System.Boolean operator ==(System.Int32 left, Vo1 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, Vo1 right) => !Equals(left, right.Value); - public int CompareTo(@byte other) => Value.CompareTo(other.Value); + public int CompareTo(Vo1 other) => Value.CompareTo(other.Value); public int CompareTo(object other) { if(other is null) return 1; - if(other is @byte x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type @byte", nameof(other)); + if(other is Vo1 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type Vo1", nameof(other)); } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(utf8Text, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1130,21 +962,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(utf8Text, style, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1152,21 +984,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(utf8Text, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(utf8Text, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1174,21 +1006,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1196,21 +1028,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, style, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1218,21 +1050,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1240,21 +1072,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(string s, + public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, style, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1262,21 +1094,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, style, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, provider, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1284,21 +1116,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, + public static global::System.Boolean TryParse(string s, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @byte result) { - if(System.Byte.TryParse(s, provider, out var __v)) { + out Vo1 result) { + if(System.Int32.TryParse(s, out var __v)) { - result = new @byte(__v); + result = new Vo1(__v); return true; } @@ -1306,99 +1138,99 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) return false; } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(utf8Text, style, provider); + public static Vo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, style, provider); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(utf8Text, provider); + public static Vo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(utf8Text, provider); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(s, style, provider); + public static Vo1 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(s, provider); + public static Vo1 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s) { - var r = System.Byte.Parse(s); + public static Vo1 Parse(string s) { + var r = System.Int32.Parse(s); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Byte.Parse(s, style); + public static Vo1 Parse(string s, global::System.Globalization.NumberStyles style) { + var r = System.Int32.Parse(s, style); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(s, style, provider); + public static Vo1 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, style, provider); return From(r); } - /// + /// /// /// /// /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.IFormatProvider provider) { - var r = System.Byte.Parse(s, provider); + public static Vo1 Parse(string s, global::System.IFormatProvider provider) { + var r = System.Int32.Parse(s, provider); return From(r); } @@ -1406,10 +1238,10 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) public readonly override global::System.Int32 GetHashCode() { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); } - /// Returns the string representation of the underlying . + /// Returns the string representation of the underlying . public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; private readonly void EnsureInitialized() @@ -1430,22 +1262,21 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) /// - /// Converts a @byte to or from JSON. + /// Converts a Vo1 to or from JSON. /// - public class @byteSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@byte> + public class Vo1SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter { - public override @byte Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo1 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { #if NET5_0_OR_GREATER - return @byte.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Byte)))); + return Vo1.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); #else - return @byte.__Deserialize(reader.GetByte()); + return Vo1.__Deserialize(reader.GetInt32()); #endif } - public override void Write(global::System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Vo1 value, global::System.Text.Json.JsonSerializerOptions options) { - #if NET5_0_OR_GREATER global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); #else @@ -1453,50 +1284,47 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) #endif } -#if NET6_0_OR_GREATER - public override @byte ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) +#if NET6_0_OR_GREATER + public override Vo1 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return @byte.__Deserialize(global::System.Byte.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + return Vo1.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); } - public override void WriteAsPropertyName(global::System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Vo1 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); } -#endif +#endif } - class @byteTypeConverter : global::System.ComponentModel.TypeConverter + class Vo1TypeConverter : global::System.ComponentModel.TypeConverter { public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) { - return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); } public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) { return value switch { - global::System.Byte byteValue => @byte.__Deserialize(byteValue), - global::System.Int16 shortValue => @byte.__Deserialize((global::System.Byte)shortValue), - global::System.Int32 intValue => @byte.__Deserialize((global::System.Byte)intValue), - global::System.Int64 longValue => @byte.__Deserialize((global::System.Byte)longValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Byte.TryParse(stringValue, out var result) => @byte.__Deserialize(result), + global::System.Int32 intValue => Vo1.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => Vo1.__Deserialize(result), _ => base.ConvertFrom(context, culture, value), }; } public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) { - return sourceType == typeof(global::System.Byte) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); + return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); } public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) { - if (value is @byte idValue) + if (value is Vo1 idValue) { - if (destinationType == typeof(global::System.Byte)) + if (destinationType == typeof(global::System.Int32)) { return idValue.Value; } @@ -1516,17 +1344,17 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) - internal sealed class @byteDebugView + internal sealed class Vo1DebugView { - private readonly @byte _t; + private readonly Vo1 _t; - @byteDebugView(@byte t) + Vo1DebugView(Vo1 t) { _t = t; } public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.Byte"; + public global::System.String UnderlyingType => "System.Int32"; public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; #if DEBUG @@ -1567,17 +1395,17 @@ public static ValueObjectOrError<@byte> TryFrom(System.Byte value) using Vogen; -namespace @int +namespace Foo { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(@stringSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(@stringTypeConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(Vo2SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(Vo2TypeConverter))] - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@stringDebugView))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(Vo2DebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] - public partial record struct @string : global::System.IEquatable<@string>, global::System.IEquatable , global::System.IComparable<@string>, global::System.IComparable, global::System.IParsable<@string> + public partial struct Vo2 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; @@ -1598,27 +1426,12 @@ namespace @int EnsureInitialized(); return _value; } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - if (value is null) - { - throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); - } - - - - - - - _value = value; - } } [global::System.Diagnostics.DebuggerStepThroughAttribute] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public @string() + public Vo2() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); @@ -1629,7 +1442,7 @@ namespace @int } [global::System.Diagnostics.DebuggerStepThroughAttribute] - private @string(System.String value) + private Vo2(System.String value) { _value = value; _isInitialized = true; @@ -1640,13 +1453,13 @@ namespace @int /// /// The underlying type. /// An instance of this type. - public static @string From(System.String value) + public static Vo2 From(System.String value) { - @string instance = new @string(value); + Vo2 instance = new Vo2(value); return instance; } @@ -1663,14 +1476,14 @@ public static bool TryFrom(System.String value, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @string vo) + out Vo2 vo) { - vo = new @string(value); + vo = new Vo2(value); return true; }/// @@ -1680,7 +1493,7 @@ public static bool TryFrom(System.String value, /// /// The primitive value. /// A containing either the value object, or an error. -public static ValueObjectOrError<@string> TryFrom(System.String value) +public static ValueObjectOrError TryFrom(System.String value) { @@ -1688,26 +1501,27 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) - return new ValueObjectOrError<@string>(new @string(value)); + return new ValueObjectOrError(new Vo2(value)); } public bool IsInitialized() => _isInitialized; - public static explicit operator @string(System.String value) => From(value); - public static explicit operator System.String(@string value) => value.Value; + + public static explicit operator Vo2(System.String value) => From(value); + public static explicit operator System.String(Vo2 value) => value.Value; // only called internally when something has been deserialized into // its primitive type. - private static @string __Deserialize(System.String value) + private static Vo2 __Deserialize(System.String value) { - return new @string(value); + return new Vo2(value); } - public readonly global::System.Boolean Equals(@string other) + public readonly global::System.Boolean Equals(Vo2 other) { // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. @@ -1715,7 +1529,7 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); } - public global::System.Boolean Equals(@string other, global::System.Collections.Generic.IEqualityComparer<@string> comparer) + public global::System.Boolean Equals(Vo2 other, global::System.Collections.Generic.IEqualityComparer comparer) { return comparer.Equals(this, other); } @@ -1730,18 +1544,25 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) { return comparer.Equals(Value, primitive); } + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is Vo2 && Equals((Vo2) obj); + } + + public static global::System.Boolean operator ==(Vo2 left, Vo2 right) => Equals(left, right); + public static global::System.Boolean operator !=(Vo2 left, Vo2 right) => !(left == right); - public static global::System.Boolean operator ==(@string left, System.String right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(@string left, System.String right) => !Equals(left.Value, right); + public static global::System.Boolean operator ==(Vo2 left, System.String right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(Vo2 left, System.String right) => !Equals(left.Value, right); - public static global::System.Boolean operator ==(System.String left, @string right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.String left, @string right) => !Equals(left, right.Value); + public static global::System.Boolean operator ==(System.String left, Vo2 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.String left, Vo2 right) => !Equals(left, right.Value); - public int CompareTo(@string other) => Value.CompareTo(other.Value); + public int CompareTo(Vo2 other) => Value.CompareTo(other.Value); public int CompareTo(object other) { if(other is null) return 1; - if(other is @string x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type @string", nameof(other)); + if(other is Vo2 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type Vo2", nameof(other)); } @@ -1754,10 +1575,10 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out @string result) { + out Vo2 result) { - result = new @string(s); + result = new Vo2(s); return true; } /// @@ -1766,16 +1587,19 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static @string Parse(global::System.String s, global::System.IFormatProvider provider) { + public static Vo2 Parse(global::System.String s, global::System.IFormatProvider provider) { return From(s); } - + public readonly override global::System.Int32 GetHashCode() { return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); } + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + private readonly void EnsureInitialized() { if (!_isInitialized) @@ -1790,35 +1614,31 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) } } - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - /// - /// Converts a @string to or from JSON. + /// Converts a Vo2 to or from JSON. /// - public class @stringSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@string> + public class Vo2SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter { - public override @string Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo2 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return @string.__Deserialize(reader.GetString()); + return Vo2.__Deserialize(reader.GetString()); } - public override void Write(System.Text.Json.Utf8JsonWriter writer, @string value, global::System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Vo2 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WriteStringValue(value.Value); } #if NET6_0_OR_GREATER - public override @string ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo2 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return @string.__Deserialize(reader.GetString()); + return Vo2.__Deserialize(reader.GetString()); } - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @string value, global::System.Text.Json.JsonSerializerOptions options) + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Vo2 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WritePropertyName(value.Value); } @@ -1826,7 +1646,7 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) } - class @stringTypeConverter : global::System.ComponentModel.TypeConverter + class Vo2TypeConverter : global::System.ComponentModel.TypeConverter { public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) { @@ -1838,7 +1658,7 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) var stringValue = value as global::System.String; if (stringValue is not null) { - return @string.__Deserialize(stringValue); + return Vo2.__Deserialize(stringValue); } return base.ConvertFrom(context, culture, value); @@ -1851,7 +1671,7 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) { - if (value is @string idValue) + if (value is Vo2 idValue) { if (destinationType == typeof(global::System.String)) { @@ -1868,11 +1688,11 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) - internal sealed class @stringDebugView + internal sealed class Vo2DebugView { - private readonly @string _t; + private readonly Vo2 _t; - @stringDebugView(@string t) + Vo2DebugView(Vo2 t) { _t = t; } @@ -1919,17 +1739,17 @@ public static ValueObjectOrError<@string> TryFrom(System.String value) using Vogen; -namespace Whatever +namespace Bar { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo1SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo1TypeConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(Vo1SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(Vo1TypeConverter))] - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo1DebugView))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(Vo1DebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public partial struct MyVo1 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable + public partial struct Vo1 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; @@ -1955,7 +1775,7 @@ namespace Whatever [global::System.Diagnostics.DebuggerStepThroughAttribute] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo1() + public Vo1() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); @@ -1966,7 +1786,7 @@ namespace Whatever } [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo1(System.Int32 value) + private Vo1(System.Int32 value) { _value = value; _isInitialized = true; @@ -1977,13 +1797,13 @@ namespace Whatever /// /// The underlying type. /// An instance of this type. - public static MyVo1 From(System.Int32 value) + public static Vo1 From(System.Int32 value) { - MyVo1 instance = new MyVo1(value); + Vo1 instance = new Vo1(value); return instance; } @@ -2000,14 +1820,14 @@ public static bool TryFrom(System.Int32 value, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 vo) + out Vo1 vo) { - vo = new MyVo1(value); + vo = new Vo1(value); return true; }/// @@ -2017,7 +1837,7 @@ public static bool TryFrom(System.Int32 value, /// /// The primitive value. /// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.Int32 value) +public static ValueObjectOrError TryFrom(System.Int32 value) { @@ -2025,27 +1845,27 @@ public static ValueObjectOrError TryFrom(System.Int32 value) - return new ValueObjectOrError(new MyVo1(value)); + return new ValueObjectOrError(new Vo1(value)); } public bool IsInitialized() => _isInitialized; - public static explicit operator MyVo1(System.Int32 value) => From(value); - public static explicit operator System.Int32(MyVo1 value) => value.Value; + public static explicit operator Vo1(System.Int32 value) => From(value); + public static explicit operator System.Int32(Vo1 value) => value.Value; // only called internally when something has been deserialized into // its primitive type. - private static MyVo1 __Deserialize(System.Int32 value) + private static Vo1 __Deserialize(System.Int32 value) { - return new MyVo1(value); + return new Vo1(value); } - public readonly global::System.Boolean Equals(MyVo1 other) + public readonly global::System.Boolean Equals(Vo1 other) { // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. @@ -2053,7 +1873,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); } - public global::System.Boolean Equals(MyVo1 other, global::System.Collections.Generic.IEqualityComparer comparer) + public global::System.Boolean Equals(Vo1 other, global::System.Collections.Generic.IEqualityComparer comparer) { return comparer.Equals(this, other); } @@ -2066,23 +1886,23 @@ public static ValueObjectOrError TryFrom(System.Int32 value) public readonly override global::System.Boolean Equals(global::System.Object obj) { - return obj is MyVo1 && Equals((MyVo1) obj); + return obj is Vo1 && Equals((Vo1) obj); } - public static global::System.Boolean operator ==(MyVo1 left, MyVo1 right) => Equals(left, right); - public static global::System.Boolean operator !=(MyVo1 left, MyVo1 right) => !(left == right); + public static global::System.Boolean operator ==(Vo1 left, Vo1 right) => Equals(left, right); + public static global::System.Boolean operator !=(Vo1 left, Vo1 right) => !(left == right); - public static global::System.Boolean operator ==(MyVo1 left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo1 left, System.Int32 right) => !Equals(left.Value, right); + public static global::System.Boolean operator ==(Vo1 left, System.Int32 right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(Vo1 left, System.Int32 right) => !Equals(left.Value, right); - public static global::System.Boolean operator ==(System.Int32 left, MyVo1 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, MyVo1 right) => !Equals(left, right.Value); + public static global::System.Boolean operator ==(System.Int32 left, Vo1 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.Int32 left, Vo1 right) => !Equals(left, right.Value); - public int CompareTo(MyVo1 other) => Value.CompareTo(other.Value); + public int CompareTo(Vo1 other) => Value.CompareTo(other.Value); public int CompareTo(object other) { if(other is null) return 1; - if(other is MyVo1 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo1", nameof(other)); + if(other is Vo1 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type Vo1", nameof(other)); } @@ -2096,11 +1916,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2118,11 +1938,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2140,11 +1960,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(utf8Text, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2162,11 +1982,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, style, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2184,11 +2004,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2206,11 +2026,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2228,11 +2048,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, style, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2250,11 +2070,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, provider, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2272,11 +2092,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo1 result) { + out Vo1 result) { if(System.Int32.TryParse(s, out var __v)) { - result = new MyVo1(__v); + result = new Vo1(__v); return true; } @@ -2291,7 +2111,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + public static Vo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { var r = System.Int32.Parse(utf8Text, style, provider); return From(r); } @@ -2303,7 +2123,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { + public static Vo1 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { var r = System.Int32.Parse(utf8Text, provider); return From(r); } @@ -2315,7 +2135,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + public static Vo1 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { var r = System.Int32.Parse(s, style, provider); return From(r); } @@ -2327,7 +2147,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { + public static Vo1 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { var r = System.Int32.Parse(s, provider); return From(r); } @@ -2339,7 +2159,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(string s) { + public static Vo1 Parse(string s) { var r = System.Int32.Parse(s); return From(r); } @@ -2351,7 +2171,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(string s, global::System.Globalization.NumberStyles style) { + public static Vo1 Parse(string s, global::System.Globalization.NumberStyles style) { var r = System.Int32.Parse(s, style); return From(r); } @@ -2363,7 +2183,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { + public static Vo1 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { var r = System.Int32.Parse(s, style, provider); return From(r); } @@ -2375,7 +2195,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo1 Parse(string s, global::System.IFormatProvider provider) { + public static Vo1 Parse(string s, global::System.IFormatProvider provider) { var r = System.Int32.Parse(s, provider); return From(r); } @@ -2408,20 +2228,20 @@ public static ValueObjectOrError TryFrom(System.Int32 value) /// - /// Converts a MyVo1 to or from JSON. + /// Converts a Vo1 to or from JSON. /// - public class MyVo1SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class Vo1SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter { - public override MyVo1 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo1 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { #if NET5_0_OR_GREATER - return MyVo1.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); + return Vo1.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); #else - return MyVo1.__Deserialize(reader.GetInt32()); + return Vo1.__Deserialize(reader.GetInt32()); #endif } - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo1 value, global::System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Vo1 value, global::System.Text.Json.JsonSerializerOptions options) { #if NET5_0_OR_GREATER global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); @@ -2431,12 +2251,12 @@ public static ValueObjectOrError TryFrom(System.Int32 value) } #if NET6_0_OR_GREATER - public override MyVo1 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo1 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return MyVo1.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); + return Vo1.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); } - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo1 value, global::System.Text.Json.JsonSerializerOptions options) + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Vo1 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); } @@ -2444,7 +2264,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) } - class MyVo1TypeConverter : global::System.ComponentModel.TypeConverter + class Vo1TypeConverter : global::System.ComponentModel.TypeConverter { public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) { @@ -2455,8 +2275,8 @@ public static ValueObjectOrError TryFrom(System.Int32 value) { return value switch { - global::System.Int32 intValue => MyVo1.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo1.__Deserialize(result), + global::System.Int32 intValue => Vo1.__Deserialize(intValue), + global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => Vo1.__Deserialize(result), _ => base.ConvertFrom(context, culture, value), }; } @@ -2468,7 +2288,7 @@ public static ValueObjectOrError TryFrom(System.Int32 value) public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) { - if (value is MyVo1 idValue) + if (value is Vo1 idValue) { if (destinationType == typeof(global::System.Int32)) { @@ -2490,11 +2310,11 @@ public static ValueObjectOrError TryFrom(System.Int32 value) - internal sealed class MyVo1DebugView + internal sealed class Vo1DebugView { - private readonly MyVo1 _t; + private readonly Vo1 _t; - MyVo1DebugView(MyVo1 t) + Vo1DebugView(Vo1 t) { _t = t; } @@ -2541,28 +2361,30 @@ public static ValueObjectOrError TryFrom(System.Int32 value) using Vogen; -namespace Whatever +namespace Bar { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo2SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo2TypeConverter))] + [global::System.Text.Json.Serialization.JsonConverter(typeof(Vo2SystemTextJsonConverter))] +[global::System.ComponentModel.TypeConverter(typeof(Vo2TypeConverter))] - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo2DebugView))] + [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(Vo2DebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] - public partial class MyVo2 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable + public partial struct Vo2 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif + private readonly global::System.Boolean _isInitialized; - private readonly System.String _value; -/// -/// Gets the underlying value if set, otherwise a is thrown. -/// -public System.String Value + private readonly System.String _value; + + /// + /// Gets the underlying value if set, otherwise a is thrown. + /// + public readonly System.String Value { [global::System.Diagnostics.DebuggerStepThroughAttribute] get @@ -2575,17 +2397,18 @@ public System.String Value [global::System.Diagnostics.DebuggerStepThroughAttribute] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo2() + public Vo2() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif + _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo2(System.String value) + private Vo2(System.String value) { _value = value; _isInitialized = true; @@ -2596,19 +2419,13 @@ public System.String Value /// /// The underlying type. /// An instance of this type. - public static MyVo2 From(System.String value) + public static Vo2 From(System.String value) { - if (value is null) - { - throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); - } - - - MyVo2 instance = new MyVo2(value); + Vo2 instance = new Vo2(value); return instance; } @@ -2625,19 +2442,14 @@ public static bool TryFrom(System.String value, #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo2 vo) + out Vo2 vo) { - if (value is null) - { - vo = default; - return false; - } - + - vo = new MyVo2(value); + vo = new Vo2(value); return true; }/// @@ -2647,97 +2459,76 @@ public static bool TryFrom(System.String value, /// /// The primitive value. /// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.String value) +public static ValueObjectOrError TryFrom(System.String value) { - if (value is null) - { - return new ValueObjectOrError(Validation.Invalid("The value provided was null")); - } - + - return new ValueObjectOrError(new MyVo2(value)); + return new ValueObjectOrError(new Vo2(value)); } public bool IsInitialized() => _isInitialized; - + + + public static explicit operator Vo2(System.String value) => From(value); + public static explicit operator System.String(Vo2 value) => value.Value; // only called internally when something has been deserialized into // its primitive type. - private static MyVo2 __Deserialize(System.String value) + private static Vo2 __Deserialize(System.String value) { - if (value is null) - { - throw new global::Vogen.ValueObjectValidationException("Cannot create a value object with null."); - } - - - return new MyVo2(value); + return new Vo2(value); } - - public global::System.Boolean Equals(MyVo2 other) - { - if (ReferenceEquals(null, other)) - { - return false; - } - - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - if (ReferenceEquals(this, other)) - { - return true; - } + public readonly global::System.Boolean Equals(Vo2 other) + { + // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. + // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. + if(!_isInitialized || !other._isInitialized) return false; - return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyVo2 other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } + return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); + } + public global::System.Boolean Equals(Vo2 other, global::System.Collections.Generic.IEqualityComparer comparer) + { + return comparer.Equals(this, other); + } - - public global::System.Boolean Equals(System.String primitive) + + public readonly global::System.Boolean Equals(System.String primitive) { return Value.Equals(primitive); } - public global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) + public readonly global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) { return comparer.Equals(Value, primitive); } - public override global::System.Boolean Equals(global::System.Object obj) - { - return Equals(obj as MyVo2); - } - - public static global::System.Boolean operator ==(MyVo2 left, MyVo2 right) => Equals(left, right); - public static global::System.Boolean operator !=(MyVo2 left, MyVo2 right) => !Equals(left, right); - - public static global::System.Boolean operator ==(MyVo2 left, System.String right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo2 left, System.String right) => !Equals(left.Value, right); + public readonly override global::System.Boolean Equals(global::System.Object obj) + { + return obj is Vo2 && Equals((Vo2) obj); + } + + public static global::System.Boolean operator ==(Vo2 left, Vo2 right) => Equals(left, right); + public static global::System.Boolean operator !=(Vo2 left, Vo2 right) => !(left == right); - public static global::System.Boolean operator ==(System.String left, MyVo2 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.String left, MyVo2 right) => !Equals(left, right.Value); + public static global::System.Boolean operator ==(Vo2 left, System.String right) => Equals(left.Value, right); + public static global::System.Boolean operator !=(Vo2 left, System.String right) => !Equals(left.Value, right); - public static explicit operator MyVo2(System.String value) => From(value); - public static explicit operator System.String(MyVo2 value) => value.Value; + public static global::System.Boolean operator ==(System.String left, Vo2 right) => Equals(left, right.Value); + public static global::System.Boolean operator !=(System.String left, Vo2 right) => !Equals(left, right.Value); - public int CompareTo(MyVo2 other) => Value.CompareTo(other.Value); + public int CompareTo(Vo2 other) => Value.CompareTo(other.Value); public int CompareTo(object other) { if(other is null) return 1; - if(other is MyVo2 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo2", nameof(other)); + if(other is Vo2 x) return CompareTo(x); + throw new global::System.ArgumentException("Cannot compare to object as it is not of type Vo2", nameof(other)); } @@ -2750,10 +2541,10 @@ public static ValueObjectOrError TryFrom(System.String value) #if NETCOREAPP3_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] #endif - out MyVo2 result) { + out Vo2 result) { - result = new MyVo2(s); + result = new Vo2(s); return true; } /// @@ -2762,23 +2553,20 @@ public static ValueObjectOrError TryFrom(System.String value) /// The value created via the method. /// /// Thrown when the value can be parsed, but is not valid. - public static MyVo2 Parse(global::System.String s, global::System.IFormatProvider provider) { + public static Vo2 Parse(global::System.String s, global::System.IFormatProvider provider) { return From(s); } - - - public override global::System.Int32 GetHashCode() + + + public readonly override global::System.Int32 GetHashCode() { - unchecked // Overflow is fine, just wrap - { - global::System.Int32 hash = (global::System.Int32) 2166136261; - hash = (hash * 16777619) ^ GetType().GetHashCode(); - hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - return hash; - } + return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); } - private void EnsureInitialized() + /// Returns the string representation of the underlying . + public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; + + private readonly void EnsureInitialized() { if (!_isInitialized) { @@ -2792,35 +2580,31 @@ public static ValueObjectOrError TryFrom(System.String value) } } - - - /// Returns the string representation of the underlying . - public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - + /// - /// Converts a MyVo2 to or from JSON. + /// Converts a Vo2 to or from JSON. /// - public class MyVo2SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter + public class Vo2SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter { - public override MyVo2 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo2 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return MyVo2.__Deserialize(reader.GetString()); + return Vo2.__Deserialize(reader.GetString()); } - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo2 value, global::System.Text.Json.JsonSerializerOptions options) + public override void Write(System.Text.Json.Utf8JsonWriter writer, Vo2 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WriteStringValue(value.Value); } #if NET6_0_OR_GREATER - public override MyVo2 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) + public override Vo2 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { - return MyVo2.__Deserialize(reader.GetString()); + return Vo2.__Deserialize(reader.GetString()); } - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo2 value, global::System.Text.Json.JsonSerializerOptions options) + public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, Vo2 value, global::System.Text.Json.JsonSerializerOptions options) { writer.WritePropertyName(value.Value); } @@ -2828,7 +2612,7 @@ public static ValueObjectOrError TryFrom(System.String value) } - class MyVo2TypeConverter : global::System.ComponentModel.TypeConverter + class Vo2TypeConverter : global::System.ComponentModel.TypeConverter { public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) { @@ -2840,7 +2624,7 @@ public static ValueObjectOrError TryFrom(System.String value) var stringValue = value as global::System.String; if (stringValue is not null) { - return MyVo2.__Deserialize(stringValue); + return Vo2.__Deserialize(stringValue); } return base.ConvertFrom(context, culture, value); @@ -2853,7 +2637,7 @@ public static ValueObjectOrError TryFrom(System.String value) public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) { - if (value is MyVo2 idValue) + if (value is Vo2 idValue) { if (destinationType == typeof(global::System.String)) { @@ -2869,4147 +2653,28 @@ public static ValueObjectOrError TryFrom(System.String value) - internal sealed class MyVo2DebugView - { - private readonly MyVo2 _t; - - MyVo2DebugView(MyVo2 t) + + internal sealed class Vo2DebugView { - _t = t; - } - - public global::System.String UnderlyingType => "System.String"; - public System.String Value => _t.Value ; + private readonly Vo2 _t; - public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo2SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo2TypeConverter))] -"; + Vo2DebugView(Vo2 t) + { + _t = t; } - } - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo3SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo3TypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo3DebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.String, Value = { _value }")] - public readonly partial struct MyVo3 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif + public global::System.Boolean IsInitialized => _t._isInitialized; + public global::System.String UnderlyingType => "System.String"; + public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - private readonly global::System.Boolean _isInitialized; - - private readonly System.String _value; + #if DEBUG + public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; + #endif - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public readonly System.String Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; + public global::System.String Conversions => @"Default"; } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo3() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo3(System.String value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static MyVo3 From(System.String value) - { - - - - - MyVo3 instance = new MyVo3(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.String value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo3 vo) -{ - - - - - - vo = new MyVo3(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.String value) -{ - - - - - - return new ValueObjectOrError(new MyVo3(value)); } - public bool IsInitialized() => _isInitialized; - - - - public static explicit operator MyVo3(System.String value) => From(value); - public static explicit operator System.String(MyVo3 value) => value.Value; - - // only called internally when something has been deserialized into - // its primitive type. - private static MyVo3 __Deserialize(System.String value) - { - - - - - return new MyVo3(value); - } - public readonly global::System.Boolean Equals(MyVo3 other) - { - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyVo3 other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } - - - public readonly global::System.Boolean Equals(System.String primitive) - { - return Value.Equals(primitive); - } - - public readonly global::System.Boolean Equals(System.String primitive, global::System.StringComparer comparer) - { - return comparer.Equals(Value, primitive); - } - public readonly override global::System.Boolean Equals(global::System.Object obj) - { - return obj is MyVo3 && Equals((MyVo3) obj); - } - - public static global::System.Boolean operator ==(MyVo3 left, MyVo3 right) => Equals(left, right); - public static global::System.Boolean operator !=(MyVo3 left, MyVo3 right) => !(left == right); - - public static global::System.Boolean operator ==(MyVo3 left, System.String right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo3 left, System.String right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.String left, MyVo3 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.String left, MyVo3 right) => !Equals(left, right.Value); - - public int CompareTo(MyVo3 other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is MyVo3 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo3", nameof(other)); - } - - - /// - /// - /// - /// True if the value passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.String s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo3 result) { - - - result = new MyVo3(s); - return true; - } - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo3 Parse(global::System.String s, global::System.IFormatProvider provider) { - return From(s); - } - - - public readonly override global::System.Int32 GetHashCode() - { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - } - - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - private readonly void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - - - - /// - /// Converts a MyVo3 to or from JSON. - /// - public class MyVo3SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - public override MyVo3 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyVo3.__Deserialize(reader.GetString()); - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo3 value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WriteStringValue(value.Value); - } - -#if NET6_0_OR_GREATER - public override MyVo3 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyVo3.__Deserialize(reader.GetString()); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo3 value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value); - } -#endif - } - - - class MyVo3TypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - var stringValue = value as global::System.String; - if (stringValue is not null) - { - return MyVo3.__Deserialize(stringValue); - } - - return base.ConvertFrom(context, culture, value); - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is MyVo3 idValue) - { - if (destinationType == typeof(global::System.String)) - { - return idValue.Value; - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - - internal sealed class MyVo3DebugView - { - private readonly MyVo3 _t; - - MyVo3DebugView(MyVo3 t) - { - _t = t; - } - - public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.String"; - public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - - #if DEBUG - public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; - #endif - - public global::System.String Conversions => @"Default"; - } - -} - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo4SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo4TypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo4DebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public readonly partial struct MyVo4 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - - private readonly global::System.Boolean _isInitialized; - - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public readonly System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo4() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo4(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static MyVo4 From(System.Int32 value) - { - - - - - MyVo4 instance = new MyVo4(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 vo) -{ - - - - - - vo = new MyVo4(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError(new MyVo4(value)); -} - - public bool IsInitialized() => _isInitialized; - - - - public static explicit operator MyVo4(System.Int32 value) => From(value); - public static explicit operator System.Int32(MyVo4 value) => value.Value; - - // only called internally when something has been deserialized into - // its primitive type. - private static MyVo4 __Deserialize(System.Int32 value) - { - - - - - return new MyVo4(value); - } - public readonly global::System.Boolean Equals(MyVo4 other) - { - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyVo4 other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } - - - public readonly global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - public readonly override global::System.Boolean Equals(global::System.Object obj) - { - return obj is MyVo4 && Equals((MyVo4) obj); - } - - public static global::System.Boolean operator ==(MyVo4 left, MyVo4 right) => Equals(left, right); - public static global::System.Boolean operator !=(MyVo4 left, MyVo4 right) => !(left == right); - - public static global::System.Boolean operator ==(MyVo4 left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo4 left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, MyVo4 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, MyVo4 right) => !Equals(left, right.Value); - - public int CompareTo(MyVo4 other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is MyVo4 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo4", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo4 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo4(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo4 Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public readonly override global::System.Int32 GetHashCode() - { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - } - - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - private readonly void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - - - - /// - /// Converts a MyVo4 to or from JSON. - /// - public class MyVo4SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - public override MyVo4 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return MyVo4.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return MyVo4.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo4 value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override MyVo4 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyVo4.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo4 value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class MyVo4TypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => MyVo4.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo4.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is MyVo4 idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - - internal sealed class MyVo4DebugView - { - private readonly MyVo4 _t; - - MyVo4DebugView(MyVo4 t) - { - _t = t; - } - - public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.Int32"; - public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - - #if DEBUG - public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; - #endif - - public global::System.String Conversions => @"Default"; - } - -} - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo5SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo5TypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo5DebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public readonly partial record struct MyVo5 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - - private readonly global::System.Boolean _isInitialized; - - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public readonly System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - - - - - - - _value = value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo5() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo5(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static MyVo5 From(System.Int32 value) - { - - - - - MyVo5 instance = new MyVo5(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 vo) -{ - - - - - - vo = new MyVo5(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError(new MyVo5(value)); -} - - public bool IsInitialized() => _isInitialized; - - - public static explicit operator MyVo5(System.Int32 value) => From(value); - public static explicit operator System.Int32(MyVo5 value) => value.Value; - - // only called internally when something has been deserialized into - // its primitive type. - private static MyVo5 __Deserialize(System.Int32 value) - { - - - - - return new MyVo5(value); - } - public readonly global::System.Boolean Equals(MyVo5 other) - { - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyVo5 other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } - - - public readonly global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - - public static global::System.Boolean operator ==(MyVo5 left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo5 left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, MyVo5 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, MyVo5 right) => !Equals(left, right.Value); - - public int CompareTo(MyVo5 other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is MyVo5 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo5", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo5 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo5(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo5 Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public readonly override global::System.Int32 GetHashCode() - { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - } - - private readonly void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - - - - /// - /// Converts a MyVo5 to or from JSON. - /// - public class MyVo5SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - public override MyVo5 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return MyVo5.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return MyVo5.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo5 value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override MyVo5 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyVo5.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo5 value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class MyVo5TypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => MyVo5.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo5.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is MyVo5 idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - - internal sealed class MyVo5DebugView - { - private readonly MyVo5 _t; - - MyVo5DebugView(MyVo5 t) - { - _t = t; - } - - public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.Int32"; - public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - - #if DEBUG - public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; - #endif - - public global::System.String Conversions => @"Default"; - } - -} - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo6SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo6TypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVo6DebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public partial record class MyVo6 : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - private readonly global::System.Boolean _isInitialized; - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - - - - - - - _value = value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyVo6() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyVo6(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static MyVo6 From(System.Int32 value) - { - - - - - - - MyVo6 instance = new MyVo6(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 vo) -{ - - - - - - vo = new MyVo6(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError(new MyVo6(value)); -} - - public bool IsInitialized() => _isInitialized; - - - // only called internally when something has been deserialized into - // its primitive type. - private static MyVo6 __Deserialize(System.Int32 value) - { - - - - - - - return new MyVo6(value); - } - - public virtual global::System.Boolean Equals(MyVo6 other) - { - if (ReferenceEquals(null, other)) - { - return false; - } - - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - if (ReferenceEquals(this, other)) - { - return true; - } - - return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyVo6 other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } - - - public global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - - public static global::System.Boolean operator ==(MyVo6 left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyVo6 left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, MyVo6 right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, MyVo6 right) => !Equals(left, right.Value); - - public static explicit operator MyVo6(System.Int32 value) => From(value); - public static explicit operator System.Int32(MyVo6 value) => value.Value; - - public int CompareTo(MyVo6 other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is MyVo6 x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyVo6", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyVo6 result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyVo6(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyVo6 Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public override global::System.Int32 GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - global::System.Int32 hash = (global::System.Int32) 2166136261; - hash = (hash * 16777619) ^ GetType().GetHashCode(); - hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - return hash; - } - } - - private void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - - - - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - - /// - /// Converts a MyVo6 to or from JSON. - /// - public class MyVo6SystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - public override MyVo6 Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return MyVo6.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return MyVo6.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyVo6 value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override MyVo6 ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyVo6.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyVo6 value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class MyVo6TypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => MyVo6.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyVo6.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is MyVo6 idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - internal sealed class MyVo6DebugView - { - private readonly MyVo6 _t; - - MyVo6DebugView(MyVo6 t) - { - _t = t; - } - - public global::System.String UnderlyingType => "System.Int32"; - public System.Int32 Value => _t.Value ; - - public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyVo6SystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyVo6TypeConverter))] -"; - } - } - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(@intSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(@intTypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@intDebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public partial record struct @int : global::System.IEquatable<@int>, global::System.IEquatable , global::System.IComparable<@int>, global::System.IComparable, global::System.IParsable<@int>, global::System.ISpanParsable<@int>, global::System.IUtf8SpanParsable<@int> - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - - private readonly global::System.Boolean _isInitialized; - - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public readonly System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - - - - - - - _value = value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public @int() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private @int(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static @int From(System.Int32 value) - { - - - - - @int instance = new @int(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int vo) -{ - - - - - - vo = new @int(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError<@int> TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError<@int>(new @int(value)); -} - - public bool IsInitialized() => _isInitialized; - - - public static explicit operator @int(System.Int32 value) => From(value); - public static explicit operator System.Int32(@int value) => value.Value; - - // only called internally when something has been deserialized into - // its primitive type. - private static @int __Deserialize(System.Int32 value) - { - - - - - return new @int(value); - } - public readonly global::System.Boolean Equals(@int other) - { - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(@int other, global::System.Collections.Generic.IEqualityComparer<@int> comparer) - { - return comparer.Equals(this, other); - } - - - public readonly global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - - public static global::System.Boolean operator ==(@int left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(@int left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, @int right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, @int right) => !Equals(left, right.Value); - - public int CompareTo(@int other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is @int x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type @int", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @int result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new @int(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @int Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public readonly override global::System.Int32 GetHashCode() - { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - } - - private readonly void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - - - - /// - /// Converts a @int to or from JSON. - /// - public class @intSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@int> - { - public override @int Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return @int.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return @int.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, @int value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override @int ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return @int.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @int value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class @intTypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => @int.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => @int.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is @int idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - - internal sealed class @intDebugView - { - private readonly @int _t; - - @intDebugView(@int t) - { - _t = t; - } - - public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.Int32"; - public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - - #if DEBUG - public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; - #endif - - public global::System.String Conversions => @"Default"; - } - -} - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(@byteSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(@byteTypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@byteDebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public partial record struct @byte : global::System.IEquatable<@byte>, global::System.IEquatable , global::System.IComparable<@byte>, global::System.IComparable, global::System.IParsable<@byte>, global::System.ISpanParsable<@byte>, global::System.IUtf8SpanParsable<@byte> - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - - private readonly global::System.Boolean _isInitialized; - - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public readonly System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - - - - - - - _value = value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public @byte() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private @byte(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static @byte From(System.Int32 value) - { - - - - - @byte instance = new @byte(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte vo) -{ - - - - - - vo = new @byte(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError<@byte> TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError<@byte>(new @byte(value)); -} - - public bool IsInitialized() => _isInitialized; - - - public static explicit operator @byte(System.Int32 value) => From(value); - public static explicit operator System.Int32(@byte value) => value.Value; - - // only called internally when something has been deserialized into - // its primitive type. - private static @byte __Deserialize(System.Int32 value) - { - - - - - return new @byte(value); - } - public readonly global::System.Boolean Equals(@byte other) - { - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - return global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(@byte other, global::System.Collections.Generic.IEqualityComparer<@byte> comparer) - { - return comparer.Equals(this, other); - } - - - public readonly global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - - public static global::System.Boolean operator ==(@byte left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(@byte left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, @byte right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, @byte right) => !Equals(left, right.Value); - - public int CompareTo(@byte other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is @byte x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type @byte", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out @byte result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new @byte(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static @byte Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public readonly override global::System.Int32 GetHashCode() - { - return global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - } - - private readonly void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public readonly override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - - - - /// - /// Converts a @byte to or from JSON. - /// - public class @byteSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<@byte> - { - public override @byte Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return @byte.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return @byte.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override @byte ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return @byte.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, @byte value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class @byteTypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => @byte.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => @byte.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is @byte idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - - internal sealed class @byteDebugView - { - private readonly @byte _t; - - @byteDebugView(@byte t) - { - _t = t; - } - - public global::System.Boolean IsInitialized => _t._isInitialized; - public global::System.String UnderlyingType => "System.Int32"; - public global::System.String Value => _t._isInitialized ? _t._value.ToString() : "[not initialized]" ; - - #if DEBUG - public global::System.String CreatedWith => _t._stackTrace?.ToString() ?? "the From method"; - #endif - - public global::System.String Conversions => @"Default"; - } - -} - -} - -// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591 - -using Vogen; - -namespace Whatever -{ - - [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(MyIntSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyIntTypeConverter))] - - [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyIntDebugView))] - [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] - public partial record class MyInt : global::System.IEquatable, global::System.IEquatable , global::System.IComparable, global::System.IComparable, global::System.IParsable, global::System.ISpanParsable, global::System.IUtf8SpanParsable - { -#if DEBUG - private readonly global::System.Diagnostics.StackTrace _stackTrace = null; -#endif - private readonly global::System.Boolean _isInitialized; - private readonly System.Int32 _value; - - /// - /// Gets the underlying value if set, otherwise a is thrown. - /// - public System.Int32 Value - { - [global::System.Diagnostics.DebuggerStepThroughAttribute] - get - { - EnsureInitialized(); - return _value; - } - [global::System.Diagnostics.DebuggerStepThroughAttribute] - init - { - - - - - - - _value = value; - } - } - - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public MyInt() - { -#if DEBUG - _stackTrace = new global::System.Diagnostics.StackTrace(); -#endif - _isInitialized = false; - _value = default; - } - - [global::System.Diagnostics.DebuggerStepThroughAttribute] - private MyInt(System.Int32 value) - { - _value = value; - _isInitialized = true; - } - - /// - /// Builds an instance from the provided underlying type. - /// - /// The underlying type. - /// An instance of this type. - public static MyInt From(System.Int32 value) - { - - - - - - - MyInt instance = new MyInt(value); - - return instance; - } - - /// -/// Tries to build an instance from the provided underlying type. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, false will be returned. -/// -/// The underlying type. -/// An instance of the value object. -/// True if the value object can be built, otherwise false. -public static bool TryFrom(System.Int32 value, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt vo) -{ - - - - - - vo = new MyInt(value); - - return true; -}/// -/// Tries to build an instance from the provided underlying value. -/// If a normalization method is provided, it will be called. -/// If validation is provided, and it fails, an error will be returned. -/// -/// The primitive value. -/// A containing either the value object, or an error. -public static ValueObjectOrError TryFrom(System.Int32 value) -{ - - - - - - - return new ValueObjectOrError(new MyInt(value)); -} - - public bool IsInitialized() => _isInitialized; - - - // only called internally when something has been deserialized into - // its primitive type. - private static MyInt __Deserialize(System.Int32 value) - { - - - - - - - return new MyInt(value); - } - - public virtual global::System.Boolean Equals(MyInt other) - { - if (ReferenceEquals(null, other)) - { - return false; - } - - // It's possible to create uninitialized instances via converters such as EfCore (HasDefaultValue), which call Equals. - // We treat anything uninitialized as not equal to anything, even other uninitialized instances of this type. - if(!_isInitialized || !other._isInitialized) return false; - - if (ReferenceEquals(this, other)) - { - return true; - } - - return GetType() == other.GetType() && global::System.Collections.Generic.EqualityComparer.Default.Equals(Value, other.Value); - } - public global::System.Boolean Equals(MyInt other, global::System.Collections.Generic.IEqualityComparer comparer) - { - return comparer.Equals(this, other); - } - - - public global::System.Boolean Equals(System.Int32 primitive) - { - return Value.Equals(primitive); - } - - - public static global::System.Boolean operator ==(MyInt left, System.Int32 right) => Equals(left.Value, right); - public static global::System.Boolean operator !=(MyInt left, System.Int32 right) => !Equals(left.Value, right); - - public static global::System.Boolean operator ==(System.Int32 left, MyInt right) => Equals(left, right.Value); - public static global::System.Boolean operator !=(System.Int32 left, MyInt right) => !Equals(left, right.Value); - - public static explicit operator MyInt(System.Int32 value) => From(value); - public static explicit operator System.Int32(MyInt value) => value.Value; - - public int CompareTo(MyInt other) => Value.CompareTo(other.Value); - public int CompareTo(object other) { - if(other is null) return 1; - if(other is MyInt x) return CompareTo(x); - throw new global::System.ArgumentException("Cannot compare to object as it is not of type MyInt", nameof(other)); - } - - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(utf8Text, style, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(utf8Text, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan utf8Text, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(utf8Text, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(global::System.ReadOnlySpan s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, style, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, global::System.IFormatProvider provider, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, provider, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// True if the value could a) be parsed by the underlying type, and b) passes any validation (after running any optional normalization). - /// - public static global::System.Boolean TryParse(string s, -#if NETCOREAPP3_0_OR_GREATER -[global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] -#endif - out MyInt result) { - if(System.Int32.TryParse(s, out var __v)) { - - - result = new MyInt(__v); - return true; - } - - result = default; - return false; - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(global::System.ReadOnlySpan utf8Text, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(global::System.ReadOnlySpan utf8Text, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(utf8Text, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(global::System.ReadOnlySpan s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(global::System.ReadOnlySpan s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(string s) { - var r = System.Int32.Parse(s); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(string s, global::System.Globalization.NumberStyles style) { - var r = System.Int32.Parse(s, style); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(string s, global::System.Globalization.NumberStyles style, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, style, provider); - return From(r); - } - - /// - /// - /// - /// - /// The value created via the method. - /// - /// Thrown when the value can be parsed, but is not valid. - public static MyInt Parse(string s, global::System.IFormatProvider provider) { - var r = System.Int32.Parse(s, provider); - return From(r); - } - - - - public override global::System.Int32 GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - global::System.Int32 hash = (global::System.Int32) 2166136261; - hash = (hash * 16777619) ^ GetType().GetHashCode(); - hash = (hash * 16777619) ^ global::System.Collections.Generic.EqualityComparer.Default.GetHashCode(Value); - return hash; - } - } - - private void EnsureInitialized() - { - if (!_isInitialized) - { -#if DEBUG - global::System.String message = "Use of uninitialized Value Object at: " + _stackTrace ?? ""; -#else - global::System.String message = "Use of uninitialized Value Object."; -#endif - - throw new global::Vogen.ValueObjectValidationException(message); - } - } - - - - - // record enumerates fields - we just want our Value and to throw if it's not initialized. - /// Returns the string representation of the underlying . - public override global::System.String ToString() =>_isInitialized ? Value.ToString() : "[UNINITIALIZED]"; - - - /// - /// Converts a MyInt to or from JSON. - /// - public class MyIntSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - public override MyInt Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { -#if NET5_0_OR_GREATER - return MyInt.__Deserialize(global::System.Text.Json.JsonSerializer.Deserialize(ref reader, (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo)options.GetTypeInfo(typeof(global::System.Int32)))); -#else - return MyInt.__Deserialize(reader.GetInt32()); -#endif - } - - public override void Write(System.Text.Json.Utf8JsonWriter writer, MyInt value, global::System.Text.Json.JsonSerializerOptions options) - { - #if NET5_0_OR_GREATER - global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value, options); - #else - writer.WriteNumberValue(value.Value); - #endif - } - -#if NET6_0_OR_GREATER - public override MyInt ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) - { - return MyInt.__Deserialize(global::System.Int32.Parse(reader.GetString(), global::System.Globalization.NumberStyles.Any, global::System.Globalization.CultureInfo.InvariantCulture)); - } - - public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, MyInt value, global::System.Text.Json.JsonSerializerOptions options) - { - writer.WritePropertyName(value.Value.ToString(global::System.Globalization.CultureInfo.InvariantCulture)); - } -#endif - } - - - class MyIntTypeConverter : global::System.ComponentModel.TypeConverter - { - public override global::System.Boolean CanConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertFrom(context, sourceType); - } - - public override global::System.Object ConvertFrom(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value) - { - return value switch - { - global::System.Int32 intValue => MyInt.__Deserialize(intValue), - global::System.String stringValue when !global::System.String.IsNullOrEmpty(stringValue) && global::System.Int32.TryParse(stringValue, out var result) => MyInt.__Deserialize(result), - _ => base.ConvertFrom(context, culture, value), - }; - } - - public override bool CanConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Type sourceType) - { - return sourceType == typeof(global::System.Int32) || sourceType == typeof(global::System.String) || base.CanConvertTo(context, sourceType); - } - - public override object ConvertTo(global::System.ComponentModel.ITypeDescriptorContext context, global::System.Globalization.CultureInfo culture, global::System.Object value, global::System.Type destinationType) - { - if (value is MyInt idValue) - { - if (destinationType == typeof(global::System.Int32)) - { - return idValue.Value; - } - - if (destinationType == typeof(global::System.String)) - { - return idValue.Value.ToString(); - } - } - - return base.ConvertTo(context, culture, value, destinationType); - } - } - - - - - - internal sealed class MyIntDebugView - { - private readonly MyInt _t; - - MyIntDebugView(MyInt t) - { - _t = t; - } - - public global::System.String UnderlyingType => "System.Int32"; - public System.Int32 Value => _t.Value ; - - public global::System.String Conversions => @"[global::System.Text.Json.Serialization.JsonConverter(typeof(MyIntSystemTextJsonConverter))] -[global::System.ComponentModel.TypeConverter(typeof(MyIntTypeConverter))] -"; - } - } - } ] \ No newline at end of file diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt index bc95d872fa..1d36a398f8 100644 --- a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt +++ b/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt @@ -26,6 +26,48 @@ // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' #pragma warning disable CS1591 +namespace Namespace1; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties().HaveConversion(); + + + return configurationBuilder; + } + } + +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + namespace Namespace1; public partial class EfCoreConverters @@ -83,6 +125,48 @@ public static class MyVo1__Ext } +#endif + +#if NET8_0_OR_GREATER + +// ------------------------------------------------------------------------------ +// +// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +// ------------------------------------------------------------------------------ + +// Suppress warnings about [Obsolete] member usage in generated code. +#pragma warning disable CS0618 + +// Suppress warnings for 'Override methods on comparable types'. +#pragma warning disable CA1036 + +// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators +#pragma warning disable MA0097 + +// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' +// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. +#pragma warning disable CS8669 + +// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' +#pragma warning disable CS1591 + +namespace Namespace2; + + public static class EfCoreConverters__Ext + { + public static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllInEfCoreConverters(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) + { + configurationBuilder.Properties().HaveConversion(); + + + return configurationBuilder; + } + } + #endif #if NET8_0_OR_GREATER From 1901561facd846ac25d77f75fabe9927911101fa Mon Sep 17 00:00:00 2001 From: Steve Dunn Date: Wed, 19 Jun 2024 08:31:49 +0100 Subject: [PATCH 3/4] Tidy up --- samples/Onion/Infra/EfCoreScenario.cs | 3 +- samples/Onion/README.md | 2 +- .../EFCore/EfCoreExamples.cs | 2 +- ...BuildEfCoreConverterSpecsFromAttributes.cs | 21 ++- src/Vogen/Diagnostics/DiagnosticsCatalogue.cs | 4 +- tests/AnalyzerTests/EfCoreTests.cs | 82 +++++++++ tests/AnalyzerTests/TestRunner.cs | 3 + .../EfCoreGeneration/EfCoreGenerationTests.cs | 163 ++++++++++++++++++ ...converters_for_escaped_types.verified.txt} | 0 ...sent_and_on_net_8_or_greater.verified.txt} | 0 ...ters_that_respect_namespaces.verified.txt} | 0 .../GeneralStuff/GeneralTests.cs | 150 ---------------- 12 files changed, 268 insertions(+), 162 deletions(-) create mode 100644 tests/AnalyzerTests/EfCoreTests.cs create mode 100644 tests/SnapshotTests/EfCoreGeneration/EfCoreGenerationTests.cs rename tests/SnapshotTests/{GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt => EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_for_escaped_types.verified.txt} (100%) rename tests/SnapshotTests/{GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt => EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt} (100%) rename tests/SnapshotTests/{GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt => EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_that_respect_namespaces.verified.txt} (100%) diff --git a/samples/Onion/Infra/EfCoreScenario.cs b/samples/Onion/Infra/EfCoreScenario.cs index 2b433b3b81..a6e4360cbd 100644 --- a/samples/Onion/Infra/EfCoreScenario.cs +++ b/samples/Onion/Infra/EfCoreScenario.cs @@ -19,7 +19,7 @@ namespace UsingTypesGeneratedInTheSameProject; */ -// By having this partial class, Vogen will generate converters for each value object mentioned in the attributes. +// By having this partial marker class, Vogen will generate converters for each value object mentioned in the attributes. // The naming of this class is later used to get the converters, or for when registering them via the generated extension // methods like `RegisterAllInEfCoreConverters` or `HasVogenConversion` [EfCoreConverter] @@ -27,6 +27,7 @@ namespace UsingTypesGeneratedInTheSameProject; [EfCoreConverter] [EfCoreConverter] [EfCoreConverter] +[EfCoreConverter] internal sealed partial class EfCoreConverters; public static class EfCoreScenario diff --git a/samples/Onion/README.md b/samples/Onion/README.md index 795b36aa9e..7aafa510fa 100644 --- a/samples/Onion/README.md +++ b/samples/Onion/README.md @@ -1,4 +1,4 @@ -This folder contains a small 'Onion'-like project consisting of two projects, Doman and Infra. +This folder contains a small 'Onion'-like project consisting of two projects, Domain and Infra. It demonstrates using value objects that were created in the Domain layer, in the Infra(structure) layer. diff --git a/samples/Vogen.Examples/SerializationAndConversion/EFCore/EfCoreExamples.cs b/samples/Vogen.Examples/SerializationAndConversion/EFCore/EfCoreExamples.cs index 9b56a0d021..f9a28f7fbf 100644 --- a/samples/Vogen.Examples/SerializationAndConversion/EFCore/EfCoreExamples.cs +++ b/samples/Vogen.Examples/SerializationAndConversion/EFCore/EfCoreExamples.cs @@ -14,7 +14,7 @@ public class EfCoreExamples : IScenario public string GetDescription() => """ Uses value objects in EF Core. * It creates DB contexts and adds values to it, and saves - * It then create another context and lists the items + * It then creates another context and lists the items It demonstrates: * how to use value objects in a model diff --git a/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs b/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs index 3624f27565..609f176f46 100644 --- a/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs +++ b/src/Vogen/BuildEfCoreConverterSpecsFromAttributes.cs @@ -11,7 +11,7 @@ namespace Vogen; internal static class BuildEfCoreConverterSpecsFromAttributes { - public static EfCoreConverterSpecResult? TryBuild(AttributeData att, in INamedTypeSymbol? sourceSymbol) + public static EfCoreConverterSpecResult? TryBuild(AttributeData att, in INamedTypeSymbol? markerClassSymbol) { ImmutableArray args = att.ConstructorArguments; @@ -28,16 +28,23 @@ internal static class BuildEfCoreConverterSpecsFromAttributes return null; } - ImmutableArray t = att.AttributeClass.TypeArguments; + ImmutableArray argumentSymbols = att.AttributeClass.TypeArguments; - if (t.Length != 1) return null; + if (argumentSymbols.Length != 1) + { + return null; + } - var voSymbol = t[0] as INamedTypeSymbol; - if (voSymbol is null) return null; + var voSymbol = argumentSymbols[0] as INamedTypeSymbol; + + if (voSymbol is null) + { + return null; + } if (!VoFilter.IsTarget(voSymbol)) { - return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.EfCoreTargetMustBeAVo(sourceSymbol!, voSymbol)); + return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.EfCoreTargetMustBeAVo(markerClassSymbol!, voSymbol)); } List attrs = VoFilter.TryGetValueObjectAttributes(voSymbol).ToList(); @@ -59,7 +66,7 @@ internal static class BuildEfCoreConverterSpecsFromAttributes return EfCoreConverterSpecResult.Error(DiagnosticsCatalogue.VoMustExplicitlySpecifyPrimitiveToBeAnEfCoreTarget(voSymbol)); } - return EfCoreConverterSpecResult.Ok(voSymbol, underlyingType, sourceSymbol!); + return EfCoreConverterSpecResult.Ok(voSymbol, underlyingType, markerClassSymbol!); } private static INamedTypeSymbol? ResolveUnderlyingType(INamedTypeSymbol method) diff --git a/src/Vogen/Diagnostics/DiagnosticsCatalogue.cs b/src/Vogen/Diagnostics/DiagnosticsCatalogue.cs index ead970b639..c9d1a7ebdf 100644 --- a/src/Vogen/Diagnostics/DiagnosticsCatalogue.cs +++ b/src/Vogen/Diagnostics/DiagnosticsCatalogue.cs @@ -194,8 +194,8 @@ public static Diagnostic CustomExceptionMustHaveValidConstructor(INamedTypeSymbo public static Diagnostic VoMustExplicitlySpecifyPrimitiveToBeAnEfCoreTarget(INamedTypeSymbol symbol) => Create(_efCoreTargetMustExplicitlySpecifyItsPrimitive, symbol.Locations, symbol.Name); - public static Diagnostic EfCoreTargetMustBeAVo(INamedTypeSymbol sourceSymbol, INamedTypeSymbol targetSymbol) => - Create(_efCoreTargetMustBeAVo, sourceSymbol.Locations, sourceSymbol.Name, targetSymbol.Name); + public static Diagnostic EfCoreTargetMustBeAVo(INamedTypeSymbol markerClassSymbol, INamedTypeSymbol voSymbol) => + Create(_efCoreTargetMustBeAVo, voSymbol.Locations, markerClassSymbol.Name, voSymbol.Name); private static DiagnosticDescriptor CreateDescriptor(string code, string title, string messageFormat, DiagnosticSeverity severity = DiagnosticSeverity.Error) { diff --git a/tests/AnalyzerTests/EfCoreTests.cs b/tests/AnalyzerTests/EfCoreTests.cs new file mode 100644 index 0000000000..10e8699918 --- /dev/null +++ b/tests/AnalyzerTests/EfCoreTests.cs @@ -0,0 +1,82 @@ +using System.Collections.Immutable; +using System.Linq; +using System.Threading.Tasks; +using FluentAssertions; +using Microsoft.CodeAnalysis; +using Shared; +using VerifyXunit; +using Vogen; + +namespace AnalyzerTests; + +[UsesVerify] +public class EfCoreTests +{ + public class Marker_class_attributes_must_reference_value_objects + { + [Fact] + public async Task OK_when_they_all_reference_vos() + { + var source = """ + using System; + using Vogen; + + public class NotAValueObject; + + [ValueObject] + public partial struct Vo1; + + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(diagnostics => diagnostics.Should().BeEmpty()) + .RunOn(TargetFramework.Net8_0); + } + + [Fact] + public async Task Errors_on_markers_that_are_not_vos() + { + var source = """ + using System; + using Vogen; + + public class NotAValueObject; + public class NotAValueObject2; + + [ValueObject] + public partial struct Vo1; + + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + """; + + await new TestRunner() + .WithSource(source) + .ValidateWith(Validate) + .RunOn(TargetFramework.Net8_0); + + static void Validate(ImmutableArray diagnostics) + { + diagnostics.Should().HaveCount(2); + diagnostics.Should().AllSatisfy(x => x.Id.Should().Be("VOG031")); + diagnostics.Where( + d => d.GetMessage() == + "Type 'EfCoreConverters' specifies a target value object of NotAValueObject but it is not a value object") + .Should() + .HaveCount(1); + + diagnostics.Where( + d => d.GetMessage() == + "Type 'EfCoreConverters' specifies a target value object of NotAValueObject2 but it is not a value object") + .Should() + .HaveCount(1); + } + } + } +} \ No newline at end of file diff --git a/tests/AnalyzerTests/TestRunner.cs b/tests/AnalyzerTests/TestRunner.cs index 683dad5ab2..8b9135a488 100644 --- a/tests/AnalyzerTests/TestRunner.cs +++ b/tests/AnalyzerTests/TestRunner.cs @@ -44,6 +44,9 @@ public TestRunner ValidateWith(Action> method) return this; } + public async Task RunOn(TargetFramework framework, bool ignoreInitialCompilationErrors = false) + => await RunOn(ignoreInitialCompilationErrors, framework); + private async Task RunOn(bool ignoreInitialCompilationErrors, params TargetFramework[] frameworks) { _ = _source ?? throw new InvalidOperationException("No source!"); diff --git a/tests/SnapshotTests/EfCoreGeneration/EfCoreGenerationTests.cs b/tests/SnapshotTests/EfCoreGeneration/EfCoreGenerationTests.cs new file mode 100644 index 0000000000..7dcbe09789 --- /dev/null +++ b/tests/SnapshotTests/EfCoreGeneration/EfCoreGenerationTests.cs @@ -0,0 +1,163 @@ +using System.Threading.Tasks; +using Shared; +using VerifyXunit; +using Vogen; + +namespace SnapshotTests.EfCoreGeneration; + +// contrib: An idea place to start a new feature. Write a new test for the feature here to get it working, then +// add more tests. Move these tests if there are several of them, and it makes sense to group them. + +[UsesVerify] +public class EfCoreGenerationTests +{ + [Fact] + public async Task Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater() + { + var source = """ + using System; + using Vogen; + + namespace Foo + { + [ValueObject] + public partial struct Vo1; + + [ValueObject] + public partial struct Vo2; + } + + namespace Bar + { + [ValueObject] + public partial struct Vo1; + + [ValueObject] + public partial struct Vo2; + } + + namespace Baz1 + { + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + } + + namespace Baz2 + { + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + public partial class EfCoreConverters; + } + """; + + await new SnapshotRunner() + .WithSource(source) + .RunOn(TargetFramework.Net8_0); + } + + [Fact] + public async Task Writes_efcore_converters_for_escaped_types() + { + var source = """ + using System; + using Vogen; + + namespace @int + { + [ValueObject] + public partial struct @byte; + + [ValueObject] + public partial record struct @string; + } + + namespace Whatever + { + [ValueObject] + public partial struct MyVo1; + + [ValueObject] + public partial class MyVo2; + + [ValueObject] + public readonly partial struct MyVo3; + + [ValueObject] + public readonly partial struct MyVo4; + + [ValueObject] + public readonly partial record struct MyVo5; + + [ValueObject] + public partial record class MyVo6; + + [ValueObject] + public partial record struct @int; + + [ValueObject] + public partial record struct @byte; + + [ValueObject(typeof(int))] + public partial record MyInt; + + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter] + [EfCoreConverter<@int>] + [EfCoreConverter<@byte>] + [EfCoreConverter] + public partial class EfCoreConverters; + } + + namespace @byte + { + [EfCoreConverter<@int.@byte>] + [EfCoreConverter<@int.@string>] + public partial class EfCoreConverters; + } + """; + + await new SnapshotRunner() + .WithSource(source) + .RunOn(TargetFramework.Net8_0); + } + + [Fact] + public async Task Writes_efcore_converters_that_respect_namespaces() + { + var source = """ + using System; + using Vogen; + + namespace Namespace1 + { + [ValueObject(conversions: Conversions.EfCoreValueConverter)] + public partial class MyVo1 { } + + [EfCoreConverter] + public partial class EfCoreConverters { } + } + + namespace Namespace2 + { + [ValueObject(conversions: Conversions.EfCoreValueConverter)] + public partial class MyVo1 { } + + [EfCoreConverter] + public partial class EfCoreConverters { } + } + """; + + await new SnapshotRunner() + .WithSource(source) + .RunOn(TargetFramework.Net8_0); + } +} \ No newline at end of file diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt b/tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_for_escaped_types.verified.txt similarity index 100% rename from tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_for_escaped_types.verified.txt rename to tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_for_escaped_types.verified.txt diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt b/tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt similarity index 100% rename from tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt rename to tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater.verified.txt diff --git a/tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt b/tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_that_respect_namespaces.verified.txt similarity index 100% rename from tests/SnapshotTests/GeneralStuff/snapshots/snap-v8.0/GeneralTests.Writes_efcore_converters_that_respect_namespaces.verified.txt rename to tests/SnapshotTests/EfCoreGeneration/snapshots/snap-v8.0/EfCoreGenerationTests.Writes_efcore_converters_that_respect_namespaces.verified.txt diff --git a/tests/SnapshotTests/GeneralStuff/GeneralTests.cs b/tests/SnapshotTests/GeneralStuff/GeneralTests.cs index e4a2d6b75d..2d300ee77b 100644 --- a/tests/SnapshotTests/GeneralStuff/GeneralTests.cs +++ b/tests/SnapshotTests/GeneralStuff/GeneralTests.cs @@ -11,156 +11,6 @@ namespace SnapshotTests.GeneralStuff; [UsesVerify] public class GeneralTests { - [Fact] - public async Task Writes_efcore_converters_if_attribute_present_and_on_net_8_or_greater() - { - var source = """ - using System; - using Vogen; - - namespace Foo - { - [ValueObject] - public partial struct Vo1; - - [ValueObject] - public partial struct Vo2; - } - - namespace Bar - { - [ValueObject] - public partial struct Vo1; - - [ValueObject] - public partial struct Vo2; - } - - namespace Baz1 - { - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - public partial class EfCoreConverters; - } - - namespace Baz2 - { - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - public partial class EfCoreConverters; - } - """; - - await new SnapshotRunner() - .WithSource(source) - .RunOn(TargetFramework.Net8_0); - } - - [Fact] - public async Task Writes_efcore_converters_for_escaped_types() - { - var source = """ - using System; - using Vogen; - - namespace @int - { - [ValueObject] - public partial struct @byte; - - [ValueObject] - public partial record struct @string; - } - - namespace Whatever - { - [ValueObject] - public partial struct MyVo1; - - [ValueObject] - public partial class MyVo2; - - [ValueObject] - public readonly partial struct MyVo3; - - [ValueObject] - public readonly partial struct MyVo4; - - [ValueObject] - public readonly partial record struct MyVo5; - - [ValueObject] - public partial record class MyVo6; - - [ValueObject] - public partial record struct @int; - - [ValueObject] - public partial record struct @byte; - - [ValueObject(typeof(int))] - public partial record MyInt; - - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter] - [EfCoreConverter<@int>] - [EfCoreConverter<@byte>] - [EfCoreConverter] - public partial class EfCoreConverters; - } - - namespace @byte - { - [EfCoreConverter<@int.@byte>] - [EfCoreConverter<@int.@string>] - public partial class EfCoreConverters; - } - """; - - await new SnapshotRunner() - .WithSource(source) - .RunOn(TargetFramework.Net8_0); - } - - [Fact] - public async Task Writes_efcore_converters_that_respect_namespaces() - { - var source = """ - using System; - using Vogen; - - namespace Namespace1 - { - [ValueObject(conversions: Conversions.EfCoreValueConverter)] - public partial class MyVo1 { } - - [EfCoreConverter] - public partial class EfCoreConverters { } - } - - namespace Namespace2 - { - [ValueObject(conversions: Conversions.EfCoreValueConverter)] - public partial class MyVo1 { } - - [EfCoreConverter] - public partial class EfCoreConverters { } - } - """; - - await new SnapshotRunner() - .WithSource(source) - .RunOn(TargetFramework.Net8_0); - } - [Fact] public async Task Can_specify_swashbuckle_filter_generation_for_openapi() { From f56947731477ccd17e0f31705f168cb04abdd426 Mon Sep 17 00:00:00 2001 From: Steve Dunn Date: Wed, 19 Jun 2024 10:40:29 +0100 Subject: [PATCH 4/4] Post refactor --- .../Writerside/topics/how-to/efcore-tips.md | 67 +++++-- .../reference/EfCoreIntegrationHowTo.md | 33 ++- samples/Onion/Infra/EfCoreScenario.cs | 1 - src/Vogen/CompilationExtensions.cs | 4 + .../EfCoreConverterMarkerClassResults.cs | 25 +++ src/Vogen/EfCoreConverterSpecResult.cs | 24 +-- src/Vogen/GeneratedCodeSegments.cs | 37 ++++ src/Vogen/ManageAttributes.cs | 6 +- src/Vogen/Util.cs | 31 ++- src/Vogen/ValueObjectGenerator.cs | 6 +- src/Vogen/WriteEfCoreSpecs.cs | 188 ++++++------------ src/Vogen/WriteStaticAbstracts.cs | 2 +- src/Vogen/WriteWorkItems.cs | 64 +----- tests/AnalyzerTests/EfCoreTests.cs | 3 - 14 files changed, 243 insertions(+), 248 deletions(-) create mode 100644 src/Vogen/EfCoreConverterMarkerClassResults.cs create mode 100644 src/Vogen/GeneratedCodeSegments.cs diff --git a/docs/site/Writerside/topics/how-to/efcore-tips.md b/docs/site/Writerside/topics/how-to/efcore-tips.md index 6c58382d0a..1a79bf2d90 100644 --- a/docs/site/Writerside/topics/how-to/efcore-tips.md +++ b/docs/site/Writerside/topics/how-to/efcore-tips.md @@ -9,7 +9,8 @@ Thank you to [@jeffward01](https://github.com/jeffward01) for this item. The goal of this is to identify types that are generated by Vogen. ### Use Case -I use Vogen alongside EfCore, I like to programmatically add ValueConverters by convention, I need to identity which properties on my entities are Vogen Generated value objects. +I use Vogen alongside EfCore, I like to programmatically add `ValueConverter`s by convention, +I need to identity which properties on my entities are generated value objects. ### Solution Vogen decorates the source it generates with the `GeneratedCodeAttribute`. This provides metadata about the tool which generated the code, this is what we'll use as an identifier. @@ -32,12 +33,15 @@ internal static class AttributeHelper { public static bool IsVogenValueObject(this Type targetType) { - Maybe generatedCodeAttribute = targetType.GetClassAttribute(); - return generatedCodeAttribute.HasValue && generatedCodeAttribute.Value.Tool == "Vogen"; + Maybe generatedCodeAttribute = + targetType.GetClassAttribute(); + + return generatedCodeAttribute.HasValue && + generatedCodeAttribute.Value.Tool == "Vogen"; } - private static Maybe GetClassAttribute(this Type targetType) - where TAttribute : Attribute + private static Maybe GetClassAttribute( + this Type targetType) where TAttribute : Attribute { return targetType.GetAttribute(); } @@ -47,16 +51,17 @@ internal static class AttributeHelper Usage Example (From EfCore) ```c# - foreach (IMutableEntityType entityType in builder.Model.GetEntityTypes()) + foreach (IMutableEntityType et in builder.Model.GetEntityTypes()) { - PropertyInfo[] properties = entityType.ClrType.GetProperties(); + PropertyInfo[] properties = et.ClrType.GetProperties(); foreach (PropertyInfo propertyInfo in properties) { if (propertyInfo.PropertyType.IsVogenValueObject()) { // Huzzah! - // Do something with the property that is a value object generated by Vogen.... + // Do something with the property that is a value + // object generated by Vogen.... } } } @@ -82,11 +87,14 @@ public class VogenStronglyTypedIdTests { Type vogenType = typeof(VogenStronglyTypedId); - Maybe generatedCodeAttribute = vogenType.GetClassAttribute(); + Maybe generatedCodeAttribute = + vogenType.GetClassAttribute(); Assert.True(generatedCodeAttribute.HasValue); - GeneratedCodeAttribute? valueOfAttribute = generatedCodeAttribute.Value; - valueOfAttribute.Tool.Should() - .Be("Vogen"); + + GeneratedCodeAttribute? valueOfAttribute = + generatedCodeAttribute.Value; + + valueOfAttribute.Tool.Should().Be("Vogen"); } [Fact] @@ -117,26 +125,37 @@ Add all VOs that have EfCoreValueConverter to the `ModelConfigurationBuilder`: ```C# internal static class VogenExtensions { - public static void ApplyVogenEfConvertersFromAssembly(this ModelConfigurationBuilder configurationBuilder, Assembly assembly) + public static void ApplyVogenEfConvertersFromAssembly( + this ModelConfigurationBuilder configurationBuilder, + Assembly assembly) { var types = assembly.GetTypes(); foreach (var type in types) { - if (IsVogenValueObject(type) && TryGetEfValueConverter(type, out var efCoreConverterType)) + if (IsVogenValueObject(type) && TryGetEfValueConverter( + type, + out var efCoreConverterType)) { - configurationBuilder.Properties(type).HaveConversion(efCoreConverterType); + configurationBuilder + .Properties(type) + .HaveConversion(efCoreConverterType); } } } - private static bool TryGetEfValueConverter(Type type, [NotNullWhen(true)]out Type? efCoreConverterType) + private static bool TryGetEfValueConverter( + Type type, + [NotNullWhen(true)]out Type? efCoreConverterType) { var inner = type.GetNestedTypes(); foreach (var innerType in inner) { - if (!typeof(ValueConverter).IsAssignableFrom(innerType) || !"EfCoreValueConverter".Equals(innerType.Name, StringComparison.Ordinal)) + if (!typeof(ValueConverter).IsAssignableFrom(innerType) || + !"EfCoreValueConverter".Equals( + innerType.Name, + StringComparison.Ordinal)) { continue; } @@ -151,17 +170,23 @@ internal static class VogenExtensions private static bool IsVogenValueObject(MemberInfo targetType) { - var generatedCodeAttribute =targetType.GetCustomAttribute(); - return "Vogen".Equals(generatedCodeAttribute?.Tool, StringComparison.Ordinal); + var generatedCodeAttribute = + targetType.GetCustomAttribute(); + + return "Vogen".Equals( + generatedCodeAttribute?.Tool, + StringComparison.Ordinal); } } ``` Usage: In your `dbcontext`: ```C# -protected override void ConfigureConventions(ModelConfigurationBuilder configurationBuilder) +protected override void ConfigureConventions( + ModelConfigurationBuilder configurationBuilder) { - configurationBuilder.ApplyVogenEfConvertersFromAssembly(typeof(YOURDBCONTEXT).Assembly); + configurationBuilder.ApplyVogenEfConvertersFromAssembly( + typeof(YOURDBCONTEXT).Assembly); } ``` diff --git a/docs/site/Writerside/topics/reference/EfCoreIntegrationHowTo.md b/docs/site/Writerside/topics/reference/EfCoreIntegrationHowTo.md index bc0ca71398..3e87b9c87e 100644 --- a/docs/site/Writerside/topics/reference/EfCoreIntegrationHowTo.md +++ b/docs/site/Writerside/topics/reference/EfCoreIntegrationHowTo.md @@ -1,6 +1,6 @@ # Integration with Entity Framework Core -It is possible to use value objects in EFCore. +It is possible to use value objects (VOs) in EFCore. Using VO structs is straightforward, and no converter is required. Using VO classes requires generating a converter. @@ -14,19 +14,22 @@ public partial class Name } ``` -Another way, if you're using .NET 8 or greater, is to use `EfCoreConverter` attributes: +Another way, if you're using .NET 8 or greater, is to use `EfCoreConverter` attributes on +a marker class: ```c# [EfCoreConverter] [EfCoreConverter] -public partial class VogenEfCoreConverters; +internal partial class VogenEfCoreConverters; ``` -This allows you to create the generator in a separate project, -which is useful if you're using something like Onion architecture, +The source generator augments this type with EFCore converters and comparers. +This allows you to create these types in a separate project, +which is useful if you're using something like Onion Architecture, where you don't want your domain objects to reference infrastructure code. -Now the converters are generated, in your database context, you then specify the conversion: +Now that the converters are generated by one of the approaches above, +in your database context, you can now specify the conversion: ```c# protected override void OnModelCreating(ModelBuilder builder) @@ -39,6 +42,22 @@ Now the converters are generated, in your database context, you then specify the } ``` +`HasConversion` is an extension method that Vogen generates. + +Another approach, if you're using .NET 8 or greater, is to override `ConfigureConventions` + +```c# + protected override void ConfigureConventions( + ModelConfigurationBuilder configurationBuilder) + { + base.ConfigureConventions(configurationBuilder); + + configurationBuilder.RegisterAllInVogenEfCoreConverters(); + } +``` + +`RegisterAllInVogenEfCoreConverters` is a generated extension method. +Note that the extension method's name after `RegisterAllIn` relates to the name of marker class. An [EFCore example is included in the source](https://github.com/SteveDunn/Vogen/tree/main/samples/Vogen.Examples/SerializationAndConversion/EFCore). @@ -115,8 +134,6 @@ public static class __IdEfCoreExtensions For the `Id` field, because it's being used as a primary key, it needs to be a class because EFCore compares it to null to determine if it should be auto-generated. When it is null, EFCore will use the specified `SomeIdValueGenerator`, which looks like: - - ```c# internal class SomeIdValueGenerator : ValueGenerator { diff --git a/samples/Onion/Infra/EfCoreScenario.cs b/samples/Onion/Infra/EfCoreScenario.cs index a6e4360cbd..7d45e865e2 100644 --- a/samples/Onion/Infra/EfCoreScenario.cs +++ b/samples/Onion/Infra/EfCoreScenario.cs @@ -27,7 +27,6 @@ namespace UsingTypesGeneratedInTheSameProject; [EfCoreConverter] [EfCoreConverter] [EfCoreConverter] -[EfCoreConverter] internal sealed partial class EfCoreConverters; public static class EfCoreScenario diff --git a/src/Vogen/CompilationExtensions.cs b/src/Vogen/CompilationExtensions.cs index 744eeb85a0..22fb817353 100644 --- a/src/Vogen/CompilationExtensions.cs +++ b/src/Vogen/CompilationExtensions.cs @@ -2,11 +2,15 @@ using Microsoft.CodeAnalysis; using System.Collections.Generic; using System.Diagnostics; +using Microsoft.CodeAnalysis.CSharp; namespace Vogen; internal static class CompilationExtensions { + public static bool IsAtLeastCSharpVersion(this Compilation compilation, LanguageVersion langVersion) => + (compilation as CSharpCompilation)?.LanguageVersion >= langVersion; + public static IEnumerable GetTypesByMetadataName(this Compilation compilation, string typeMetadataName) { var symbol = compilation.Assembly.GetTypeByMetadataName(typeMetadataName); diff --git a/src/Vogen/EfCoreConverterMarkerClassResults.cs b/src/Vogen/EfCoreConverterMarkerClassResults.cs new file mode 100644 index 0000000000..15f6858bcd --- /dev/null +++ b/src/Vogen/EfCoreConverterMarkerClassResults.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; +using System.Linq; +using Microsoft.CodeAnalysis; + +namespace Vogen; + +/// +/// Represents a collection of results that are all associated with the same source symbol (that is, +/// the method containing the `EfCoreConverter` attributes. +/// +internal sealed class EfCoreConverterMarkerClassResults +{ + public INamedTypeSymbol? MarkerSymbol { get; } + + public EfCoreConverterMarkerClassResults(INamedTypeSymbol? markerSymbol, IEnumerable results) + { + MarkerSymbol = markerSymbol; + Results = results.Where(r => r is not null)!; + } + + private IEnumerable Results { get; } + + public IEnumerable Diagnostics => Results.SelectMany(r => r.Diagnostics); + public IEnumerable Specs => Results; +} \ No newline at end of file diff --git a/src/Vogen/EfCoreConverterSpecResult.cs b/src/Vogen/EfCoreConverterSpecResult.cs index a1db8cbb42..e00f85761f 100644 --- a/src/Vogen/EfCoreConverterSpecResult.cs +++ b/src/Vogen/EfCoreConverterSpecResult.cs @@ -5,34 +5,14 @@ namespace Vogen; /// -/// Represents a collection of results that are all associated with the same source symbol (that is, -/// the method containing the `EfCoreConverter` attributes. -/// -internal sealed class EfCoreConverterSpecResults -{ - public INamedTypeSymbol? SourceSymbol { get; } - - public EfCoreConverterSpecResults(INamedTypeSymbol? sourceSymbol, IEnumerable results) - { - SourceSymbol = sourceSymbol; - Results = results.Where(r => r is not null)!; - } - - private IEnumerable Results { get; } - - public IEnumerable Diagnostics => Results.SelectMany(r => r.Diagnostics); - public IEnumerable Specs => Results; -} - -/// -/// Represents the result of an 'EFCore Converter Spec' - that is, a partial class decorated with an `EfCoreConverter<>` +/// Represents the result of an 'EFCore Converter Spec' - that is, a partial class decorated with an `EfCoreConverter` /// attribute. This is the singular item; a particular attribute on the method, and contains the symbol for the /// value object being references, a symbol for the underlying type of the value object, and a symbol for the method /// containing the attribute. /// internal sealed class EfCoreConverterSpecResult { - public EfCoreConverterSpecResult(EfCoreConverterSpec? spec, IEnumerable diagnostics) + private EfCoreConverterSpecResult(EfCoreConverterSpec? spec, IEnumerable diagnostics) { Spec = spec; Diagnostics = diagnostics.ToList(); diff --git a/src/Vogen/GeneratedCodeSegments.cs b/src/Vogen/GeneratedCodeSegments.cs new file mode 100644 index 0000000000..4b4145260e --- /dev/null +++ b/src/Vogen/GeneratedCodeSegments.cs @@ -0,0 +1,37 @@ +// The symbol 'Environment' is banned for use by analyzers: see https://github.com/dotnet/roslyn-analyzers/issues/6467 +#pragma warning disable RS1035 + +using System; + +namespace Vogen; + +internal static class GeneratedCodeSegments +{ + internal static readonly string Preamble = + """ + // ------------------------------------------------------------------------------ + // + // This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) + // + // Changes to this file may cause incorrect behavior and will be lost if + // the code is regenerated. + // + // ------------------------------------------------------------------------------ + + // Suppress warnings about [Obsolete] member usage in generated code. + #pragma warning disable CS0618 + + // Suppress warnings for 'Override methods on comparable types'. + #pragma warning disable CA1036 + + // Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators + #pragma warning disable MA0097 + + // Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' + // The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. + #pragma warning disable CS8669 + + // Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' + #pragma warning disable CS1591 + """.Replace("\r\n", "\n").Replace("\n", Environment.NewLine); // normalize regardless of git checkout policy +} \ No newline at end of file diff --git a/src/Vogen/ManageAttributes.cs b/src/Vogen/ManageAttributes.cs index 6ccb5d9f78..626ab5b8ae 100644 --- a/src/Vogen/ManageAttributes.cs +++ b/src/Vogen/ManageAttributes.cs @@ -31,7 +31,7 @@ public static VogenConfigurationBuildResult GetDefaultConfigFromGlobalAttribute( return BuildConfigurationFromAttributes.TryBuildFromVogenDefaultsAttribute(attr); } - public static EfCoreConverterSpecResults GetEfCoreConverterSpecFromAttribute(GeneratorAttributeSyntaxContext ctx) + public static EfCoreConverterMarkerClassResults GetEfCoreConverterSpecFromAttribute(GeneratorAttributeSyntaxContext ctx) { INamedTypeSymbol? symbol = ctx.TargetSymbol as INamedTypeSymbol; @@ -39,10 +39,10 @@ public static EfCoreConverterSpecResults GetEfCoreConverterSpecFromAttribute(Gen if (attrs.IsDefaultOrEmpty) { - return new EfCoreConverterSpecResults(symbol, []); + return new EfCoreConverterMarkerClassResults(symbol, []); } - return new EfCoreConverterSpecResults(symbol, attrs.Select(a => BuildEfCoreConverterSpecsFromAttributes.TryBuild(a, symbol))); + return new EfCoreConverterMarkerClassResults(symbol, attrs.Select(a => BuildEfCoreConverterSpecsFromAttributes.TryBuild(a, symbol))); } /// diff --git a/src/Vogen/Util.cs b/src/Vogen/Util.cs index c8173f7b13..dfd005d548 100644 --- a/src/Vogen/Util.cs +++ b/src/Vogen/Util.cs @@ -1,8 +1,10 @@ -using System.Runtime.CompilerServices; +using System; +using System.Runtime.CompilerServices; using System.Text; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; using Vogen.Generators.Conversions; [assembly: InternalsVisibleTo("SmallTests")] @@ -21,6 +23,33 @@ public static class Util new GenerateEfCoreTypeConversions(), new GenerateLinqToDbConversions(), }; + + public static string SanitizeToALegalFilename(string input) => input.Replace('@', '_'); + + public static void TryWriteUsingUniqueFilename(string filename, SourceProductionContext context, SourceText sourceText) + { + int count = 0; + string hintName = filename; + + while (true) + { + try + { + context.AddSource(hintName, sourceText); + return; + } + catch(ArgumentException) + { + if (++count >= 10) + { + throw; + } + + hintName = $"{count}{filename}"; + } + } + } + public static string GenerateCallToValidationAndThrowIfRequired(VoWorkItem workItem) diff --git a/src/Vogen/ValueObjectGenerator.cs b/src/Vogen/ValueObjectGenerator.cs index e03058e8cf..80b759f3c1 100644 --- a/src/Vogen/ValueObjectGenerator.cs +++ b/src/Vogen/ValueObjectGenerator.cs @@ -44,7 +44,7 @@ private static Found GetTargets(IncrementalGeneratorInitializationContext contex transform: (ctx, _) => ManageAttributes.GetDefaultConfigFromGlobalAttribute(ctx)) .Where(static m => m is not null)!; - IncrementalValuesProvider efCoreConverterSpecs = context.SyntaxProvider.ForAttributeWithMetadataName( + IncrementalValuesProvider efCoreConverterSpecs = context.SyntaxProvider.ForAttributeWithMetadataName( "Vogen.EfCoreConverterAttribute`1", predicate: (node, _) => node is ClassDeclarationSyntax, transform: (ctx, _) => ManageAttributes.GetEfCoreConverterSpecFromAttribute(ctx)) @@ -56,13 +56,13 @@ private static Found GetTargets(IncrementalGeneratorInitializationContext contex record struct Found( IncrementalValuesProvider Vos, IncrementalValuesProvider GlobalConfig, - IncrementalValuesProvider EfCoreConverterSpecs); + IncrementalValuesProvider EfCoreConverterSpecs); private static void Execute( Compilation compilation, ImmutableArray targets, ImmutableArray globalConfigBuildResult, - ImmutableArray efCoreConverterSpecs, + ImmutableArray efCoreConverterSpecs, SourceProductionContext spc) { using var internalDiags = InternalDiagnostics.TryCreateIfSpecialClassIsPresent(compilation, spc); diff --git a/src/Vogen/WriteEfCoreSpecs.cs b/src/Vogen/WriteEfCoreSpecs.cs index 8793367735..eb2f3aa3c5 100644 --- a/src/Vogen/WriteEfCoreSpecs.cs +++ b/src/Vogen/WriteEfCoreSpecs.cs @@ -1,4 +1,3 @@ -using System; using System.Collections.Immutable; using System.Text; using Microsoft.CodeAnalysis; @@ -10,121 +9,27 @@ namespace Vogen; internal class WriteEfCoreSpecs { - public static void WriteIfNeeded(SourceProductionContext context, Compilation compilation, ImmutableArray convertSpecs) + public static void WriteIfNeeded(SourceProductionContext context, Compilation compilation, ImmutableArray convertSpecs) { - if (compilation is not CSharpCompilation { LanguageVersion: >= LanguageVersion.CSharp12 }) + if (!compilation.IsAtLeastCSharpVersion(LanguageVersion.CSharp12)) { return; } - foreach (EfCoreConverterSpecResults? eachSpecs in convertSpecs) + foreach (EfCoreConverterMarkerClassResults? eachMarkerClass in convertSpecs) { - WriteEncompassingExtensionMethod(eachSpecs, context); + WriteEncompassingExtensionMethod(eachMarkerClass, context); - foreach (var eachSpec in eachSpecs.Specs) + foreach (EfCoreConverterSpecResult? eachAttributeInMarkerClass in eachMarkerClass.Specs) { - WriteEachIfNeeded(context, eachSpec); + WriteEachIfNeeded(context, eachAttributeInMarkerClass); } } } - private static void WriteEncompassingExtensionMethod(EfCoreConverterSpecResults resultsParticularMethod, SourceProductionContext context) - { - var sourceSymbol = resultsParticularMethod.SourceSymbol; - if (sourceSymbol is null) - { - return; - } - - var fullNamespace = sourceSymbol.FullNamespace(); - - var isPublic = sourceSymbol.DeclaredAccessibility.HasFlag(Accessibility.Public); - var accessor = isPublic ? "public" : "internal"; - - var ns = string.IsNullOrEmpty(fullNamespace) ? string.Empty : $"namespace {fullNamespace};"; - - string allCalls = GenerateBody(); - - string sb = - $$""" - #if NET8_0_OR_GREATER - - {{GeneratedCodeSegments.Preamble}} - - {{ns}} - - {{accessor}} static class {{sourceSymbol.Name}}__Ext - { - {{accessor}} static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllIn{{sourceSymbol.Name}}(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) - { - {{allCalls}} - - return configurationBuilder; - } - } - - #endif - """; - - SourceText sourceText = SourceText.From(sb, Encoding.UTF8); - - var unsanitized = $"{sourceSymbol.ToDisplayString()}.g.cs"; - - string filename = sanitizeToALegalFilename(unsanitized); - - tryWriteUsingUniqueFilename(); - - static string sanitizeToALegalFilename(string input) - { - return input.Replace('@', '_'); - } - - void tryWriteUsingUniqueFilename() - { - int count = 0; - string hintName = filename; - - while (true) - { - try - { - context.AddSource(hintName, sourceText); - return; - } - catch(ArgumentException) - { - if (++count >= 10) - { - throw; - } - - hintName = $"{count}{filename}"; - } - } - } - - string GenerateBody() - { - StringBuilder sb2 = new StringBuilder(); - - foreach (EfCoreConverterSpecResult eachSpec in resultsParticularMethod.Specs) - { - if (eachSpec.Spec is null) - { - continue; - } - - var voSymbol = eachSpec.Spec.VoSymbol; - sb2.AppendLine($$"""configurationBuilder.Properties<{{voSymbol.FullName()}}>().HaveConversion<{{resultsParticularMethod.SourceSymbol.FullName()}}.{{voSymbol.Name}}EfCoreValueConverter, {{resultsParticularMethod.SourceSymbol.FullName()}}.{{voSymbol.Name}}EfCoreValueComparer>();"""); - } - - return sb2.ToString(); - } - } - private static void WriteEachIfNeeded(SourceProductionContext context, EfCoreConverterSpecResult specResult) { - var spec = specResult.Spec; + EfCoreConverterSpec? spec = specResult.Spec; if (spec is null) { @@ -163,38 +68,75 @@ private static void WriteEachIfNeeded(SourceProductionContext context, EfCoreCon SourceText sourceText = SourceText.From(sb, Encoding.UTF8); var unsanitized = $"{spec.SourceType.ToDisplayString()}_{spec.VoSymbol.ToDisplayString()}.g.cs"; - string filename = sanitizeToALegalFilename(unsanitized); - - tryWriteUsingUniqueFilename(); + string filename = Util.SanitizeToALegalFilename(unsanitized); - static string sanitizeToALegalFilename(string input) + Util.TryWriteUsingUniqueFilename(filename, context, sourceText); + } + + private static void WriteEncompassingExtensionMethod(EfCoreConverterMarkerClassResults resultsForAMarker, SourceProductionContext context) + { + INamedTypeSymbol? markerSymbol = resultsForAMarker.MarkerSymbol; + + if (markerSymbol is null) { - return input.Replace('@', '_'); + return; } - void tryWriteUsingUniqueFilename() - { - int count = 0; - string hintName = filename; + var fullNamespace = markerSymbol.FullNamespace(); - while (true) - { - try - { - context.AddSource(hintName, sourceText); - return; - } - catch(ArgumentException) + var isPublic = markerSymbol.DeclaredAccessibility.HasFlag(Accessibility.Public); + var accessor = isPublic ? "public" : "internal"; + + var ns = string.IsNullOrEmpty(fullNamespace) ? string.Empty : $"namespace {fullNamespace};"; + + string allCalls = GenerateBody(); + + string source = + $$""" + #if NET8_0_OR_GREATER + + {{GeneratedCodeSegments.Preamble}} + + {{ns}} + + {{accessor}} static class {{markerSymbol.Name}}__Ext { - if (++count >= 10) + {{accessor}} static global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder RegisterAllIn{{markerSymbol.Name}}(this global::Microsoft.EntityFrameworkCore.ModelConfigurationBuilder configurationBuilder) { - throw; + {{allCalls}} + + return configurationBuilder; } + } + + #endif + """; + + SourceText sourceText = SourceText.From(source, Encoding.UTF8); + + string filename = Util.SanitizeToALegalFilename($"{markerSymbol.ToDisplayString()}.g.cs"); - hintName = $"{count}{filename}"; + Util.TryWriteUsingUniqueFilename(filename, context, sourceText); + + return; + + string GenerateBody() + { + StringBuilder sb = new StringBuilder(); + + foreach (EfCoreConverterSpecResult eachSpec in resultsForAMarker.Specs) + { + if (eachSpec.Spec is null) + { + continue; } + + var voSymbol = eachSpec.Spec.VoSymbol; + sb.AppendLine($"configurationBuilder.Properties<{voSymbol.FullName()}>().HaveConversion<{markerSymbol.FullName()}.{voSymbol.Name}EfCoreValueConverter, {markerSymbol.FullName()}.{voSymbol.Name}EfCoreValueComparer>();"); } - } + return sb.ToString(); + } } + } \ No newline at end of file diff --git a/src/Vogen/WriteStaticAbstracts.cs b/src/Vogen/WriteStaticAbstracts.cs index af457e5b66..40eae211e8 100644 --- a/src/Vogen/WriteStaticAbstracts.cs +++ b/src/Vogen/WriteStaticAbstracts.cs @@ -11,7 +11,7 @@ public static void WriteInterfacesAndMethodsIfNeeded(VogenConfiguration? globalC SourceProductionContext context, Compilation compilation) { - if (compilation is not CSharpCompilation { LanguageVersion: >= LanguageVersion.CSharp11 }) + if(!compilation.IsAtLeastCSharpVersion(LanguageVersion.CSharp11)) { return; } diff --git a/src/Vogen/WriteWorkItems.cs b/src/Vogen/WriteWorkItems.cs index b49adf1859..fc66d28d9e 100644 --- a/src/Vogen/WriteWorkItems.cs +++ b/src/Vogen/WriteWorkItems.cs @@ -11,35 +11,6 @@ namespace Vogen; -internal static class GeneratedCodeSegments -{ - internal static readonly string Preamble = @"// ------------------------------------------------------------------------------ -// -// This code was generated by a source generator named Vogen (https://github.com/SteveDunn/Vogen) -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -// ------------------------------------------------------------------------------ - -// Suppress warnings about [Obsolete] member usage in generated code. -#pragma warning disable CS0618 - -// Suppress warnings for 'Override methods on comparable types'. -#pragma warning disable CA1036 - -// Suppress Error MA0097 : A class that implements IComparable or IComparable should override comparison operators -#pragma warning disable MA0097 - -// Suppress warning for 'The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. Auto-generated code requires an explicit '#nullable' directive in source.' -// The generator copies signatures from the BCL, e.g. for `TryParse`, and some of those have nullable annotations. -#pragma warning disable CS8669 - -// Suppress warnings about CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' -#pragma warning disable CS1591".Replace("\r\n", "\n").Replace("\n", Environment.NewLine); // normalize regardless of git checkout policy - -} - internal static class WriteWorkItems { private static readonly ClassGenerator _classGenerator; @@ -68,40 +39,9 @@ public static void WriteVo(VoWorkItem item, SourceProductionContext context) var unsanitized = $"{item.FullNamespace}_{voClass.Identifier}.g.cs"; - string filename = sanitizeToALegalFilename(unsanitized); - - tryWriteUsingUniqueFilename(); - - return; - - static string sanitizeToALegalFilename(string input) - { - return input.Replace('@', '_'); - } - - void tryWriteUsingUniqueFilename() - { - int count = 0; - string hintName = filename; - - while (true) - { - try - { - context.AddSource(hintName, sourceText); - return; - } - catch(ArgumentException) - { - if (++count >= 10) - { - throw; - } + string filename = Util.SanitizeToALegalFilename(unsanitized); - hintName = $"{count}{filename}"; - } - } - } + Util.TryWriteUsingUniqueFilename(filename, context, sourceText); } private static IGenerateSourceCode GetGenerator(VoWorkItem item) => diff --git a/tests/AnalyzerTests/EfCoreTests.cs b/tests/AnalyzerTests/EfCoreTests.cs index 10e8699918..56a3218137 100644 --- a/tests/AnalyzerTests/EfCoreTests.cs +++ b/tests/AnalyzerTests/EfCoreTests.cs @@ -21,13 +21,10 @@ public async Task OK_when_they_all_reference_vos() using System; using Vogen; - public class NotAValueObject; - [ValueObject] public partial struct Vo1; [EfCoreConverter] - [EfCoreConverter] public partial class EfCoreConverters; """;