Repository navigation
Expand file tree
/
Copy pathExistingMethod.Test_WithExistingMethod.verified.cs
More file actions
154 lines (111 loc) · 6.22 KB
/
Copy pathExistingMethod.Test_WithExistingMethod.verified.cs
File metadata and controls
154 lines (111 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// <auto-generated/>
#nullable enable
namespace TestNamespace;
[global::System.Diagnostics.DebuggerDisplay("{Value}")]
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage(Justification = "Auto-generated.")]
#region Augment Attributes
#endregion Augment Attributes
readonly partial struct TestValueObject :
#region Base Interfaces
global::TransparentValueObjects.IValueObject<global::System.String>,
global::System.IEquatable<TestValueObject>,
global::System.IEquatable<global::System.String>
#endregion Base Interfaces
#region Forwarded Interfaces
,global::System.IComparable<TestValueObject>
,global::System.IComparable<global::System.String>
#endregion Forwarded Interfaces
#region Augment Interfaces
#endregion Augment Interfaces
{
/// <summary>
/// The underlying data of the value object.
/// </summary>
public readonly global::System.String Value;
/// <inheritdoc/>
public static global::System.Type InnerValueType => typeof(global::System.String);
/// <summary>
/// Creates a new instance of the value object using the provided inner value.
/// </summary>
/// <param name="value">The value that the value object should wrap.</param>
/// <returns>A new instance of this value object.</returns>
public static TestValueObject From(global::System.String value) => new(value);
#region Constructors
private TestValueObject(global::System.String value)
{
Value = value;
}
/// <summary>
/// The default constructor is disabled and will throw an exception if called.
/// </summary>
/// <remarks>
/// The default constructor can be enabled by providing a default value
/// using the <see cref="global::TransparentValueObjects.DefaultValueAugment"/> augment.
/// </remarks>
/// <exception cref="global::System.InvalidOperationException">Thrown when called.</exception>
[global::System.Obsolete($"Use TestValueObject.{nameof(From)} instead.", error: true)]
public TestValueObject()
{
throw new global::System.InvalidOperationException($"Use TestValueObject.{nameof(From)} instead.");
}
#endregion Constructors
#region Base Methods
#endregion Base Methods
#region Equals Methods
/// <inheritdoc/>
[global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
public global::System.Boolean Equals(TestValueObject other) => Equals(other.Value);
#endregion Equals Methods
#region Equality Operators
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator ==(TestValueObject left, TestValueObject right) => left.Equals(right);
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator !=(TestValueObject left, TestValueObject right) => !left.Equals(right);
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator ==(TestValueObject left, global::System.String right) => left.Equals(right);
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator !=(TestValueObject left, global::System.String right) => !left.Equals(right);
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator ==(global::System.String left, TestValueObject right) => right.Equals(left);
/// <summary>Equality Operator</summary>
public static global::System.Boolean operator !=(global::System.String left, TestValueObject right) => !right.Equals(left);
#endregion Equality Operators
#region Explicit Cast Operators
/// <summary>Explicit Casting Operator</summary>
public static explicit operator TestValueObject(global::System.String value) => From(value);
/// <summary>Explicit Casting Operator</summary>
public static explicit operator global::System.String(TestValueObject value) => value.Value;
#endregion Explicit Cast Operators
#region IComparable Implementation
/// <inheritdoc/>
public global::System.Int32 CompareTo(TestValueObject other) => Value.CompareTo(other.Value);
/// <inheritdoc/>
public global::System.Int32 CompareTo(global::System.String? other) => Value.CompareTo(other);
#endregion IComparable Implementation
#region Comparison Operators
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <(TestValueObject left, TestValueObject right) => left.Value.CompareTo(right.Value) < 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >(TestValueObject left, TestValueObject right) => left.Value.CompareTo(right.Value) > 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <=(TestValueObject left, TestValueObject right) => left.Value.CompareTo(right.Value) <= 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >=(TestValueObject left, TestValueObject right) => left.Value.CompareTo(right.Value) >= 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <(global::System.String left, TestValueObject right) => left.CompareTo(right.Value) < 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >(global::System.String left, TestValueObject right) => left.CompareTo(right.Value) > 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <=(global::System.String left, TestValueObject right) => left.CompareTo(right.Value) <= 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >=(global::System.String left, TestValueObject right) => left.CompareTo(right.Value) >= 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <(TestValueObject left, global::System.String right) => left.Value.CompareTo(right) < 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >(TestValueObject left, global::System.String right) => left.Value.CompareTo(right) > 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator <=(TestValueObject left, global::System.String right) => left.Value.CompareTo(right) <= 0;
/// <summary>Comparison Operator</summary>
public static global::System.Boolean operator >=(TestValueObject left, global::System.String right) => left.Value.CompareTo(right) >= 0;
#endregion Comparison Operators
}