Skip to content

Commit

Permalink
Added boxed value property to IKey
Browse files Browse the repository at this point in the history
  • Loading branch information
TwentyFourMinutes committed Sep 4, 2021
1 parent 22da3ba commit c86b5bc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Venflow/Venflow.Generators/KeyGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ namespace {namespaceText}
private readonly {underlyingKeyFullName} _value;
{underlyingKeyFullName} IKey<{typeArgumentName}, {underlyingKeyFullName}>.Value {{ get => _value; }}
object? IKey.BoxedValue {{ get => _value; }}
/// <summary>
/// Instantiates a new <see cref=""{baseStructXmlName}""/> instance withe the provided value.
Expand Down
2 changes: 1 addition & 1 deletion src/Venflow/Venflow.Generators/Venflow.Generators.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-1.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-3.final" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.2" PrivateAssets="all" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion src/Venflow/Venflow.Keys/Key.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace Venflow
private readonly TKey _value;

TKey IKey<TEntity, TKey>.Value { get => _value; }
object? IKey.BoxedValue { get => _value; }

/// <summary>
/// Instantiates a new <see cref="Key{T, TKey}"/> instance withe the provided value.
Expand Down Expand Up @@ -103,6 +104,6 @@ public interface IKey<TEntity, TKey> : IKey
[EditorBrowsable(EditorBrowsableState.Never)]
public interface IKey
{

object? BoxedValue { get; }
}
}

0 comments on commit c86b5bc

Please sign in to comment.