Skip to content

Commit

Permalink
Use correct naming for Attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
inputfalken committed Aug 30, 2023
1 parent b030826 commit 0aff926
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DynamoDBGenerator.SourceGenerator/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace DynamoDBGenerator.SourceGenerator;

public class Constants
{
public const string DynamoDbDocumentPropertyFullname = nameof(DynamoDBGenerator) + "." + nameof(DynamoDBDocument);
public const string DynamoDbDocumentPropertyFullname = nameof(DynamoDBGenerator) + "." + nameof(DynamoDBDocumentAttribute);
public const string NewLine = @"
";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private static IEnumerable<string> GetMethods(ISymbol typeSymbol, Compilation co
var typeNames = typeSymbol
.GetAttributes()
.Where(x => x.AttributeClass?.ContainingNamespace is {Name: nameof(DynamoDBGenerator)})
.Where(x => x.AttributeClass!.Name is nameof(DynamoDBDocument))
.Where(x => x.AttributeClass!.Name is nameof(DynamoDBDocumentAttribute))
.SelectMany(x => x.ConstructorArguments, (x, y) => (AttributeData: x, TypeConstant: y))
.Where(x => x.TypeConstant.Kind is TypedConstantKind.Type);

Expand Down
4 changes: 2 additions & 2 deletions DynamoDBGenerator/DynamoDbDocumentProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace DynamoDBGenerator;

[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class DynamoDBDocument : Attribute
public class DynamoDBDocumentAttribute : Attribute
{
private readonly Type _type;
public DynamoDBDocument(Type type)
public DynamoDBDocumentAttribute(Type type)
{
_type = type;

Expand Down

0 comments on commit 0aff926

Please sign in to comment.