* [Class] Enable nullability + fix a few code updates.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Make the 'handle' field private.
* Remove the (IntPtr) constructor for .NET
* Make the (IntPtr, bool) constructor internal for .NET
* Remove unused 'Construct' method.
* Keep the public IntPtr constructor for Class.
It'll be the only way to create a Class instance given an IntPtr.
* [Protocol] Enable nullability and fix a few issues.
* Keep the public IntPtr constructor for Protocol.
It'll be the only way to create a Protocol instance given an IntPtr.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Make the 'handle' field private.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Use CFString.CreateNative/ReleaseNative instead of other means to create
native strings (the fastest and least memory hungry option).
* [AudioToolbox] Fix nullability issue to fix broken build.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Fix ownership logic: we can't call CFRetain on this type, but we can keep
track of whether we own it or not.
* Call 'GetCheckedHandle ()' (which will throw an ObjectDisposedException if
Handle == IntPtr.Zero) instead of manually checking for IntPtr.Zero and
throwing ObjectDisposedException.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Simplify some block code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Rename the public '_MidiData' type to 'MidiData' for .NET.
* Remove some dead code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
Fixes when building with XAMCORE_4_0:
> uikit.cs(6775,3): error CS0246: The type or namespace name 'UITextWritingDirection' could not be found (are you missing a using directive or an assembly reference?)
> uikit.cs(6597,3): error CS0246: The type or namespace name 'UITextWritingDirection' could not be found (are you missing a using directive or an assembly reference?)
> uikit.cs(6601,41): error CS0246: The type or namespace name 'UITextWritingDirection' could not be found (are you missing a using directive or an assembly reference?)
Fixes https://github.com/xamarin/xamarin-macios/issues/6573.
* [iAd] Remove this framework from .NET.
* [src] Use a different response file with HAS_<framework> defines for .NET.
This allows us to have different HAS_<framework> values for the .NET build (to
take into account frameworks that has been removed).
* Make the .NET framework removal logic per-platform.
* Use a different pattern in the rule to not match another pattern rule.
* NSEventSubtype: add missing members, and make the underlying type 'short' for all platforms in .NET.
* NSSystemDefinedEvents, NSEventMouseSubtype: obsolete (and remove from .NET),
and point to NSEventSubtype.
* Make CGPDFObject a common subclass for the CGPDF[Array|Dictionary|Stream]
classes, and keep the object lifetime code there.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Make any (IntPtr) constructors internal for .NET
* Simplify block creation code a bit.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Handle' property instead of accessing the private 'handle' field.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use CFString.CreateNative/ReleaseNative instead of other means to create
native strings (the fastest and least memory hungry option).
* Use the null-safe NativeObjectExtensions.GetHandle extension method to get
the handle instead of checking for null (avoids some code duplication).
* Use 'nameof (parameter)' instead of string constants.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* [CGImageMetadataTag] Subclass NativeObject + numerous other code updates
* Subclass NativeObject to reuse object lifetime code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use the null-safe NativeObjectExtensions.GetHandle extension method to get
the handle instead of checking for null (avoids some code duplication).
* Use 'nameof (parameter)' instead of string constants.
* Use the 'Runtime.GetNSObject<T> (IntPtr, bool)' overload to specify handle
ownership, to avoid having to call NSObject.DangerousReleaes manually later.
* Remove the (IntPtr) constructor for .NET
* Fix nullability attribute.
* [tests] Don't dispose a property value.
It ends up being the object instance we've stored elsewhere, which we don't
expect to be disposed.
* [ObjCRuntime] Add a non-deprecated internal system-version checking API and use it everywhere.
The PlatformHelper class is deprecated, so implement a new version that isn't
deprecated, and which shares a similar API between all platforms - the Check*
methods includes the name of the platform, because that makes it clearer which
version we're talking about from the call site. There's a quirk though:
there's no separate ChecktvOS or CheckMacCatalyst, because the system version
is the same as for iOS, so we can just use 'iOS'.
For macOS we can now use NSProcessInfo.ProcessInfo.OperatingSystemVersion to
determine the OS version, because it's supported in all versions of macOS we
support for .NET.
Fixes issues such as this when building with XAMCORE_4_0:
> CoreMedia/CMSync.cs(590,11): error CS0103: The name 'PlatformHelper' does not exist in the current context
* Bring back PlatformHelper.CheckSystemVersion, but only for !NET.
* [tests] Remove 32-bit macOS logic, it's long dead.
* [introspection] Implement OS version check using 'NSProcessInfo.ProcessInfo.IsOperatingSystemAtLeastVersion' for macOS.
* [monotouch-test] Use TestRuntime.[Check|Assert]XcodeVersion instead of PlatformHelper.CheckSystemVersion.
Microsoft.Dotnet.Sdk.Internal
From Version 6.0.100-rtm.21527.11 -> To Version 6.0.100-rtm.21552.8
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Subclass NativeObject to reuse object lifetime code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Subclass NativeObject to reuse object lifetime code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use the null-safe NativeObjectExtensions.GetHandle extension method to get
the handle instead of checking for null (avoids some code duplication).
* Use 'nameof (parameter)' instead of string constants.
* Remove the (IntPtr) constructor for .NET
The QTKit framework does not exist on macOS anymore, so just remove our
bindings for it now that we can break compatibility.
Fixes a lot of errors like this when building with XAMCORE_4_0:
> build/dotnet/macos/generated-sources/Accessibility/AXCategoricalDataAxisDescriptor.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> build/dotnet/macos/generated-sources/Accessibility/AXChart.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> build/dotnet/macos/generated-sources/Accessibility/AXChartDescriptor.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> build/dotnet/macos/generated-sources/Accessibility/AXChartDescriptorContentDirection.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> build/dotnet/macos/generated-sources/Accessibility/AXCustomContent.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> build/dotnet/macos/generated-sources/Accessibility/AXCustomContentImportance.g.cs(14,7): error CS0246: The type or namespace name 'QTKit' could not be found (are you missing a using directive or an assembly reference?)
> [...]
* Subclass NativeObject to reuse object lifetime code.
* Enable nullability and fix code accordingly.
* Use 'is' and 'is not' instead of '==' and '!=' for object identity.
* Use 'nameof (parameter)' instead of string constants.
* Use Array.Empty<T> instead of creating an empty array manually.