Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -37,7 +37,11 @@ using System.Runtime.InteropServices;
namespace System
{
[StructLayout (LayoutKind.Auto)]
public struct ArgIterator
public
#if NETCORE
ref
#endif
struct ArgIterator
{
#pragma warning disable 169, 414
IntPtr sig;
@ -73,7 +77,7 @@ namespace System
public override bool Equals (object o)
{
throw new NotSupportedException (Locale.GetText ("ArgIterator does not support Equals."));
throw new NotSupportedException ("ArgIterator does not support Equals.");
}
public override int GetHashCode ()
@ -85,28 +89,36 @@ namespace System
public TypedReference GetNextArg ()
{
if (num_args == next_arg)
throw new InvalidOperationException (Locale.GetText ("Invalid iterator position."));
return IntGetNextArg ();
throw new InvalidOperationException ("Invalid iterator position.");
TypedReference result = new TypedReference ();
unsafe {
IntGetNextArg (&result);
}
return result;
}
[MethodImpl (MethodImplOptions.InternalCall)]
extern TypedReference IntGetNextArg ();
extern unsafe void IntGetNextArg (void *res);
[CLSCompliant (false)]
public TypedReference GetNextArg (RuntimeTypeHandle rth)
{
if (num_args == next_arg)
throw new InvalidOperationException (Locale.GetText ("Invalid iterator position."));
return IntGetNextArg (rth.Value);
throw new InvalidOperationException ("Invalid iterator position.");
TypedReference result = new TypedReference ();
unsafe {
IntGetNextArgWithType (&result, rth.Value);
}
return result;
}
[MethodImpl (MethodImplOptions.InternalCall)]
extern TypedReference IntGetNextArg (IntPtr rth);
extern unsafe void IntGetNextArgWithType (void *res, IntPtr rth);
public RuntimeTypeHandle GetNextArgType ()
{
if (num_args == next_arg)
throw new InvalidOperationException (Locale.GetText ("Invalid iterator position."));
throw new InvalidOperationException ("Invalid iterator position.");
return new RuntimeTypeHandle (IntGetNextArgType ());
}