diff --git a/src/dotVariant.Generator.Test/samples/Variant-class-nullable-disable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-class-nullable-disable.out.cs
index 6e16463..be79b2d 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-class-nullable-disable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-class-nullable-disable.out.cs
@@ -102,18 +102,30 @@ public override bool Equals(object other)
public bool Equals(Variant_class_nullable_disable other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant_class_nullable_disable objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_class_nullable_disable lhs, Variant_class_nullable_disable rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant_class_nullable_disable objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_class_nullable_disable lhs, Variant_class_nullable_disable rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -324,7 +336,7 @@ public Union(string value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -567,7 +579,7 @@ public TResult Match(global::System.Func i)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func i, TResult _)
{
@@ -697,7 +709,7 @@ public TResult Match(global::System.Func f)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func f, TResult _)
{
@@ -827,7 +839,7 @@ public TResult Match(global::System.Func s)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func s, TResult _)
{
@@ -967,6 +979,10 @@ public TResult Visit(global::System.Func i, global::Syste
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_class_nullable_disableEx
{
///
@@ -1291,6 +1307,10 @@ public static partial class Variant_class_nullable_disableEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_class_nullable_disableEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-class-nullable-enable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-class-nullable-enable.out.cs
index a82faba..f57fe4a 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-class-nullable-enable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-class-nullable-enable.out.cs
@@ -123,18 +123,30 @@ public override bool Equals(object? other)
public bool Equals(Variant_class_nullable_enable? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant_class_nullable_enable objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_class_nullable_enable? lhs, Variant_class_nullable_enable? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant_class_nullable_enable objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_class_nullable_enable? lhs, Variant_class_nullable_enable? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -401,7 +413,7 @@ public Union(global::System.Array? value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -659,7 +671,7 @@ public TResult Match(global::System.Func i)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func i, TResult _)
{
@@ -789,7 +801,7 @@ public TResult Match(global::System.Func f)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func f, TResult _)
{
@@ -919,7 +931,7 @@ public TResult Match(global::System.Func s)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func s, TResult _)
{
@@ -1049,7 +1061,7 @@ public TResult Match(global::System.Func
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func a, TResult _)
{
@@ -1203,6 +1215,10 @@ public TResult Visit(global::System.Func i, global::Syste
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_class_nullable_enableEx
{
///
@@ -1613,6 +1629,10 @@ public static partial class Variant_class_nullable_enableEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_class_nullable_enableEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-disposable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-disposable.out.cs
index 4ee5843..d8325c1 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-disposable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-disposable.out.cs
@@ -89,18 +89,30 @@ public override bool Equals(object other)
public bool Equals(Variant_disposable other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant_disposable objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_disposable lhs, Variant_disposable rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant_disposable objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_disposable lhs, Variant_disposable rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -258,7 +270,7 @@ public Union(global::System.IO.Stream value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -506,7 +518,7 @@ public TResult Match(global::System.Func i)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func i, TResult _)
{
@@ -636,7 +648,7 @@ public TResult Match(global::System.Func
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func stream, TResult _)
{
@@ -762,6 +774,10 @@ public TResult Visit(global::System.Func i, global::Syste
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_disposableEx
{
///
@@ -1000,6 +1016,10 @@ public static partial class Variant_disposableEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_disposableEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-T-as-nullable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-T-as-nullable.out.cs
index 71a26a7..d29e072 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-T-as-nullable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-T-as-nullable.out.cs
@@ -165,18 +165,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -566,7 +578,7 @@ public Union(T6? value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -854,7 +866,7 @@ public TResult Match(global::System.Func a)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func a, TResult _)
{
@@ -984,7 +996,7 @@ public TResult Match(global::System.Func b)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func b, TResult _)
{
@@ -1114,7 +1126,7 @@ public TResult Match(global::System.Func c)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func c, TResult _)
{
@@ -1244,7 +1256,7 @@ public TResult Match(global::System.Func d)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func d, TResult _)
{
@@ -1374,7 +1386,7 @@ public TResult Match(global::System.Func e)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func e, TResult _)
{
@@ -1504,7 +1516,7 @@ public TResult Match(global::System.Func f)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func f, TResult _)
{
@@ -1686,6 +1698,10 @@ public TResult Visit(global::System.Func a, global::Syste
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -2368,6 +2384,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-class-nullable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-class-nullable.out.cs
index dd6062b..95f3fb6 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-class-nullable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-class-nullable.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -177,7 +189,7 @@ public Union(T value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -390,7 +402,7 @@ public TResult Match(global::System.Func value)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func value, TResult _)
{
@@ -502,6 +514,10 @@ public TResult Visit(global::System.Func value)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -659,6 +675,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-class.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-class.out.cs
index 7c80c43..a1cf490 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-class.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-class.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -177,7 +189,7 @@ public Union(T value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -390,7 +402,7 @@ public TResult Match(global::System.Func value)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func value, TResult _)
{
@@ -502,6 +514,10 @@ public TResult Visit(global::System.Func value)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -659,6 +675,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-multiple.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-multiple.out.cs
index d441141..fdc2792 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-multiple.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-multiple.out.cs
@@ -110,18 +110,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -336,7 +348,7 @@ public Union(T3 value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -601,7 +613,7 @@ public TResult Match(global::System.Func a)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func a, TResult _)
{
@@ -731,7 +743,7 @@ public TResult Match(global::System.Func b)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func b, TResult _)
{
@@ -861,7 +873,7 @@ public TResult Match(global::System.Func c)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func c, TResult _)
{
@@ -1001,6 +1013,10 @@ public TResult Visit(global::System.Func a, global::System
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -1358,6 +1374,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-notnull.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-notnull.out.cs
index e080936..66b8039 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-notnull.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-notnull.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -177,7 +189,7 @@ public Union(T value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -390,7 +402,7 @@ public TResult Match(global::System.Func value)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func value, TResult _)
{
@@ -502,6 +514,10 @@ public TResult Visit(global::System.Func value)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -659,6 +675,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-struct.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-struct.out.cs
index e2d6590..7e4a2db 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-struct.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-struct.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -177,7 +189,7 @@ public Union(T value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -390,7 +402,7 @@ public TResult Match(global::System.Func value)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func value, TResult _)
{
@@ -502,6 +514,10 @@ public TResult Visit(global::System.Func value)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -659,6 +675,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-generic-unbounded.out.cs b/src/dotVariant.Generator.Test/samples/Variant-generic-unbounded.out.cs
index b2bc1bd..a7acf35 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-generic-unbounded.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-generic-unbounded.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant? lhs, Variant? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant? lhs, Variant? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -176,7 +188,7 @@ public Union(T value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -389,7 +401,7 @@ public TResult Match(global::System.Func value)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func value, TResult _)
{
@@ -501,6 +513,10 @@ public TResult Visit(global::System.Func value)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
@@ -653,6 +669,10 @@ public static partial class VariantEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class VariantEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-nullable-value-type.out.cs b/src/dotVariant.Generator.Test/samples/Variant-nullable-value-type.out.cs
index 2267ed3..a133176 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-nullable-value-type.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-nullable-value-type.out.cs
@@ -60,18 +60,30 @@ public override bool Equals(object? other)
public bool Equals(Variant_nullable_value_type? other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant_nullable_value_type objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_nullable_value_type? lhs, Variant_nullable_value_type? rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant_nullable_value_type objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_nullable_value_type? lhs, Variant_nullable_value_type? rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -176,7 +188,7 @@ public Union(int? value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -389,7 +401,7 @@ public TResult Match(global::System.Func i)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func i, TResult _)
{
@@ -501,6 +513,10 @@ public TResult Visit(global::System.Func i)
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_nullable_value_typeEx
{
///
@@ -653,6 +669,10 @@ public static partial class Variant_nullable_value_typeEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_nullable_value_typeEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-public.out.cs b/src/dotVariant.Generator.Test/samples/Variant-public.out.cs
index a8593ba..3ad367b 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-public.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-public.out.cs
@@ -81,18 +81,30 @@ public override bool Equals(object other)
public bool Equals(Variant_public other)
=> !(other is null) && _variant.Equals(other._variant);
+ /// Compare two Variant_public objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_public lhs, Variant_public rhs)
=> lhs?.Equals(rhs) ?? (rhs is null);
+ /// Compare two Variant_public objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_public lhs, Variant_public rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public override string ToString()
=> _variant.ToString();
@@ -249,7 +261,7 @@ public Union(string value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -477,7 +489,7 @@ public TResult Match(global::System.Func i)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func i, TResult _)
{
@@ -607,7 +619,7 @@ public TResult Match(global::System.Func s)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func s, TResult _)
{
@@ -733,6 +745,10 @@ public TResult Visit(global::System.Func i, global::Syste
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_publicEx
{
///
@@ -971,6 +987,10 @@ public static partial class Variant_publicEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_publicEx
{
///
diff --git a/src/dotVariant.Generator.Test/samples/Variant-struct-nullable-disable.out.cs b/src/dotVariant.Generator.Test/samples/Variant-struct-nullable-disable.out.cs
index 8dddb82..7c1753d 100644
--- a/src/dotVariant.Generator.Test/samples/Variant-struct-nullable-disable.out.cs
+++ b/src/dotVariant.Generator.Test/samples/Variant-struct-nullable-disable.out.cs
@@ -95,18 +95,30 @@ public readonly override bool Equals(object other)
public readonly bool Equals(Variant_struct_nullable_disable other)
=> _variant.Equals(other._variant);
+ /// Compare two Variant_struct_nullable_disable objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==(Variant_struct_nullable_disable lhs, Variant_struct_nullable_disable rhs)
=> lhs.Equals(rhs);
+ /// Compare two Variant_struct_nullable_disable objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=(Variant_struct_nullable_disable lhs, Variant_struct_nullable_disable rhs)
=> !(lhs == rhs);
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public readonly override int GetHashCode()
=> _variant.GetHashCode();
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public readonly override string ToString()
=> _variant.ToString();
@@ -317,7 +329,7 @@ public Union(object value)
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -565,7 +577,7 @@ public TResult Match(global::System.Func l)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func l, TResult _)
{
@@ -695,7 +707,7 @@ public TResult Match(global::System.Func d)
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func d, TResult _)
{
@@ -825,7 +837,7 @@ public TResult Match(global::System.Func
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match(global::System.Func o, TResult _)
{
@@ -965,6 +977,10 @@ public TResult Visit(global::System.Func l, global::Syst
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
public static partial class Variant_struct_nullable_enableEx
{
///
@@ -1289,6 +1305,10 @@ public static partial class Variant_struct_nullable_enableEx
}
namespace Foo
{
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
public static partial class Variant_struct_nullable_enableEx
{
///
diff --git a/src/dotVariant.Generator/templates/IEnumerable.scriban-cs b/src/dotVariant.Generator/templates/IEnumerable.scriban-cs
index 80c58ef..459ddf2 100644
--- a/src/dotVariant.Generator/templates/IEnumerable.scriban-cs
+++ b/src/dotVariant.Generator/templates/IEnumerable.scriban-cs
@@ -15,6 +15,10 @@ end
namespace {{ Options.ExtensionClassNamespace }}
{
{{~ end ~}}
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Linq`-like queries
+ /// on sequences, that let you manipulate a stream of variants based on the contained type.
+ ///
{{ Variant.ExtensionsAccessibility }} static partial class {{ Variant.Name }}Ex
{
{{~ ## Match(IEnumerable, Func) ## ~}}
diff --git a/src/dotVariant.Generator/templates/IObservable.scriban-cs b/src/dotVariant.Generator/templates/IObservable.scriban-cs
index 036e89a..9d2cfe2 100644
--- a/src/dotVariant.Generator/templates/IObservable.scriban-cs
+++ b/src/dotVariant.Generator/templates/IObservable.scriban-cs
@@ -15,6 +15,10 @@ end
namespace {{ Options.ExtensionClassNamespace }}
{
{{~ end ~}}
+ ///
+ /// Extensions which allow for easy and powerful integration into `System.Reactive.Linq`-like queries
+ /// on sequences, that let you manipulate an asynchronous stream of variants based on the contained type.
+ ///
{{ Variant.ExtensionsAccessibility }} static partial class {{ Variant.Name }}Ex
{
{{~ ## Match(IObservable, Func) ## ~}}
diff --git a/src/dotVariant.Generator/templates/Union.scriban-cs b/src/dotVariant.Generator/templates/Union.scriban-cs
index 9802b31..16c12a2 100644
--- a/src/dotVariant.Generator/templates/Union.scriban-cs
+++ b/src/dotVariant.Generator/templates/Union.scriban-cs
@@ -198,7 +198,7 @@ namespace dotVariant._G{{ if Variant.Namespace; "." + Variant.Namespace; end }}
///
/// The 1-based index of the currently stored type,
- /// counted left-ro-right from the parameter list.
+ /// counted left-ro-right from the parameter list.
/// 0 if the variant is empty.
///
public readonly byte Index;
@@ -464,7 +464,7 @@ namespace dotVariant._G{{ if Variant.Namespace; "." + Variant.Namespace; end }}
///
/// The delegate to invoke with the stored value if it is of type .
/// The value to return if the stored value is of a different type.
- /// The value returned from invoking , or .
+ /// The value returned from invoking , or .
/// Any exception thrown from or is rethrown.
public TResult Match({{ func_type $p }} {{ $p.Identifier }}, TResult _)
{
diff --git a/src/dotVariant.Generator/templates/Variant.scriban-cs b/src/dotVariant.Generator/templates/Variant.scriban-cs
index 6eee58d..62ca666 100644
--- a/src/dotVariant.Generator/templates/Variant.scriban-cs
+++ b/src/dotVariant.Generator/templates/Variant.scriban-cs
@@ -97,20 +97,32 @@ namespace {{ Variant.Namespace }}
public {{ method_modifiers }}bool Equals({{ variant_nullable_param }} other)
=> {{ if Variant.IsReferenceType; "!(other is null) && "; end }}_variant.Equals(other._variant);
+ /// Compare two {{ Variant.Type }} objects for equality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator ==({{ param_modifiers; variant_nullable_param }} lhs, {{ param_modifiers; variant_nullable_param }} rhs)
=> {{ coalesce Variant "lhs" ".Equals(rhs)" "(rhs is null)" }};
+ /// Compare two {{ Variant.Type }} objects for inequality.
+ /// The first to compare.
+ /// The second to compare.
+ /// if and are not considered equal; otherwise, .
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public static bool operator !=({{ param_modifiers; variant_nullable_param }} lhs, {{ param_modifiers; variant_nullable_param }} rhs)
=> !(lhs == rhs);
{{~ ## VARIANT GetHashCode ## ~}}
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public {{ method_modifiers }}override int GetHashCode()
=> _variant.GetHashCode();
{{~ ## VARIANT ToString ## ~}}
+ ///
[global::System.Diagnostics.DebuggerNonUserCode]
public {{ method_modifiers }}override string ToString()
=> _variant.ToString();