Merge remote-tracking branch 'origin/main' into net7.0
This commit is contained in:
Коммит
d167ae86b8
|
@ -111,7 +111,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<!-- Add a reference to our custom nfloat reference assembly for .NET 6 (but only for .NET 6, once we switch to .NET 7 this can be removed) -->
|
||||
<PackageReference Include="System.Runtime.InteropServices.NFloat.Internal" Condition="'$(BundledNETCorePlatformsPackageVersion.Substring(0,1))' == '6'" Version="[6.0.1, )" IsImplicitlyDefined="true" />
|
||||
<PackageReference Include="System.Runtime.InteropServices.NFloat.Internal" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))" Version="[6.0.1, )" IsImplicitlyDefined="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
|
|
@ -1054,11 +1054,6 @@
|
|||
<_GeneratorAttributeAssembly>$(_XamarinSdkRootDirectory)/tools/lib/Xamarin.Apple.BindingAttributes.dll</_GeneratorAttributeAssembly>
|
||||
<_DotNetCscCompiler>$(RoslynTargetsPath)\bincore\csc.dll</_DotNetCscCompiler>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_BTouchCompileCommand Include="$(DOTNET_HOST_PATH)" />
|
||||
<_BTouchCompileCommand Include="$(RoslynTargetsPath)/bincore/csc.dll" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_ComputeNativeExecutableInputs" DependsOnTargets="_ComputeVariables">
|
||||
|
|
|
@ -640,12 +640,13 @@ xamarin_mono_object_release_at_process_exit (MonoObject *mobj)
|
|||
MonoAssembly *
|
||||
mono_assembly_open (const char * filename, MonoImageOpenStatus * status)
|
||||
{
|
||||
assert (status == NULL);
|
||||
|
||||
MonoAssembly *rv = xamarin_find_assembly (filename);
|
||||
|
||||
LOG_CORECLR (stderr, "mono_assembly_open (%s, %p) => MonoObject=%p GCHandle=%p\n", filename, status, rv, rv->gchandle);
|
||||
|
||||
if (status != NULL)
|
||||
*status = rv == NULL ? MONO_IMAGE_ERROR_ERRNO : MONO_IMAGE_OK;
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -917,22 +917,27 @@ xamarin_file_exists (const char *path)
|
|||
return stat (path, &buffer) == 0;
|
||||
}
|
||||
|
||||
static MonoAssembly *
|
||||
xamarin_open_assembly_or_assert (const char *name)
|
||||
{
|
||||
MonoImageOpenStatus status = MONO_IMAGE_OK;
|
||||
MonoAssembly *assembly = mono_assembly_open (name, &status);
|
||||
if (assembly == NULL)
|
||||
xamarin_assertion_message ("Failed to open the assembly '%s' from the app: %i (errno: %i). This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name, (int) status, errno);
|
||||
return assembly;
|
||||
}
|
||||
|
||||
// Returns a retained MonoObject. Caller must release.
|
||||
MonoAssembly *
|
||||
xamarin_open_assembly (const char *name)
|
||||
{
|
||||
// COOP: this is a function executed only at startup, I believe the mode here doesn't matter.
|
||||
char path [1024];
|
||||
MonoAssembly *assembly;
|
||||
bool exists = false;
|
||||
|
||||
#if MONOMAC
|
||||
if (xamarin_get_is_mkbundle ()) {
|
||||
assembly = mono_assembly_open (name, NULL);
|
||||
if (assembly == NULL)
|
||||
xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
|
||||
return assembly;
|
||||
}
|
||||
if (xamarin_get_is_mkbundle ())
|
||||
return xamarin_open_assembly_or_assert (name);
|
||||
#endif
|
||||
|
||||
exists = xamarin_locate_assembly_resource (name, NULL, name, path, sizeof (path));
|
||||
|
@ -942,7 +947,7 @@ xamarin_open_assembly (const char *name)
|
|||
// Check if we already have the assembly in memory
|
||||
xamarin_get_assembly_name_without_extension (name, path, sizeof (path));
|
||||
MonoAssemblyName *aname = mono_assembly_name_new (path);
|
||||
assembly = mono_assembly_loaded (aname);
|
||||
MonoAssembly *assembly = mono_assembly_loaded (aname);
|
||||
mono_assembly_name_free (aname);
|
||||
if (assembly)
|
||||
return assembly;
|
||||
|
@ -954,11 +959,7 @@ xamarin_open_assembly (const char *name)
|
|||
if (!exists)
|
||||
xamarin_assertion_message ("Could not find the assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
|
||||
|
||||
assembly = mono_assembly_open (path, NULL);
|
||||
if (assembly == NULL)
|
||||
xamarin_assertion_message ("Could not find the required assembly '%s' in the app. This is usually fixed by cleaning and rebuilding your project; if that doesn't work, please file a bug report: https://github.com/xamarin/xamarin-macios/issues/new", name);
|
||||
|
||||
return assembly;
|
||||
return xamarin_open_assembly_or_assert (path);
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -1723,6 +1723,9 @@ namespace CarPlay {
|
|||
[Export ("initWithImage:handler:")]
|
||||
NativeHandle Constructor (UIImage image, [NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
|
||||
[NullAllowed, Export ("image", ArgumentSemantic.Strong)]
|
||||
UIImage Image { get; }
|
||||
}
|
||||
|
@ -1926,23 +1929,38 @@ namespace CarPlay {
|
|||
|
||||
[NoWatch, NoTV, NoMac, iOS (14,0)]
|
||||
[BaseType (typeof (CPNowPlayingButton))]
|
||||
interface CPNowPlayingShuffleButton {}
|
||||
interface CPNowPlayingShuffleButton {
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
}
|
||||
|
||||
[NoWatch, NoTV, NoMac, iOS (14,0)]
|
||||
[BaseType (typeof (CPNowPlayingButton))]
|
||||
interface CPNowPlayingAddToLibraryButton {}
|
||||
interface CPNowPlayingAddToLibraryButton {
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
}
|
||||
|
||||
[NoWatch, NoTV, NoMac, iOS (14,0)]
|
||||
[BaseType (typeof (CPNowPlayingButton))]
|
||||
interface CPNowPlayingMoreButton {}
|
||||
interface CPNowPlayingMoreButton {
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
}
|
||||
|
||||
[NoWatch, NoTV, NoMac, iOS (14,0)]
|
||||
[BaseType (typeof (CPNowPlayingButton))]
|
||||
interface CPNowPlayingPlaybackRateButton {}
|
||||
interface CPNowPlayingPlaybackRateButton {
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
}
|
||||
|
||||
[NoWatch, NoTV, NoMac, iOS (14,0)]
|
||||
[BaseType (typeof (CPNowPlayingButton))]
|
||||
interface CPNowPlayingRepeatButton {}
|
||||
interface CPNowPlayingRepeatButton {
|
||||
[Export ("initWithHandler:")]
|
||||
NativeHandle Constructor ([NullAllowed] Action<CPNowPlayingButton> handler);
|
||||
}
|
||||
|
||||
interface ICPListTemplateItem { }
|
||||
|
||||
|
|
|
@ -368,9 +368,6 @@ namespace Introspection
|
|||
// it's not complete (there's many more SDK assemblies) but we cannot add all of them into a single project anyway
|
||||
|
||||
[Test]
|
||||
#if __MACCATALYST__ && !NET
|
||||
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
|
||||
#endif
|
||||
public void Corlib ()
|
||||
{
|
||||
var a = typeof (int).Assembly;
|
||||
|
@ -379,9 +376,6 @@ namespace Introspection
|
|||
}
|
||||
|
||||
[Test]
|
||||
#if __MACCATALYST__ && !NET
|
||||
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
|
||||
#endif
|
||||
public void System ()
|
||||
{
|
||||
var a = typeof (System.Net.WebClient).Assembly;
|
||||
|
@ -390,9 +384,6 @@ namespace Introspection
|
|||
}
|
||||
|
||||
[Test]
|
||||
#if __MACCATALYST__ && !NET
|
||||
[Ignore ("https://github.com/xamarin/xamarin-macios/issues/10883")]
|
||||
#endif
|
||||
public void SystemCore ()
|
||||
{
|
||||
var a = typeof (Enumerable).Assembly;
|
||||
|
|
|
@ -10,9 +10,6 @@ namespace DontLink.Calendars {
|
|||
[TestFixture]
|
||||
// we want the tests to be available because we use the linker
|
||||
[Preserve (AllMembers = true)]
|
||||
#if NET && __MACCATALYST__
|
||||
[Ignore ("No globalization data yet - https://github.com/xamarin/xamarin-macios/issues/8906")]
|
||||
#endif
|
||||
public class CalendarTest {
|
||||
|
||||
// application must *NOT* be build with I18N.MidEast and I18N.Other (Thai)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Rocks;
|
||||
using System.Linq;
|
||||
|
@ -5,73 +6,103 @@ using System.Linq;
|
|||
using Microsoft.MaciOS.Nnyeah.AssemblyComparator;
|
||||
|
||||
namespace Microsoft.MaciOS.Nnyeah {
|
||||
// Converting constructors from Legacy to NET6 have some special concerns:
|
||||
// - The arguments to NSObject's base class (IntPtr) and (IntPtr, bool) must be moved to NativeHandle, but _only_ if we're derived from NSObject
|
||||
// - There are some absurd cases where people store off that IntPtr that we can't convert safely, so bail on non-trivial ctors
|
||||
// - Invocations to said constructors need to be converted, but those should hopefully rare....
|
||||
public class ConstructorTransforms {
|
||||
TypeReference NewNativeHandleTypeDefinition;
|
||||
MethodDefinition IntPtrCtor;
|
||||
MethodDefinition IntPtrCtorWithBool;
|
||||
// Converting constructors from Legacy to NET6 have some special concerns:
|
||||
// - The arguments to NSObject's base class (IntPtr) and (IntPtr, bool) must be moved to NativeHandle, but _only_ if we're derived from NSObject
|
||||
// - There are some absurd cases where people store off that IntPtr that we can't convert safely, so bail on non-trivial ctors
|
||||
// - Invocations to said constructors need to be converted, but those should hopefully rare....
|
||||
public class ConstructorTransforms {
|
||||
TypeReference NewNativeHandleTypeDefinition;
|
||||
MethodDefinition IntPtrCtor;
|
||||
MethodDefinition IntPtrCtorWithBool;
|
||||
EventHandler<WarningEventArgs>? WarningIssued;
|
||||
EventHandler<TransformEventArgs>? Transformed;
|
||||
|
||||
public ConstructorTransforms (TypeReference newNativeHandleTypeDefinition, MethodDefinition intPtrCtor, MethodDefinition intPtrCtorWithBool)
|
||||
{
|
||||
NewNativeHandleTypeDefinition = newNativeHandleTypeDefinition;
|
||||
IntPtrCtor = intPtrCtor;
|
||||
IntPtrCtorWithBool = intPtrCtorWithBool;
|
||||
}
|
||||
public ConstructorTransforms (TypeReference newNativeHandleTypeDefinition, MethodDefinition intPtrCtor, MethodDefinition intPtrCtorWithBool,
|
||||
EventHandler<WarningEventArgs>? warningIssued, EventHandler<TransformEventArgs>? transformed)
|
||||
{
|
||||
NewNativeHandleTypeDefinition = newNativeHandleTypeDefinition;
|
||||
IntPtrCtor = intPtrCtor;
|
||||
IntPtrCtorWithBool = intPtrCtorWithBool;
|
||||
WarningIssued = warningIssued;
|
||||
Transformed = transformed;
|
||||
}
|
||||
|
||||
public void AddTransforms (TypeAndMemberMap moduleMap)
|
||||
{
|
||||
// Remove "NSObject (IntPtr)" from missing list and add "NSObject (NativeHandle)"
|
||||
const string IntPtrCtorSignature = "System.Void Foundation.NSObject::.ctor(System.IntPtr)";
|
||||
moduleMap.MethodsNotPresent.Remove (IntPtrCtorSignature);
|
||||
IntPtrCtor.Parameters[0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
moduleMap.MethodMap.Add (IntPtrCtorSignature, IntPtrCtor);
|
||||
public void AddTransforms (TypeAndMemberMap moduleMap)
|
||||
{
|
||||
// Remove "NSObject (IntPtr)" from missing list and add "NSObject (NativeHandle)"
|
||||
const string IntPtrCtorSignature = "System.Void Foundation.NSObject::.ctor(System.IntPtr)";
|
||||
moduleMap.MethodsNotPresent.Remove (IntPtrCtorSignature);
|
||||
IntPtrCtor.Parameters [0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
moduleMap.MethodMap.Add (IntPtrCtorSignature, IntPtrCtor);
|
||||
|
||||
// Remove "NSObject (IntPtr, bool)" from missing list and add "NSObject (NativeHandle,System.Boolean)"
|
||||
const string IntPtrBoolCtorSignature = "System.Void Foundation.NSObject::.ctor(System.IntPtr,System.Boolean)";
|
||||
moduleMap.MethodsNotPresent.Remove (IntPtrBoolCtorSignature);
|
||||
IntPtrCtorWithBool.Parameters[0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
moduleMap.MethodMap.Add (IntPtrBoolCtorSignature, IntPtrCtorWithBool);
|
||||
}
|
||||
// Remove "NSObject (IntPtr, bool)" from missing list and add "NSObject (NativeHandle,System.Boolean)"
|
||||
const string IntPtrBoolCtorSignature = "System.Void Foundation.NSObject::.ctor(System.IntPtr,System.Boolean)";
|
||||
moduleMap.MethodsNotPresent.Remove (IntPtrBoolCtorSignature);
|
||||
IntPtrCtorWithBool.Parameters [0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
moduleMap.MethodMap.Add (IntPtrBoolCtorSignature, IntPtrCtorWithBool);
|
||||
}
|
||||
|
||||
static bool IsIntPtrCtor (MethodDefinition d)
|
||||
{
|
||||
if (d.Name != ".ctor")
|
||||
return false;
|
||||
bool isSingle = d.Parameters.Count == 1 &&
|
||||
d.Parameters.First ().ParameterType.FullName == "System.IntPtr";
|
||||
bool isDouble = d.Parameters.Count == 2 &&
|
||||
d.Parameters.First ().ParameterType.FullName == "System.IntPtr" &&
|
||||
d.Parameters.Last ().ParameterType.FullName == "System.Boolean";
|
||||
return isSingle || isDouble;
|
||||
}
|
||||
static bool IsIntPtrCtor (MethodDefinition d)
|
||||
{
|
||||
if (d.Name != ".ctor")
|
||||
return false;
|
||||
bool isSingle = d.Parameters.Count == 1 &&
|
||||
d.Parameters.First ().ParameterType.FullName == "System.IntPtr";
|
||||
bool isDouble = d.Parameters.Count == 2 &&
|
||||
d.Parameters.First ().ParameterType.FullName == "System.IntPtr" &&
|
||||
d.Parameters.Last ().ParameterType.FullName == "System.Boolean";
|
||||
return isSingle || isDouble;
|
||||
}
|
||||
|
||||
static bool IsNSObjectDerived (TypeReference? typeReference)
|
||||
{
|
||||
if (typeReference is null) {
|
||||
return false;
|
||||
}
|
||||
if (typeReference.FullName == "Foundation.NSObject") {
|
||||
return true;
|
||||
}
|
||||
return IsNSObjectDerived (typeReference.Resolve ().BaseType);
|
||||
}
|
||||
bool IsNSObjectDerived (TypeReference? typeReference)
|
||||
{
|
||||
if (typeReference is null)
|
||||
return false;
|
||||
var initialTypeReference = typeReference;
|
||||
TypeReference? firstIssuedTypeReference = null;
|
||||
var reworkNeededOnTheWayUp = false;
|
||||
while (true) {
|
||||
if (typeReference is null) {
|
||||
return false;
|
||||
}
|
||||
if (typeReference.FullName == "Foundation.NSObject") {
|
||||
if (reworkNeededOnTheWayUp && firstIssuedTypeReference is not null) {
|
||||
WarningIssued?.Invoke (this, new WarningEventArgs (initialTypeReference.DeclaringType.FullName,
|
||||
initialTypeReference.Name, "IntPtr", String.Format (Errors.N0009, initialTypeReference.FullName,
|
||||
firstIssuedTypeReference.FullName)));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
typeReference = typeReference.Resolve ().BaseType;
|
||||
if (!reworkNeededOnTheWayUp && typeReference is not null) {
|
||||
var typeDefinition = typeReference.Resolve ();
|
||||
if (typeDefinition is not null) {
|
||||
if (typeDefinition.Methods.Any (IsIntPtrCtor)) {
|
||||
if (typeDefinition.Module != initialTypeReference.Module) {
|
||||
reworkNeededOnTheWayUp = true;
|
||||
firstIssuedTypeReference = typeDefinition;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ReworkAsNeeded (TypeDefinition definition)
|
||||
{
|
||||
if (IsNSObjectDerived (definition.BaseType)) {
|
||||
if (definition.GetConstructors ().FirstOrDefault (IsIntPtrCtor) is MethodDefinition ctor) {
|
||||
// How many instructions it takes to invoke a 1 or 2 param base ctor
|
||||
// We can not safely process things that might store off the IntPtr
|
||||
// or other such insanity, so just fail fast
|
||||
if (ctor.Body.Instructions.Count > 7) {
|
||||
throw new ConversionException (Errors.E0016);
|
||||
}
|
||||
ctor.Parameters[0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void ReworkAsNeeded (TypeDefinition definition)
|
||||
{
|
||||
if (IsNSObjectDerived (definition.BaseType)) {
|
||||
if (definition.GetConstructors ().FirstOrDefault (IsIntPtrCtor) is MethodDefinition ctor) {
|
||||
// How many instructions it takes to invoke a 1 or 2 param base ctor
|
||||
// We can not safely process things that might store off the IntPtr
|
||||
// or other such insanity, so just fail fast
|
||||
if (ctor.Body.Instructions.Count > 7) {
|
||||
throw new ConversionException (Errors.E0016);
|
||||
}
|
||||
ctor.Parameters [0].ParameterType = NewNativeHandleTypeDefinition;
|
||||
Transformed?.Invoke (this, new TransformEventArgs (ctor.DeclaringType.FullName,
|
||||
ctor.Name, "IntPtr", 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
@ -10,35 +9,46 @@
|
|||
|
||||
namespace Microsoft.MaciOS.Nnyeah {
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// This class was generated by MSBuild using the GenerateResource task.
|
||||
/// To add or remove a member, edit your .resx file then rerun MSBuild.
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Build.Tasks.StronglyTypedResourceBuilder", "15.1.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Errors {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Errors() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Resources.ResourceManager ResourceManager {
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Microsoft.MaciOS.Nnyeah.Errors", typeof(Errors).Assembly);
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.MaciOS.Nnyeah.Errors", typeof(Errors).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static System.Globalization.CultureInfo Culture {
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
|
@ -47,148 +57,229 @@ namespace Microsoft.MaciOS.Nnyeah {
|
|||
}
|
||||
}
|
||||
|
||||
internal static string N0001 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0001", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0002 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0002", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0003 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0003", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0004 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0004", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0005 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0005", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0006 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0006", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0007 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0007", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
internal static string N0008 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0008", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Input file '{0}' doesn't exist..
|
||||
/// </summary>
|
||||
internal static string E0001 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0001", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Output file '{0}' already exists. Use '--force-overwrite' if you want to overwrite it..
|
||||
/// </summary>
|
||||
internal static string E0002 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0002", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to read module from file {0}: {1}..
|
||||
/// </summary>
|
||||
internal static string E0003 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0003", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to generate output file, unexpected exception: {0}..
|
||||
/// </summary>
|
||||
internal static string E0004 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0004", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Module is not loaded. Call Load first..
|
||||
/// </summary>
|
||||
internal static string E0005 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0005", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unable to open file {0} {1}.
|
||||
/// </summary>
|
||||
internal static string E0006 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0006", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This should never happen..
|
||||
/// </summary>
|
||||
internal static string E0007 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0007", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unexpected visit kind: {0}..
|
||||
/// </summary>
|
||||
internal static string E0008 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0008", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to After visiting, type stack is not empty. This is bad..
|
||||
/// </summary>
|
||||
internal static string E0009 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0009", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Type {0} not found..
|
||||
/// </summary>
|
||||
internal static string E0010 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0010", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error while attempting to compare assemblies: {0}.
|
||||
/// </summary>
|
||||
internal static string E0011 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0011", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error while attempting to map type {0} in old assembly. This type does not exist in the new assembly or has been renamed. Conversion can't continue. Your best option is to port the old assembly to .NET 6.
|
||||
/// </summary>
|
||||
internal static string E0012 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0012", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error while attempting to map member {0} in old assembly. This member does not exist in the new assembly or has been renamed. Conversion can't continue. Your best option is to port the old assembly to .NET 6.
|
||||
/// </summary>
|
||||
internal static string E0013 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0013", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to File for conversion (--input) and output location (--output) are required options..
|
||||
/// </summary>
|
||||
internal static string E0014 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0014", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Support legacy and NET assemblies --xamarin-assembly and --microsoft-assembly are currently required options..
|
||||
/// </summary>
|
||||
internal static string E0015 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0015", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error while processing constructor on type {0} in the old assembly. Constructors that do non-trivial work are not supported..
|
||||
/// </summary>
|
||||
internal static string E0016 {
|
||||
get {
|
||||
return ResourceManager.GetString("E0016", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to IConvertible interfaces are not supported yet. If this code gets called, it will fail. Consider contacting the library maintainer to request a dotnet 6 upgrade..
|
||||
/// </summary>
|
||||
internal static string N0001 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0001", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CopyArray for nuint is not supported yet. If this method is called, it will not function correctly..
|
||||
/// </summary>
|
||||
internal static string N0002 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0002", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Package does not need changes - no output generated..
|
||||
/// </summary>
|
||||
internal static string N0003 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0003", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In {0}.{1}, found reference to {2}. Added {3} IL instructions and removed {4} IL instructions..
|
||||
/// </summary>
|
||||
internal static string N0004 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0004", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In {0}.{1}, found reference to {2}. Added {3} IL instructions..
|
||||
/// </summary>
|
||||
internal static string N0005 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0005", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to In {0}.{1}, found reference to {2} - this is not transformable and will likely not work if invoked..
|
||||
/// </summary>
|
||||
internal static string N0006 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0006", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to If you want to compare assemblies, the earlier and later assembly options *must* be set..
|
||||
/// </summary>
|
||||
internal static string N0007 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0007", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new.
|
||||
/// </summary>
|
||||
internal static string N0008 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0008", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Type {0} inherits from the type {1} which is in a separate assembly which will also need conversion.
|
||||
/// </summary>
|
||||
internal static string N0009 {
|
||||
get {
|
||||
return ResourceManager.GetString("N0009", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,10 @@
|
|||
<data name="N0008" xml:space="preserve">
|
||||
<value>Unexpected error - Please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new</value>
|
||||
</data>
|
||||
|
||||
<data name="N0009" xml:space="preserve">
|
||||
<value>Type {0} inherits from the type {1} which is in a separate assembly which will also need conversion</value>
|
||||
</data>
|
||||
|
||||
<data name="E0001" xml:space="preserve">
|
||||
<value>Input file '{0}' doesn't exist.</value>
|
||||
|
|
|
@ -125,7 +125,7 @@ namespace Microsoft.MaciOS.Nnyeah {
|
|||
// These must be called last as they depend on Module and NativeIntegerAttributeTypeRef to be setup
|
||||
var intPtrCtor = modules.XamarinModule.Types.First (t => t.FullName == "Foundation.NSObject").Methods.First (m => m.FullName == "System.Void Foundation.NSObject::.ctor(System.IntPtr)");
|
||||
var intPtrCtorWithBool = modules.XamarinModule.Types.First (t => t.FullName == "Foundation.NSObject").Methods.First (m => m.FullName == "System.Void Foundation.NSObject::.ctor(System.IntPtr,System.Boolean)");
|
||||
ConstructorTransforms = new ConstructorTransforms (ModuleToEdit.ImportReference (NewNativeHandleTypeDefinition), intPtrCtor, intPtrCtorWithBool);
|
||||
ConstructorTransforms = new ConstructorTransforms (ModuleToEdit.ImportReference (NewNativeHandleTypeDefinition), intPtrCtor, intPtrCtorWithBool, WarningIssued, Transformed);
|
||||
ConstructorTransforms.AddTransforms (ModuleMap);
|
||||
|
||||
MethodSubs = LoadMethodSubs ();
|
||||
|
|
|
@ -38,7 +38,8 @@ namespace Microsoft.MaciOS.Nnyeah.Tests {
|
|||
return new ConstructorTransforms (
|
||||
netAssembly.GetType("ObjCRuntime.NativeHandle"),
|
||||
legacyNSObject.Methods.First (m => m.FullName == "System.Void Foundation.NSObject::.ctor(System.IntPtr)"),
|
||||
legacyNSObject.Methods.First (m => m.FullName == "System.Void Foundation.NSObject::.ctor(System.IntPtr,System.Boolean)")
|
||||
legacyNSObject.Methods.First (m => m.FullName == "System.Void Foundation.NSObject::.ctor(System.IntPtr,System.Boolean)"),
|
||||
warningIssued: null, transformed: null
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче