Пример #1
0
 /// <summary>Moves all ExceptionBlocks from a different code instruction to the current one</summary>
 /// <param name="code">The <see cref="CodeInstruction"/> to move the ExceptionBlocks from</param>
 /// <param name="other">The <see cref="CodeInstruction"/> to move the ExceptionBlocks to</param>
 /// <returns>The code instruction that received the blocks</returns>
 public static CodeInstruction MoveBlocksFrom(this CodeInstruction code, CodeInstruction other)
 {
     return(code.WithBlocks(other.ExtractBlocks()));
 }
Пример #2
0
 /// <summary>Moves all ExceptionBlocks from the code instruction to a different one</summary>
 /// <param name="code">The <see cref="CodeInstruction"/> to move the ExceptionBlocks from</param>
 /// <param name="other">The <see cref="CodeInstruction"/> to move the ExceptionBlocks to</param>
 /// <returns>The code instruction blocks were moved from (now empty)</returns>
 public static CodeInstruction MoveBlocksTo(this CodeInstruction code, CodeInstruction other)
 {
     other.WithBlocks(code.ExtractBlocks());
     return(code);
 }