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
19 changes: 8 additions & 11 deletions src/MetricKit/MXMetaData.cs
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
#if IOS || __MACCATALYST__

#nullable enable

using System;

using Foundation;
using ObjCRuntime;
using UIKit;

namespace MetricKit {

public partial class MXMetaData {
[SupportedOSPlatform ("ios14.0")]
[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
public virtual NSDictionary DictionaryRepresentation {
get {
if (SystemVersion.IsAtLeastXcode12)
return _DictionaryRepresentation14;
else {
#pragma warning disable CA1416 // This call site is reachable on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later, 'macOS/OSX' 12.0 and later. 'MXMetaData._DictionaryRepresentation13' is only supported on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416) [/Users/rolf/work/dotnet/macios/main/macios/src/build/dotnet/MacCatalyst/csproj/platform/Microsoft.MacCatalyst.csproj]
#pragma warning disable CA1422 // This call site is reachable on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later, 'macOS/OSX' 12.0 and later. 'MXMetaData._DictionaryRepresentation13' is obsoleted on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422) [/Users/rolf/work/dotnet/macios/main/macios/src/build/dotnet/MacCatalyst/csproj/platform/Microsoft.MacCatalyst.csproj]
#if !__MACOS__
if (!SystemVersion.IsAtLeastXcode12) {
#pragma warning disable CA1416 // This call site is reachable on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later, 'macOS/OSX' 12.0 and later. 'MXMetaData._DictionaryRepresentation13' is only supported on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)
#pragma warning disable CA1422 // This call site is reachable on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later, 'macOS/OSX' 12.0 and later. 'MXMetaData._DictionaryRepresentation13' is obsoleted on: 'ios' 14.0 and later, 'maccatalyst' 14.0 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422)
return _DictionaryRepresentation13;
#pragma warning restore CA1422
#pragma warning restore CA1416
}
#endif
return _DictionaryRepresentation14;
}
}
}
}
#endif
16 changes: 8 additions & 8 deletions src/MetricKit/MXMetric.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#if IOS

#nullable enable

using System;

using Foundation;
using ObjCRuntime;
using UIKit;

namespace MetricKit {

public partial class MXMetric {

[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
public virtual NSDictionary DictionaryRepresentation {
get {
if (SystemVersion.IsAtLeastXcode12)
return _DictionaryRepresentation14;
else
#if !__MACOS__
if (!SystemVersion.IsAtLeastXcode12)
return _DictionaryRepresentation13;
#endif
return _DictionaryRepresentation14;
}
}
}
}
#endif
16 changes: 8 additions & 8 deletions src/MetricKit/MXMetricPayload.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#if IOS

#nullable enable

using System;

using Foundation;
using ObjCRuntime;
using UIKit;

namespace MetricKit {

public partial class MXMetricPayload {

[SupportedOSPlatform ("ios")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("tvos")]
[SupportedOSPlatform ("macos")]
public virtual NSDictionary DictionaryRepresentation {
get {
if (SystemVersion.IsAtLeastXcode12)
return _DictionaryRepresentation14;
else
#if !__MACOS__
if (!SystemVersion.IsAtLeastXcode12)
return _DictionaryRepresentation13;
#endif
return _DictionaryRepresentation14;
}
}
}
}
#endif
Loading
Loading