Skip to content

Add support for JsonSerializerOptions.NumberHandling #855

Add support for JsonSerializerOptions.NumberHandling

Add support for JsonSerializerOptions.NumberHandling #855

Triggered via pull request October 4, 2023 14:35
Status Failure
Total duration 1h 9m 5s
Artifacts

build.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

30 errors
SnapshotTests.Comparable.ComprableGenerationTests.Using_omit_does_not_generate_comparable_code
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/Comparable/snapshots/snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deserialized into // its primitive type.
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial record class"
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/ToString/snapshots/snap-v6.0 NotEqual: - Received: partial_record_class_None.DotNet6_0.received.txt Verified: partial_record_class_None.verified.txt FileContent: NotEqual: Received: partial_record_class_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_record_class_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_record_class_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_record_class_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial record class partial_record_class_None : global::System.IComparable<partial_record_class_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_record_class_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_record_class_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_record_class_None From(S
SnapshotTests.Escaping.GenerationOfEscapedTypesTests.GenerationOfEscapedTypes(type: "public sealed partial record"
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/Escaping/snapshots/snap-v6.0 NotEqual: - Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt Verified: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.verified.txt FileContent: NotEqual: Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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 @Class { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] [global::System.Text.Json.Serialization.JsonConverter(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleSystemTextJsonConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Double, Value = { _value }")] public sealed partial record class escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble : global::System.IComparable<escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Double _value; /// <summary> /// Gets the underlying <see cref="System.Double" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public System.Double 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 escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble(System.Double value) { _value
SnapshotTests.GeneralStuff.GeneralTests.Produces_instances
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/GeneralStuff/snapshots/snap-v6.0 NotEqual: - Received: GeneralTests.Produces_instances.DotNet6_0.received.txt Verified: GeneralTests.Produces_instances.verified.txt FileContent: NotEqual: Received: GeneralTests.Produces_instances.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { CustomerId instance = new CustomerId(value); return instance; } public static explicit operator CustomerId(System
SnapshotTests.ConversionPermutations.PermutationsOfConversionsTests+ConversionPermutationTests.CompilesWithAnyCombinationOfConverters
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/ConversionPermutations/snapshots/snap-v6.0 NotEqual: - Received: partial-class23OaGTh97N.DotNet6_0.received.txt Verified: partial-class23OaGTh97N.verified.txt FileContent: NotEqual: Received: partial-class23OaGTh97N.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyIntVoSystemTextJsonConverter))] [global::Newtonsoft.Json.JsonConverter(typeof(MyIntVoNewtonsoftJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyIntVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyIntVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyIntVo : global::System.IEquatable<MyIntVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyIntVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyIntVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyIntVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyIntVo From(System.Int32 value) { MyIntVo instance = new MyIntVo(value); return instance; } // only called internally when something has bee
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial struct"
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/ToString/snapshots/snap-v6.0 NotEqual: - Received: partial_struct_None.DotNet6_0.received.txt Verified: partial_struct_None.verified.txt FileContent: NotEqual: Received: partial_struct_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_struct_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_struct_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_struct_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct partial_struct_None : global::System.IEquatable<partial_struct_None>, global::System.IEquatable<System.Int32> , global::System.IComparable<partial_struct_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_struct_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_struct_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_struct_None From(System.Int32 value) { partial_struct_None instance = new partial_struct_None(value); return instance; }
SnapshotTests.Comparable.ComprableGenerationTests.Using_underlying_uses_int_comparison
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/Comparable/snapshots/snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_underlying_uses_int_comparison.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deseriali
SnapshotTests.GeneralStuff.GeneralTests.Validation_with_camelCased_validate_method
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/GeneralStuff/snapshots/snap-v6.0 NotEqual: - Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt Verified: GeneralTests.Validation_with_camelCased_validate_method.verified.txt FileContent: NotEqual: Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { var validation = CustomerId.validate(value); if (validation != Vogen.Vali
SnapshotTests.JsonNumberCustomizations.CustomizeNumbersAsStringsInSystemTextJson.GenerationTest(type: "public partial class"
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/JsonNumberCustomizations/snapshots/snap-v6.0 NotEqual: - Received: HKCg9ZpdId.DotNet6_0.received.txt Verified: HKCg9ZpdId.verified.txt FileContent: NotEqual: Received: HKCg9ZpdId.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(stj_number_as_string_public_partial_classConversions_SystemTextJson_customizedSystemTextJsonConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(stj_number_as_string_public_partial_classConversions_SystemTextJson_customizedDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class stj_number_as_string_public_partial_classConversions_SystemTextJson_customized : global::System.IEquatable<stj_number_as_string_public_partial_classConversions_SystemTextJson_customized>, global::System.IEquatable<System.Int32> , global::System.IComparable<stj_number_as_string_public_partial_classConversions_SystemTextJson_customized>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 stj_number_as_string_public_partial_classConversions_SystemTextJson_customized() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private stj_number_as_string_public_partial_classConversions_SystemTextJson_customized(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param>
SnapshotTests.Config.GlobalConfigTests.Type_override
VerifyException : Directory: /home/runner/work/Vogen/Vogen/tests/SnapshotTests/Config/snapshots/snap-v6.0 NotEqual: - Received: GlobalConfigTests.Type_override.DotNet6_0.received.txt Verified: GlobalConfigTests.Type_override.verified.txt FileContent: NotEqual: Received: GlobalConfigTests.Type_override.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Single, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Single> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Single _value; /// <summary> /// Gets the underlying <see cref="System.Single" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public readonly System.Single Value { [global::System.Diagnostics.DebuggerStepThroughAttribute] get { EnsureInitialized(); return _value; } } [global::System.Diagnostics.DebuggerStepThroughAttribute] [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] public CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Single value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Single value) { CustomerId instance = new CustomerId(value); return instance; } public static explicit operator CustomerId(Syste
SnapshotTests.Escaping.GenerationOfEscapedTypesTests.GenerationOfEscapedTypes(type: "public sealed partial record"
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/Escaping/snapshots/snap-v6.0 NotEqual: - Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt Verified: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.verified.txt FileContent: NotEqual: Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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 @Class { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] [global::System.Text.Json.Serialization.JsonConverter(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleSystemTextJsonConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Double, Value = { _value }")] public sealed partial record class escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble : global::System.IComparable<escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Double _value; /// <summary> /// Gets the underlying <see cref="System.Double" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public System.Double 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 escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble(System.Double value) { _valu
SnapshotTests.Comparable.ComprableGenerationTests.Using_omit_does_not_generate_comparable_code
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/Comparable/snapshots/snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deserialized into // its primitive type
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial record class"
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/ToString/snapshots/snap-v6.0 NotEqual: - Received: partial_record_class_None.DotNet6_0.received.txt Verified: partial_record_class_None.verified.txt FileContent: NotEqual: Received: partial_record_class_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_record_class_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_record_class_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_record_class_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial record class partial_record_class_None : global::System.IComparable<partial_record_class_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_record_class_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_record_class_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_record_class_None From(
SnapshotTests.GeneralStuff.GeneralTests.Produces_instances
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/GeneralStuff/snapshots/snap-v6.0 NotEqual: - Received: GeneralTests.Produces_instances.DotNet6_0.received.txt Verified: GeneralTests.Produces_instances.verified.txt FileContent: NotEqual: Received: GeneralTests.Produces_instances.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { CustomerId instance = new CustomerId(value); return instance; } public static explicit operator CustomerId(Syste
SnapshotTests.Comparable.ComprableGenerationTests.Using_underlying_uses_int_comparison
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/Comparable/snapshots/snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_underlying_uses_int_comparison.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deserial
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial struct"
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/ToString/snapshots/snap-v6.0 NotEqual: - Received: partial_struct_None.DotNet6_0.received.txt Verified: partial_struct_None.verified.txt FileContent: NotEqual: Received: partial_struct_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_struct_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_struct_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_struct_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct partial_struct_None : global::System.IEquatable<partial_struct_None>, global::System.IEquatable<System.Int32> , global::System.IComparable<partial_struct_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_struct_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_struct_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_struct_None From(System.Int32 value) { partial_struct_None instance = new partial_struct_None(value); return instance;
SnapshotTests.GeneralStuff.GeneralTests.Validation_with_camelCased_validate_method
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/GeneralStuff/snapshots/snap-v6.0 NotEqual: - Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt Verified: GeneralTests.Validation_with_camelCased_validate_method.verified.txt FileContent: NotEqual: Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { var validation = CustomerId.validate(value); if (validation != Vogen.Val
SnapshotTests.ConversionPermutations.PermutationsOfConversionsTests+ConversionPermutationTests.CompilesWithAnyCombinationOfConverters
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/ConversionPermutations/snapshots/snap-v6.0 NotEqual: - Received: partial-class23OaGTh97N.DotNet6_0.received.txt Verified: partial-class23OaGTh97N.verified.txt FileContent: NotEqual: Received: partial-class23OaGTh97N.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyIntVoSystemTextJsonConverter))] [global::Newtonsoft.Json.JsonConverter(typeof(MyIntVoNewtonsoftJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyIntVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyIntVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyIntVo : global::System.IEquatable<MyIntVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyIntVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyIntVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyIntVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyIntVo From(System.Int32 value) { MyIntVo instance = new MyIntVo(value); return instance; } // only called internally when something has be
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "readonly partial struct"
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/ToString/snapshots/snap-v6.0 NotEqual: - Received: readonly_partial_struct_None.DotNet6_0.received.txt Verified: readonly_partial_struct_None.verified.txt FileContent: NotEqual: Received: readonly_partial_struct_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(readonly_partial_struct_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(readonly_partial_struct_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(readonly_partial_struct_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public readonly partial struct readonly_partial_struct_None : global::System.IEquatable<readonly_partial_struct_None>, global::System.IEquatable<System.Int32> , global::System.IComparable<readonly_partial_struct_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 readonly_partial_struct_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private readonly_partial_struct_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static readonly_partial_struct_None From(System.Int32 value) {
SnapshotTests.GeneralStuff.GeneralTests.Namespace_names_can_have_reserved_keywords
VerifyException : Directory: /Users/runner/work/Vogen/Vogen/tests/SnapshotTests/GeneralStuff/snapshots/snap-v6.0 NotEqual: - Received: GeneralTests.Namespace_names_can_have_reserved_keywords.DotNet6_0.received.txt Verified: GeneralTests.Namespace_names_can_have_reserved_keywords.verified.txt FileContent: NotEqual: Received: GeneralTests.Namespace_names_can_have_reserved_keywords.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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 @double { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] [global::System.Text.Json.Serialization.JsonConverter(typeof(@classSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(@classTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(@classDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct @Class : global::System.IEquatable<@Class>, global::System.IEquatable<System.Int32> , global::System.IComparable<@Class>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 @Class() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private @Class(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static @Class From(System.Int32 value) { var validation = @class.validate(value); if (validation != Vogen.Validation.Ok) {
SnapshotTests.Comparable.ComprableGenerationTests.Using_omit_does_not_generate_comparable_code
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\Comparable\snapshots\snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_omit_does_not_generate_comparable_code.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deserialized into // its primitive type. priv
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial record class"
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\ToString\snapshots\snap-v6.0 NotEqual: - Received: partial_record_class_None.DotNet6_0.received.txt Verified: partial_record_class_None.verified.txt FileContent: NotEqual: Received: partial_record_class_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_record_class_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_record_class_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_record_class_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial record class partial_record_class_None : global::System.IComparable<partial_record_class_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_record_class_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_record_class_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_record_class_None From(System.Int32 v
SnapshotTests.GeneralStuff.GeneralTests.Produces_instances
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\GeneralStuff\snapshots\snap-v6.0 NotEqual: - Received: GeneralTests.Produces_instances.DotNet6_0.received.txt Verified: GeneralTests.Produces_instances.verified.txt FileContent: NotEqual: Received: GeneralTests.Produces_instances.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { CustomerId instance = new CustomerId(value); return instance; } public static explicit operator CustomerId(System.Int32 value)
SnapshotTests.Escaping.GenerationOfEscapedTypesTests.GenerationOfEscapedTypes(type: "public sealed partial record"
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\Escaping\snapshots\snap-v6.0 NotEqual: - Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt Verified: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.verified.txt FileContent: NotEqual: Received: escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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 @Class { [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Vogen", "1.0.0.0")] [global::System.Text.Json.Serialization.JsonConverter(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleSystemTextJsonConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondoubleDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Double, Value = { _value }")] public sealed partial record class escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble : global::System.IComparable<escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Double _value; /// <summary> /// Gets the underlying <see cref="System.Double" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public System.Double 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 escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private escapedTestspublic_sealed_partial_recordConversions_SystemTextJsondouble(System.Double value) { _value = value;
SnapshotTests.ConversionPermutations.PermutationsOfConversionsTests+ConversionPermutationTests.CompilesWithAnyCombinationOfConverters
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\ConversionPermutations\snapshots\snap-v6.0 NotEqual: - Received: partial-class23OaGTh97N.DotNet6_0.received.txt Verified: partial-class23OaGTh97N.verified.txt FileContent: NotEqual: Received: partial-class23OaGTh97N.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyIntVoSystemTextJsonConverter))] [global::Newtonsoft.Json.JsonConverter(typeof(MyIntVoNewtonsoftJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyIntVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyIntVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyIntVo : global::System.IEquatable<MyIntVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyIntVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyIntVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyIntVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyIntVo From(System.Int32 value) { MyIntVo instance = new MyIntVo(value); return instance; } // only called internally when something has been deserialize
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "partial struct"
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\ToString\snapshots\snap-v6.0 NotEqual: - Received: partial_struct_None.DotNet6_0.received.txt Verified: partial_struct_None.verified.txt FileContent: NotEqual: Received: partial_struct_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(partial_struct_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(partial_struct_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(partial_struct_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct partial_struct_None : global::System.IEquatable<partial_struct_None>, global::System.IEquatable<System.Int32> , global::System.IComparable<partial_struct_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 partial_struct_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private partial_struct_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static partial_struct_None From(System.Int32 value) { partial_struct_None instance = new partial_struct_None(value); return instance; } pub
SnapshotTests.Comparable.ComprableGenerationTests.Using_underlying_uses_int_comparison
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\Comparable\snapshots\snap-v6.0 NotEqual: - Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt Verified: ComprableGenerationTests.Using_underlying_uses_int_comparison.verified.txt FileContent: NotEqual: Received: ComprableGenerationTests.Using_underlying_uses_int_comparison.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(MyVoSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(MyVoTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(MyVoDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class MyVo : global::System.IEquatable<MyVo>, global::System.IEquatable<System.Int32> , global::System.IComparable<MyVo>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 MyVo() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private MyVo(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static MyVo From(System.Int32 value) { MyVo instance = new MyVo(value); return instance; } // only called internally when something has been deserialized into
SnapshotTests.ToString.ToStringGenerationTests.Test(type: "readonly partial struct"
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\ToString\snapshots\snap-v6.0 NotEqual: - Received: readonly_partial_struct_None.DotNet6_0.received.txt Verified: readonly_partial_struct_None.verified.txt FileContent: NotEqual: Received: readonly_partial_struct_None.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(readonly_partial_struct_NoneSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(readonly_partial_struct_NoneTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(readonly_partial_struct_NoneDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public readonly partial struct readonly_partial_struct_None : global::System.IEquatable<readonly_partial_struct_None>, global::System.IEquatable<System.Int32> , global::System.IComparable<readonly_partial_struct_None>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 readonly_partial_struct_None() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private readonly_partial_struct_None(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static readonly_partial_struct_None From(System.Int32 value) {
SnapshotTests.GeneralStuff.GeneralTests.Validation_with_camelCased_validate_method
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\GeneralStuff\snapshots\snap-v6.0 NotEqual: - Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt Verified: GeneralTests.Validation_with_camelCased_validate_method.verified.txt FileContent: NotEqual: Received: GeneralTests.Validation_with_camelCased_validate_method.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(CustomerIdSystemTextJsonConverter))] [global::System.ComponentModel.TypeConverter(typeof(CustomerIdTypeConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(CustomerIdDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial struct CustomerId : global::System.IEquatable<CustomerId>, global::System.IEquatable<System.Int32> , global::System.IComparable<CustomerId>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> 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 CustomerId() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private CustomerId(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>An instance of this type.</returns> public static CustomerId From(System.Int32 value) { var validation = CustomerId.validate(value); if (validation != Vogen.Validation.Ok)
SnapshotTests.JsonNumberCustomizations.CustomizeNumbersAsStringsInSystemTextJson.GenerationTest(type: "public partial class"
VerifyException : Directory: D:\a\Vogen\Vogen\tests\SnapshotTests\JsonNumberCustomizations\snapshots\snap-v6.0 NotEqual: - Received: HKCg9ZpdId.DotNet6_0.received.txt Verified: HKCg9ZpdId.verified.txt FileContent: NotEqual: Received: HKCg9ZpdId.DotNet6_0.received.txt // ------------------------------------------------------------------------------ // <auto-generated> // 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. // </auto-generated> // ------------------------------------------------------------------------------ // 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<T> 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(stj_number_as_string_public_partial_classConversions_SystemTextJson_customizedSystemTextJsonConverter))] [global::System.Diagnostics.DebuggerTypeProxyAttribute(typeof(stj_number_as_string_public_partial_classConversions_SystemTextJson_customizedDebugView))] [global::System.Diagnostics.DebuggerDisplayAttribute("Underlying type: System.Int32, Value = { _value }")] public partial class stj_number_as_string_public_partial_classConversions_SystemTextJson_customized : global::System.IEquatable<stj_number_as_string_public_partial_classConversions_SystemTextJson_customized>, global::System.IEquatable<System.Int32> , global::System.IComparable<stj_number_as_string_public_partial_classConversions_SystemTextJson_customized>, global::System.IComparable { #if DEBUG private readonly global::System.Diagnostics.StackTrace _stackTrace = null; #endif private readonly global::System.Boolean _isInitialized; private readonly System.Int32 _value; /// <summary> /// Gets the underlying <see cref="System.Int32" /> value if set, otherwise a <see cref="ValueObjectValidationException" /> is thrown. /// </summary> public 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 stj_number_as_string_public_partial_classConversions_SystemTextJson_customized() { #if DEBUG _stackTrace = new global::System.Diagnostics.StackTrace(); #endif _isInitialized = false; _value = default; } [global::System.Diagnostics.DebuggerStepThroughAttribute] private stj_number_as_string_public_partial_classConversions_SystemTextJson_customized(System.Int32 value) { _value = value; _isInitialized = true; } /// <summary> /// Builds an instance from the provided underlying type. /// </summary> /// <param name="value">The underlying type.</param> /// <returns>