-
Notifications
You must be signed in to change notification settings - Fork 517
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rgen] Add skeleton code for the field properties in a class. (#21993)
Add code that starts generating field properties. This commits loops over the field properties and emit the following code: * Auto generated attributes for the properties. * SupportedOS attributes for properties. * SupportedOS attributes for accessors. * Acessors with no implementation. * Advice attribute for notification fields. The code also keeps track of the notifications to later allow to generate the helper clases. --------- Co-authored-by: GitHub Actions Autoformatter <[email protected]> Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
- Loading branch information
1 parent
a9225f2
commit 8ce51e8
Showing
11 changed files
with
990 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/CIImage.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Runtime.Versioning; | ||
using Foundation; | ||
using ObjCBindings; | ||
|
||
namespace TestNamespace; | ||
|
||
[SupportedOSPlatform ("macos")] | ||
[SupportedOSPlatform ("ios11.0")] | ||
[SupportedOSPlatform ("tvos11.0")] | ||
|
||
[BindingType<Class> ()] | ||
public partial class CIImage { | ||
|
||
[SupportedOSPlatform ("maccatalyst13.1")] | ||
[Field<Property> ("FormatRGBA16Int")] | ||
public static partial int FormatRGBA16Int { get; } | ||
|
||
[SupportedOSPlatform ("maccatalyst13.1")] | ||
[Field<Property> ("kCIFormatABGR8")] | ||
public static partial int FormatABGR8 { get; } | ||
|
||
[SupportedOSPlatform ("maccatalyst13.1")] | ||
[Field<Property> ("kCIFormatLA8")] | ||
public static partial int FormatLA8 { | ||
get; | ||
|
||
[SupportedOSPlatform ("ios17.0")] | ||
[SupportedOSPlatform ("tvos17.0")] | ||
[SupportedOSPlatform ("macos14.0")] | ||
[SupportedOSPlatform ("maccatalyst17.0")] | ||
set; | ||
} | ||
|
||
[SupportedOSPlatform ("maccatalyst13.1")] | ||
[Field<Property> ("kCIFormatLA8", Flags = Property.Notification)] | ||
public static partial NSString DidProcessEditingNotification { get; } | ||
|
||
} |
Oops, something went wrong.