Skip to content
Merged
Show file tree
Hide file tree
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
510 changes: 0 additions & 510 deletions src/ObjCRuntime/PlatformAvailability.cs

This file was deleted.

309 changes: 0 additions & 309 deletions src/ObjCRuntime/PlatformAvailability2.cs

This file was deleted.

26 changes: 26 additions & 0 deletions src/bgen/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,32 @@ public MacCatalystAttribute (byte major, byte minor, byte subminor)
}
}

[AttributeUsage (AttributeTargets.All, AllowMultiple = false)]
public sealed class MacAttribute : IntroducedAttribute {
public MacAttribute (byte major, byte minor)
: base (PlatformName.MacOSX, (int) major, (int) minor)
{
}

public MacAttribute (byte major, byte minor, byte subminor)
: base (PlatformName.MacOSX, (int) major, (int) minor, subminor)
{
}
}

[AttributeUsage (AttributeTargets.All, AllowMultiple = false)]
public sealed class iOSAttribute : IntroducedAttribute {
public iOSAttribute (byte major, byte minor)
: base (PlatformName.iOS, (int) major, (int) minor)
{
}

public iOSAttribute (byte major, byte minor, byte subminor)
: base (PlatformName.iOS, (int) major, (int) minor, subminor)
{
}
}

[AttributeUsage (AttributeTargets.All, AllowMultiple = false)]
public sealed class NoMacAttribute : UnavailableAttribute {
public NoMacAttribute ()
Expand Down
1 change: 0 additions & 1 deletion src/bgen/bgen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\LinkWithAttribute.cs" />
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\NativeAttribute.cs" />
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\NativeNameAttribute.cs" />
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\PlatformAvailability2.cs" />
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\Registrar.core.cs" />
<Compile Include="$(RepositoryPath)\src\ObjCRuntime\RequiresSuperAttribute.cs" />
<Compile Include="$(RepositoryPath)\tools\common\Execution.cs">
Expand Down
2 changes: 0 additions & 2 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -1845,8 +1845,6 @@ SHARED_CORE_SOURCES = \
ObjCRuntime/TransientString.cs \
ObjCRuntime/NFloat.cs \
ObjCRuntime/ObsoleteConstants.cs \
ObjCRuntime/PlatformAvailability.cs \
ObjCRuntime/PlatformAvailability2.cs \
ObjCRuntime/Protocol.cs \
ObjCRuntime/Registrar.core.cs \
ObjCRuntime/RequiresSuperAttribute.cs \
Expand Down
12 changes: 12 additions & 0 deletions tests/generator/BGenTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,18 @@ public void UnderlyingFieldType (Profile profile)
BuildFile (profile, true, true, "tests/underlyingfieldtype.cs");
}

[Test]
[TestCase (Profile.iOS)]
[TestCase (Profile.tvOS)]
[TestCase (Profile.MacCatalyst)]
[TestCase (Profile.macOSMobile)]
public void AvailabilityAttributes (Profile profile)
{
Configuration.IgnoreIfIgnoredPlatform (profile.AsPlatform ());
var bgen = BuildFile (profile, "tests/availability-attributes.cs");
bgen.AssertNoWarnings ();
}

[Test]
[TestCase (Profile.iOS)]
public void DelegatesWithNullableReturnType (Profile profile)
Expand Down
Loading