Skip to content

Commit 7cfbb0e

Browse files
[RGen] Add attributes to the accessor struct in the generator.
1 parent 010103d commit 7cfbb0e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/rgen/Microsoft.Macios.Transformer.Generator/Microsoft.Macios.Transformer.Generator/XamarinBindingAPIGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ void GenerateCode (SourceProductionContext context, Compilation compilation,
242242
var models = new (string Model, AttributeTargets[] Targets) [] {
243243
("EnumMember", [AttributeTargets.Field]),
244244
("Parameter", [AttributeTargets.Parameter]),
245+
("Accessor", [AttributeTargets.Property]),
245246
("Property", [AttributeTargets.Property]),
246247
("Method", [AttributeTargets.Method]),
247248
("Binding", [AttributeTargets.Interface, AttributeTargets.Class, AttributeTargets.Enum, AttributeTargets.Struct]),

src/rgen/Microsoft.Macios.Transformer/DataModel/Accessor.Transformer.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ namespace Microsoft.Macios.Generator.DataModel;
88
readonly partial struct Accessor {
99

1010
public ExportData? ExportPropertyData { get; init; }
11+
12+
public Accessor () {}
1113
}

0 commit comments

Comments
 (0)