Exemple #1
0
        /// <summary>
        /// Creates a new local variable instance.
        /// </summary>
        /// <param name="local"> The underlying local variable. </param>
        /// <param name="name"> The name of the local variable.  Can be <c>null</c>. </param>
        public ReflectionEmitILLocalVariable(System.Reflection.Emit.LocalBuilder local, string name)
        {
            if (local == null)
            {
                throw new ArgumentNullException(nameof(local));
            }
            this.UnderlyingLocal = local;
            this.name            = name;
#if ENABLE_DEBUGGING
            if (name != null)
            {
                local.SetLocalSymInfo(name);
            }
#endif
        }