Skip to content

Commit 5f8da25

Browse files
authored
[src] Remove !NET code from all frameworks starting with 'A'. (#22832)
1 parent c28bc47 commit 5f8da25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+14
-840
lines changed

src/ARKit/ARCompat.cs

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/ARKit/ARFaceGeometry.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88
//
99

1010
using System;
11+
using System.Numerics;
1112
using System.Runtime.InteropServices;
12-
#if NET
13-
using Vector2 = global::System.Numerics.Vector2;
13+
1414
using Vector3 = global::CoreGraphics.NVector3;
15-
#else
16-
using Vector2 = global::OpenTK.Vector2;
17-
using Vector3 = global::OpenTK.NVector3;
18-
#endif
1915

2016
#nullable enable
2117

src/ARKit/ARPlaneGeometry.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,10 @@
88
//
99

1010
using System;
11+
using System.Numerics;
1112
using System.Runtime.InteropServices;
12-
#if NET
13-
using Vector2 = global::System.Numerics.Vector2;
13+
1414
using Vector3 = global::CoreGraphics.NVector3;
15-
#else
16-
using Vector2 = global::OpenTK.Vector2;
17-
using Vector3 = global::OpenTK.NVector3;
18-
#endif
1915

2016
#nullable enable
2117

src/ARKit/ARPointCloud.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@
99

1010
using System;
1111
using System.Runtime.InteropServices;
12-
#if NET
12+
1313
using Vector3 = global::CoreGraphics.NVector3;
14-
#else
15-
using Vector3 = global::OpenTK.NVector3;
16-
#endif
1714

1815
#nullable enable
1916

src/ARKit/ARSkeleton.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,15 @@
99

1010
namespace ARKit {
1111
public partial class ARSkeleton {
12-
13-
#if NET
1412
[SupportedOSPlatform ("ios14.0")]
1513
[UnsupportedOSPlatform ("maccatalyst")]
1614
[UnsupportedOSPlatform ("tvos")]
17-
#else
18-
[iOS (14, 0)]
19-
#endif
2015
[DllImport (Constants.ARKitLibrary)]
2116
static extern IntPtr /* NSString */ ARSkeletonJointNameForRecognizedPointKey (/* NSString */ IntPtr recognizedPointKey);
2217

23-
#if NET
2418
[SupportedOSPlatform ("ios14.0")]
2519
[UnsupportedOSPlatform ("maccatalyst")]
2620
[UnsupportedOSPlatform ("tvos")]
27-
#else
28-
[iOS (14, 0)]
29-
#endif
3021
public static NSString? CreateJointName (NSString recognizedPointKey)
3122
{
3223
if (recognizedPointKey is null)

src/ARKit/ARSkeleton2D.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@
88
//
99

1010
using System;
11+
using System.Numerics;
1112
using System.Runtime.InteropServices;
12-
#if NET
13-
using Vector2 = global::System.Numerics.Vector2;
14-
#else
15-
using Vector2 = global::OpenTK.Vector2;
16-
#endif
1713

1814
#nullable enable
1915

src/ARKit/ARSkeleton3D.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99

1010
using System;
1111
using System.Runtime.InteropServices;
12-
#if NET
1312
using Matrix4 = global::CoreGraphics.NMatrix4;
14-
#else
15-
using Matrix4 = global::OpenTK.NMatrix4;
16-
#endif
1713

1814
#nullable enable
1915

src/AVKit/Enums.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ public enum AVPlayerViewControlsStyle : long {
2828
/// <summary>Enumeration of error states that can occur while using AVKit.</summary>
2929
/// <remarks>To be added.</remarks>
3030
[TV (13, 0)]
31-
#if NET
3231
[NoMac]
3332
[MacCatalyst (13, 1)]
34-
#endif
3533
[Native]
3634
[ErrorDomain ("AVKitErrorDomain")]
3735
public enum AVKitError : long {

src/Accelerate/vImageTypes.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,12 @@
4040
using ResamplingFilter = System.IntPtr;
4141
using GammaFunction = System.IntPtr;
4242

43-
#if NET
4443
using vImagePixelCount = System.IntPtr;
45-
#else
46-
using vImagePixelCount = System.nint;
47-
#endif
4844

4945
#nullable enable
5046

5147
namespace Accelerate {
5248
// vImage_Buffer - vImage_Types.h
53-
#if NET
5449
/// <summary>Structure used to represent image data.</summary>
5550
/// <remarks>
5651
/// <para>This structure is used to describe a block of image data.   The image data is stored in the Data property with the Width and Height properties describing how many pixels the image has on each dimension.   </para>
@@ -62,7 +57,6 @@ namespace Accelerate {
6257
[SupportedOSPlatform ("maccatalyst")]
6358
[SupportedOSPlatform ("macos")]
6459
[SupportedOSPlatform ("tvos")]
65-
#endif
6660
[StructLayout (LayoutKind.Sequential)]
6761
public struct vImageBuffer {
6862
/// <summary>Points to the image data.</summary>
@@ -104,14 +98,12 @@ public int Height {
10498
}
10599

106100
// vImage_AffineTransform - vImage_Types.h
107-
#if NET
108101
/// <summary>Struct that represents an affine transformation as a vector of six single-precision values.</summary>
109102
/// <remarks>To be added.</remarks>
110103
[SupportedOSPlatform ("ios")]
111104
[SupportedOSPlatform ("maccatalyst")]
112105
[SupportedOSPlatform ("macos")]
113106
[SupportedOSPlatform ("tvos")]
114-
#endif
115107
[StructLayout (LayoutKind.Sequential)]
116108
public struct vImageAffineTransformFloat {
117109
// all defined as 'float'
@@ -138,14 +130,12 @@ public struct vImageAffineTransformFloat {
138130
}
139131

140132
// vImage_AffineTransform_Double - vImage_Types.h
141-
#if NET
142133
/// <summary>Struct that represents an affine transformation as a vector of six double-precision values.</summary>
143134
/// <remarks>To be added.</remarks>
144135
[SupportedOSPlatform ("ios")]
145136
[SupportedOSPlatform ("maccatalyst")]
146137
[SupportedOSPlatform ("macos")]
147138
[SupportedOSPlatform ("tvos")]
148-
#endif
149139
[StructLayout (LayoutKind.Sequential)]
150140
public struct vImageAffineTransformDouble {
151141
/// <summary>To be added.</summary>
@@ -290,14 +280,12 @@ public enum vImageFlags : uint {
290280
NoAllocate = 512,
291281
}
292282

293-
#if NET
294283
/// <summary>Represents a pixel using 32-bit floating points values for its alpha, red, green and blue components.</summary>
295284
/// <remarks>To be added.</remarks>
296285
[SupportedOSPlatform ("ios")]
297286
[SupportedOSPlatform ("maccatalyst")]
298287
[SupportedOSPlatform ("macos")]
299288
[SupportedOSPlatform ("tvos")]
300-
#endif
301289
[StructLayout (LayoutKind.Sequential)]
302290
public struct PixelFFFF {
303291
/// <summary>Alpha channel component.</summary>
@@ -321,14 +309,12 @@ public struct PixelFFFF {
321309
public readonly static PixelFFFF Zero;
322310
}
323311

324-
#if NET
325312
/// <summary>Represents a pixel using 8-bit integers for its red, green, blue and alpha components.</summary>
326313
/// <remarks>To be added.</remarks>
327314
[SupportedOSPlatform ("ios")]
328315
[SupportedOSPlatform ("maccatalyst")]
329316
[SupportedOSPlatform ("macos")]
330317
[SupportedOSPlatform ("tvos")]
331-
#endif
332318
[StructLayout (LayoutKind.Sequential)]
333319
public struct Pixel8888 {
334320
/// <summary>Alpha channel component.</summary>
@@ -353,7 +339,6 @@ public struct Pixel8888 {
353339
public readonly static Pixel8888 Zero;
354340
}
355341

356-
#if NET
357342
/// <summary>Represents a pixel using 16-bit unsigned integers for its alpha, red, green and blue components.</summary>
358343
/// <remarks>
359344
/// <para>
@@ -363,7 +348,6 @@ public struct Pixel8888 {
363348
[SupportedOSPlatform ("maccatalyst")]
364349
[SupportedOSPlatform ("macos")]
365350
[SupportedOSPlatform ("tvos")]
366-
#endif
367351
[StructLayout (LayoutKind.Sequential)]
368352
public struct PixelARGB16U {
369353
/// <summary>Alpha Component.</summary>
@@ -383,7 +367,6 @@ public struct PixelARGB16U {
383367
public readonly static PixelARGB16U Zero;
384368
}
385369

386-
#if NET
387370
/// <summary>Represents a pixel using 16-bit signed integers for its alpha, red, green and blue components.</summary>
388371
/// <remarks>
389372
/// <para>
@@ -393,7 +376,6 @@ public struct PixelARGB16U {
393376
[SupportedOSPlatform ("maccatalyst")]
394377
[SupportedOSPlatform ("macos")]
395378
[SupportedOSPlatform ("tvos")]
396-
#endif
397379
[StructLayout (LayoutKind.Sequential)]
398380
public struct PixelARGB16S {
399381
/// <summary>Alpha Component.</summary>
@@ -413,7 +395,6 @@ public struct PixelARGB16S {
413395
public readonly static PixelARGB16S Zero;
414396
}
415397

416-
#if NET
417398
/// <summary>Accelerated image operations.</summary>
418399
/// <remarks>
419400
/// <para>
@@ -425,7 +406,6 @@ public struct PixelARGB16S {
425406
[SupportedOSPlatform ("maccatalyst")]
426407
[SupportedOSPlatform ("macos")]
427408
[SupportedOSPlatform ("tvos")]
428-
#endif
429409
unsafe public static class vImage {
430410

431411
#region Convolve

src/Accessibility/AXPrefers.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ public static bool HorizontalTextEnabled ()
2020
return AXPrefersHorizontalTextLayout () != 0;
2121
}
2222

23-
#if NET
2423
[SupportedOSPlatform ("ios18.0")]
2524
[SupportedOSPlatform ("maccatalyst18.0")]
2625
[SupportedOSPlatform ("macos15.0")]
@@ -36,6 +35,5 @@ public static bool NonBlinkingTextInsertionIndicator ()
3635
{
3736
return AXPrefersNonBlinkingTextInsertionIndicator () != 0;
3837
}
39-
#endif // NET
4038
}
4139
}

src/Accessibility/AXSettings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
using Foundation;
88
using ObjCRuntime;
99

10-
#if NET
11-
1210
namespace Accessibility {
1311

1412
[SupportedOSPlatform ("ios18.0")]
@@ -78,5 +76,3 @@ static void OpenSettingsFeatureCompletionHandler (IntPtr block, IntPtr error)
7876
}
7977
}
8078
}
81-
82-
#endif // NET

src/Accounts/AccountStoreOptions.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,12 @@ public enum ACFacebookAudience {
4949
OnlyMe,
5050
}
5151

52-
#if NET
5352
/// <summary>Options available when requesting Facebook access.</summary>
5453
/// <remarks>
5554
/// </remarks>
5655
[SupportedOSPlatform ("ios")]
5756
[SupportedOSPlatform ("maccatalyst")]
5857
[SupportedOSPlatform ("macos")]
59-
#endif
6058
public class AccountStoreOptions : DictionaryContainer {
6159
#if !COREBUILD
6260
/// <summary>To be added.</summary>

src/AdSupport/ASCompat.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)