Advertisement
EddyCZ

-----

Jan 28th, 2019
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.85 KB | None | 0 0
  1. private void method_6(Instruction instruction_0)
  2.   {
  3.    OpCode opcode = instruction_0.OpCode;
  4.    OperandType operandType = opcode.OperandType;
  5.    if (operandType == OperandType.InlineNone)
  6.    {
  7.     return;
  8.    }
  9.    object operand = instruction_0.OpCode;
  10.    if (operand == null)
  11.    {
  12.     throw new ArgumentException();
  13.    }
  14.    switch (operandType)
  15.    {
  16.     case OperandType.InlineBrTarget:
  17.      {
  18.       Instruction instruction_ = (Instruction)operand;
  19.       this.binaryWriter_0.smethod_5(this.method_7(instruction_) - (instruction_0.Offset + opcode.Size + 4));
  20.       return;
  21.      }
  22.     case OperandType.InlineField:
  23.     case OperandType.InlineMethod:
  24.     case OperandType.InlineTok:
  25.     case OperandType.InlineType:
  26.      this.method_10(this.metadataBuilder_0.LookupToken((IMetadataTokenProvider)operand));
  27.      return;
  28.     case OperandType.InlineI:
  29.      this.binaryWriter_0.smethod_5((int)operand);
  30.      return;
  31.     case OperandType.InlineI8:
  32.      this.binaryWriter_0.smethod_6((long)operand);
  33.      return;
  34.     case OperandType.InlineR:
  35.      this.binaryWriter_0.smethod_3((double)operand);
  36.      return;
  37.     case OperandType.InlineSig:
  38.      throw new NotSupportedException();
  39.     case OperandType.InlineString:
  40.      this.method_10(new MetadataToken(TokenType.String, this.method_8((string)operand)));
  41.      return;
  42.     case OperandType.InlineSwitch:
  43.      {
  44.       Instruction[] array = (Instruction[])operand;
  45.       this.binaryWriter_0.smethod_5(array.Length);
  46.       int num = instruction_0.Offset + opcode.Size + 4 * (array.Length + 1);
  47.       for (int i = 0; i < array.Length; i++)
  48.       {
  49.        this.binaryWriter_0.smethod_5(this.method_7(array[i]) - num);
  50.       }
  51.       return;
  52.      }
  53.     case OperandType.InlineVar:
  54.      this.binaryWriter_0.smethod_4((short)Class8.smethod_0((VariableDefinition)operand));
  55.      return;
  56.     case OperandType.InlineArg:
  57.      this.binaryWriter_0.smethod_4((short)this.method_9((ParameterDefinition)operand));
  58.      return;
  59.     case OperandType.ShortInlineBrTarget:
  60.      {
  61.       Instruction instruction_2 = (Instruction)operand;
  62.       this.binaryWriter_0.smethod_7((sbyte)(this.method_7(instruction_2) - (instruction_0.Offset + opcode.Size + 1)));
  63.       return;
  64.      }
  65.     case OperandType.ShortInlineI:
  66.      if (opcode == OpCodes.Ldc_I4_S)
  67.      {
  68.       this.binaryWriter_0.smethod_7((sbyte)operand);
  69.       return;
  70.      }
  71.      this.binaryWriter_0.smethod_0((byte)operand);
  72.      return;
  73.     case OperandType.ShortInlineR:
  74.      this.binaryWriter_0.smethod_8((float)operand);
  75.      return;
  76.     case OperandType.ShortInlineVar:
  77.      this.binaryWriter_0.smethod_0((byte)Class8.smethod_0((VariableDefinition)operand));
  78.      return;
  79.     case OperandType.ShortInlineArg:
  80.      this.binaryWriter_0.smethod_0((byte)this.method_9((ParameterDefinition)operand));
  81.      return;
  82.    }
  83.    throw new ArgumentException();
  84.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement