Hi,
I just wanted to create a ValueObject but the generated source file wont compile.
namespace Sample.Space;
using System;
using Thinktecture;
[ValueObject<TimeSpan>]
public partial struct TimeSpanObject { }
this will generate the following Sample.Space.TimeSpanObject.AdditionOperators.g.cs file:
// <auto-generated />
#nullable enable
namespace Sample.Space;
partial struct TimeSpanObject :
{
/// <inheritdoc cref="global::System.Numerics.IAdditionOperators{TSelf, TOther, TResult}.op_Addition(TSelf, TOther)" />
public static global::Sample.Space.TimeSpanObject operator +(global::Sample.Space.TimeSpanObject left, global::Sample.Space.TimeSpanObject right)
{
return Create((left._value + right._value));
}
}
But this wont compile, because the compiler expects a type after the ":", resulting in a CS2031 Error.
With an int as Key it generates it correct with interface and also checked + operator.
I am using Thinktecture.Runtime.Extensions in Version 10.1.1
Hi,
I just wanted to create a ValueObject but the generated source file wont compile.
this will generate the following Sample.Space.TimeSpanObject.AdditionOperators.g.cs file:
But this wont compile, because the compiler expects a type after the ":", resulting in a CS2031 Error.
With an
intas Key it generates it correct with interface and also checked + operator.I am using Thinktecture.Runtime.Extensions in Version 10.1.1