ToLocal() public method

Create a StorageDescriptor for an item located in a local variable.
public ToLocal ( LocalBuilder loc ) : StorageDescriptor
loc System.Reflection.Emit.LocalBuilder
return StorageDescriptor
コード例 #1
0
 /// <summary>
 /// Ensure that current item is saved to the specified local variable.
 /// </summary>
 public void EnsureLocal(LocalBuilder bldr)
 {
     if (_storage.LocalLocation != bldr)
     {
         // Push value onto stack and then save to bldr
         EnsureStack();
         _helper.Emit(OpCodes.Stloc, bldr);
         _storage = _storage.ToLocal(bldr);
     }
 }