Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/EfficientDynamoDb/Attributes/DynamoDbPropertyAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Runtime.CompilerServices;

// ReSharper disable IntroduceOptionalParameters.Global

namespace EfficientDynamoDb.Attributes
Expand All @@ -11,7 +13,7 @@ public sealed class DynamoDbPropertyAttribute : Attribute

public DynamoDbAttributeType AttributeType { get; }

public DynamoDbPropertyAttribute(string name) : this(name, null, DynamoDbAttributeType.Regular)
public DynamoDbPropertyAttribute([CallerMemberName] string name = default!) : this(name, null, DynamoDbAttributeType.Regular)
{
}

Expand All @@ -23,6 +25,18 @@ public DynamoDbPropertyAttribute(string name, DynamoDbAttributeType attributeTyp
{
}

public DynamoDbPropertyAttribute(Type? ddbConverterType, [CallerMemberName] string name = default!) : this(name, ddbConverterType, DynamoDbAttributeType.Regular)
{
}

public DynamoDbPropertyAttribute(DynamoDbAttributeType attributeType, [CallerMemberName] string name = default!) : this(name, null, attributeType)
{
}

public DynamoDbPropertyAttribute(Type? ddbConverterType, DynamoDbAttributeType attributeType, [CallerMemberName] string name = default!) : this(name, ddbConverterType, attributeType)
{
}

public DynamoDbPropertyAttribute(string name, Type? ddbConverterType, DynamoDbAttributeType attributeType)
{
Name = name;
Expand Down