| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // System.Reflection.Emit/LocalBuilder.cs
- //
- // Authors:
- // Paolo Molaro ([email protected])
- // Martin Baulig ([email protected])
- // Miguel de Icaza ([email protected])
- //
- // (C) 2001, 2002 Ximian, Inc. http://www.ximian.com
- //
- using System;
- using System.Reflection;
- using System.Reflection.Emit;
- using System.Globalization;
- using System.Runtime.CompilerServices;
- using System.Diagnostics.SymbolStore;
- namespace System.Reflection.Emit {
- public sealed class LocalBuilder {
- //
- // These are kept in sync with reflection.h
- //
- #region Sync with reflection.h
- private Type type;
- private string name;
- #endregion
-
- //
- // Order does not matter after here
- //
- private ModuleBuilder module;
- internal uint position;
- internal LocalBuilder (ModuleBuilder m, Type t)
- {
- this.module = m;
- this.type = t;
- }
- public void SetLocalSymInfo (string lname, int startOffset, int endOffset)
- {
- this.name = lname;
- module.SymWriter_DefineLocalVariable (lname, this, FieldAttributes.Private,
- (int) position, startOffset, endOffset);
- }
- public void SetLocalSymInfo (string lname)
- {
- SetLocalSymInfo (lname, 0, 0);
- }
- public Type LocalType
- {
- get {
- return type;
- }
- }
- }
- }
|