using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace System { /// Represents a variable-length argument list; that is, the parameters of a function that takes a variable number of arguments. /// 2 // Token: 0x0200005E RID: 94 [StructLayout(LayoutKind.Auto)] public struct ArgIterator { /// Initializes a new instance of the structure using the specified argument list. /// An argument list consisting of mandatory and optional arguments. // Token: 0x0600069E RID: 1694 RVA: 0x00014E78 File Offset: 0x00013078 public ArgIterator(RuntimeArgumentHandle arglist) { this.sig = IntPtr.Zero; this.args = IntPtr.Zero; this.next_arg = (this.num_args = 0); this.Setup(arglist.args, IntPtr.Zero); } /// Initializes a new instance of the structure using the specified argument list and a pointer to an item in the list. /// An argument list consisting of mandatory and optional arguments. /// A pointer to the argument in to access first, or the first mandatory argument in if is null. // Token: 0x0600069F RID: 1695 RVA: 0x00014EC0 File Offset: 0x000130C0 [CLSCompliant(false)] public unsafe ArgIterator(RuntimeArgumentHandle arglist, void* ptr) { this.sig = IntPtr.Zero; this.args = IntPtr.Zero; this.next_arg = (this.num_args = 0); this.Setup(arglist.args, (IntPtr)ptr); } // Token: 0x060006A0 RID: 1696 [MethodImpl(MethodImplOptions.InternalCall)] private extern void Setup(IntPtr argsp, IntPtr start); /// Concludes processing of the variable-length argument list represented by this instance. /// 2 // Token: 0x060006A1 RID: 1697 RVA: 0x00014F08 File Offset: 0x00013108 public void End() { this.next_arg = this.num_args; } /// This method is not supported, and always throws . /// This comparison is not supported. No value is returned. /// An object to be compared to this instance. /// This method is not supported. /// 2 // Token: 0x060006A2 RID: 1698 RVA: 0x00014F18 File Offset: 0x00013118 public override bool Equals(object o) { throw new NotSupportedException(Locale.GetText("ArgIterator does not support Equals.")); } /// Returns the hash code of this object. /// A 32-bit signed integer hash code. /// 2 // Token: 0x060006A3 RID: 1699 RVA: 0x00014F2C File Offset: 0x0001312C public override int GetHashCode() { return this.sig.GetHashCode(); } /// Returns the next argument in a variable-length argument list. /// The next argument as a object. /// An attempt was made to read beyond the end of the list. /// 2 // Token: 0x060006A4 RID: 1700 RVA: 0x00014F3C File Offset: 0x0001313C [CLSCompliant(false)] public TypedReference GetNextArg() { if (this.num_args == this.next_arg) { throw new InvalidOperationException(Locale.GetText("Invalid iterator position.")); } return this.IntGetNextArg(); } // Token: 0x060006A5 RID: 1701 [MethodImpl(MethodImplOptions.InternalCall)] private extern TypedReference IntGetNextArg(); /// Returns the next argument in a variable-length argument list that has a specified type. /// The next argument as a object. /// A runtime type handle that identifies the type of the argument to retrieve. /// An attempt was made to read beyond the end of the list. /// The ArgPtr is zero. /// 2 // Token: 0x060006A6 RID: 1702 RVA: 0x00014F68 File Offset: 0x00013168 [CLSCompliant(false)] public TypedReference GetNextArg(RuntimeTypeHandle rth) { if (this.num_args == this.next_arg) { throw new InvalidOperationException(Locale.GetText("Invalid iterator position.")); } return this.IntGetNextArg(rth.Value); } // Token: 0x060006A7 RID: 1703 [MethodImpl(MethodImplOptions.InternalCall)] private extern TypedReference IntGetNextArg(IntPtr rth); /// Returns the type of the next argument. /// The type of the next argument. /// 2 // Token: 0x060006A8 RID: 1704 RVA: 0x00014FA4 File Offset: 0x000131A4 public RuntimeTypeHandle GetNextArgType() { if (this.num_args == this.next_arg) { throw new InvalidOperationException(Locale.GetText("Invalid iterator position.")); } return new RuntimeTypeHandle(this.IntGetNextArgType()); } // Token: 0x060006A9 RID: 1705 [MethodImpl(MethodImplOptions.InternalCall)] private extern IntPtr IntGetNextArgType(); /// Returns the number of arguments remaining in the argument list. /// The number of remaining arguments. /// 2 // Token: 0x060006AA RID: 1706 RVA: 0x00014FE0 File Offset: 0x000131E0 public int GetRemainingCount() { return this.num_args - this.next_arg; } // Token: 0x040000B7 RID: 183 private IntPtr sig; // Token: 0x040000B8 RID: 184 private IntPtr args; // Token: 0x040000B9 RID: 185 private int next_arg; // Token: 0x040000BA RID: 186 private int num_args; } }