Files
2026-06-04 11:42:34 +02:00

178 lines
7.7 KiB
C#

using System;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit
{
/// <summary>Represents a local variable within a method or constructor.</summary>
// Token: 0x02000202 RID: 514
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ComDefaultInterface(typeof(_LocalBuilder))]
public sealed class LocalBuilder : LocalVariableInfo, _LocalBuilder
{
// Token: 0x06001AE9 RID: 6889 RVA: 0x00065650 File Offset: 0x00063850
internal LocalBuilder(Type t, ILGenerator ilgen)
{
this.type = t;
this.ilgen = ilgen;
}
/// <summary>Maps a set of names to a corresponding set of dispatch identifiers.</summary>
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
/// <param name="rgszNames">Passed-in array of names to be mapped.</param>
/// <param name="cNames">Count of the names to be mapped.</param>
/// <param name="lcid">The locale context in which to interpret the names.</param>
/// <param name="rgDispId">Caller-allocated array which receives the IDs corresponding to the names.</param>
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
// Token: 0x06001AEA RID: 6890 RVA: 0x00065668 File Offset: 0x00063868
void _LocalBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
{
throw new NotImplementedException();
}
/// <summary>Retrieves the type information for an object, which can then be used to get the type information for an interface.</summary>
/// <param name="iTInfo">The type information to return.</param>
/// <param name="lcid">The locale identifier for the type information.</param>
/// <param name="ppTInfo">Receives a pointer to the requested type information object.</param>
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
// Token: 0x06001AEB RID: 6891 RVA: 0x00065670 File Offset: 0x00063870
void _LocalBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
{
throw new NotImplementedException();
}
/// <summary>Retrieves the number of type information interfaces that an object provides (either 0 or 1).</summary>
/// <param name="pcTInfo">Points to a location that receives the number of type information interfaces provided by the object.</param>
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
// Token: 0x06001AEC RID: 6892 RVA: 0x00065678 File Offset: 0x00063878
void _LocalBuilder.GetTypeInfoCount(out uint pcTInfo)
{
throw new NotImplementedException();
}
/// <summary>Provides access to properties and methods exposed by an object.</summary>
/// <param name="dispIdMember">Identifies the member.</param>
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
/// <param name="lcid">The locale context in which to interpret arguments.</param>
/// <param name="wFlags">Flags describing the context of the call.</param>
/// <param name="pDispParams">Pointer to a structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.</param>
/// <param name="pVarResult">Pointer to the location where the result is to be stored.</param>
/// <param name="pExcepInfo">Pointer to a structure that contains exception information.</param>
/// <param name="puArgErr">The index of the first argument that has an error.</param>
/// <exception cref="T:System.NotImplementedException">Late-bound access using the COM IDispatch interface is not supported.</exception>
// Token: 0x06001AED RID: 6893 RVA: 0x00065680 File Offset: 0x00063880
void _LocalBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
{
throw new NotImplementedException();
}
/// <summary>Sets the name and lexical scope of this local variable.</summary>
/// <param name="name">The name of the local variable. </param>
/// <param name="startOffset">The beginning offset of the lexical scope of the local variable. </param>
/// <param name="endOffset">The ending offset of the lexical scope of the local variable. </param>
/// <exception cref="T:System.InvalidOperationException">The containing type has been created with <see cref="M:System.Reflection.Emit.TypeBuilder.CreateType" />.-or- There is no symbolic writer defined for the containing module. </exception>
/// <exception cref="T:System.NotSupportedException">This local is defined in a dynamic method, rather than in a method of a dynamic type.</exception>
// Token: 0x06001AEE RID: 6894 RVA: 0x00065688 File Offset: 0x00063888
public void SetLocalSymInfo(string name, int startOffset, int endOffset)
{
this.name = name;
this.startOffset = startOffset;
this.endOffset = endOffset;
}
/// <summary>Sets the name of this local variable.</summary>
/// <param name="name">The name of the local variable. </param>
/// <exception cref="T:System.InvalidOperationException">The containing type has been created with <see cref="M:System.Reflection.Emit.TypeBuilder.CreateType" />.-or- There is no symbolic writer defined for the containing module. </exception>
/// <exception cref="T:System.NotSupportedException">This local is defined in a dynamic method, rather than in a method of a dynamic type.</exception>
// Token: 0x06001AEF RID: 6895 RVA: 0x000656A0 File Offset: 0x000638A0
public void SetLocalSymInfo(string name)
{
this.SetLocalSymInfo(name, 0, 0);
}
/// <summary>Gets the type of the local variable.</summary>
/// <returns>The <see cref="T:System.Type" /> of the local variable.</returns>
// Token: 0x170004C3 RID: 1219
// (get) Token: 0x06001AF0 RID: 6896 RVA: 0x000656AC File Offset: 0x000638AC
public override Type LocalType
{
get
{
return this.type;
}
}
/// <summary>Gets a value indicating whether the object referred to by the local variable is pinned in memory.</summary>
/// <returns>true if the object referred to by the local variable is pinned in memory; otherwise, false.</returns>
// Token: 0x170004C4 RID: 1220
// (get) Token: 0x06001AF1 RID: 6897 RVA: 0x000656B4 File Offset: 0x000638B4
public override bool IsPinned
{
get
{
return this.is_pinned;
}
}
/// <summary>Gets the zero-based index of the local variable within the method body.</summary>
/// <returns>An integer value that represents the order of declaration of the local variable within the method body.</returns>
// Token: 0x170004C5 RID: 1221
// (get) Token: 0x06001AF2 RID: 6898 RVA: 0x000656BC File Offset: 0x000638BC
public override int LocalIndex
{
get
{
return (int)this.position;
}
}
// Token: 0x06001AF3 RID: 6899 RVA: 0x000656C4 File Offset: 0x000638C4
internal static int Mono_GetLocalIndex(LocalBuilder builder)
{
return (int)builder.position;
}
// Token: 0x170004C6 RID: 1222
// (get) Token: 0x06001AF4 RID: 6900 RVA: 0x000656CC File Offset: 0x000638CC
internal string Name
{
get
{
return this.name;
}
}
// Token: 0x170004C7 RID: 1223
// (get) Token: 0x06001AF5 RID: 6901 RVA: 0x000656D4 File Offset: 0x000638D4
internal int StartOffset
{
get
{
return this.startOffset;
}
}
// Token: 0x170004C8 RID: 1224
// (get) Token: 0x06001AF6 RID: 6902 RVA: 0x000656DC File Offset: 0x000638DC
internal int EndOffset
{
get
{
return this.endOffset;
}
}
// Token: 0x0400080A RID: 2058
private string name;
// Token: 0x0400080B RID: 2059
internal ILGenerator ilgen;
// Token: 0x0400080C RID: 2060
private int startOffset;
// Token: 0x0400080D RID: 2061
private int endOffset;
}
}