11 private int m_localIndex;
13 private Type m_localType;
17 private bool m_isPinned;
37 : this(localIndex, localType, methodBuilder, isPinned: false)
41 internal LocalBuilder(
int localIndex,
Type localType,
MethodInfo methodBuilder,
bool isPinned)
43 m_isPinned = isPinned;
44 m_localIndex = localIndex;
45 m_localType = localType;
46 m_methodBuilder = methodBuilder;
49 internal int GetLocalIndex()
54 internal MethodInfo GetMethodBuilder()
56 return m_methodBuilder;
77 if (methodBuilder ==
null)
82 if (methodBuilder.IsTypeCreated())
93 byte[] sourceArray = fieldSigHelper.InternalGetSignature(out length);
94 byte[] array =
new byte[length - 1];
95 Array.
Copy(sourceArray, 1, array, 0, length - 1);
96 int currentActiveScopeIndex = methodBuilder.
GetILGenerator().m_ScopeTree.GetCurrentActiveScopeIndex();
97 if (currentActiveScopeIndex == -1)
99 methodBuilder.m_localSymInfo.AddLocalSymInfo(name, array, m_localIndex, startOffset, endOffset);
103 methodBuilder.
GetILGenerator().m_ScopeTree.AddLocalSymInfoToCurrentScope(name, array, m_localIndex, startOffset, endOffset);
147 void _LocalBuilder.
Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid,
short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
149 throw new NotImplementedException();
override bool IsPinned
Gets a value indicating whether the object referred to by the local variable is pinned in memory.
void AddArgument(Type clsArgument)
Adds an argument to the signature.
static SignatureHelper GetFieldSigHelper(Module mod)
Returns a signature helper for a field.
override int LocalIndex
Gets the zero-based index of the local variable within the method body.
Discovers the attributes of a method and provides access to method metadata.
void SetLocalSymInfo(string name)
Sets the name of this local variable.
Provides methods for building signatures.
void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId)
Maps a set of names to a corresponding set of dispatch identifiers.
override Module Module
Gets the module in which the current method is being defined.
Exposes the T:System.Reflection.Emit.LocalBuilder class to unmanaged code.
Provides information about, and means to manipulate, the current environment and platform....
Represents a globally unique identifier (GUID).To browse the .NET Framework source code for this type...
void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo)
Retrieves the type information for an object, which can be used to get the type information for an in...
Defines and represents a module in a dynamic assembly.
ILGenerator GetILGenerator()
Returns an ILGenerator for this method with a default Microsoft intermediate language (MSIL) stream s...
A platform-specific type that is used to represent a pointer or a handle.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents type declarations: class types, interface types, array types, value types,...
Represents a local variable within a method or constructor.
void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
Provides access to properties and methods exposed by an object.
Defines and represents a method (or constructor) on a dynamic class.
static void Copy(Array sourceArray, Array destinationArray, int length)
Copies a range of elements from an T:System.Array starting at the first element and pastes them into ...
ISymbolWriter GetSymWriter()
Returns the symbol writer associated with this dynamic module.
Discovers the attributes of a local variable and provides access to local variable metadata.
void SetLocalSymInfo(string name, int startOffset, int endOffset)
Sets the name and lexical scope of this local variable.
The exception that is thrown when a method call is invalid for the object's current state.
ClassInterfaceType
Identifies the type of class interface that is generated for a class.
The exception that is thrown when an invoked method is not supported, or when there is an attempt to ...
The exception that is thrown when a requested method or operation is not implemented.
override Type LocalType
Gets the type of the local variable.
void GetTypeInfoCount(out uint pcTInfo)
Retrieves the number of type information interfaces that an object provides (either 0 or 1).