Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void method_6(Instruction instruction_0)
- {
- OpCode opcode = instruction_0.OpCode;
- OperandType operandType = opcode.OperandType;
- if (operandType == OperandType.InlineNone)
- {
- return;
- }
- object operand = instruction_0.OpCode;
- if (operand == null)
- {
- throw new ArgumentException();
- }
- switch (operandType)
- {
- case OperandType.InlineBrTarget:
- {
- Instruction instruction_ = (Instruction)operand;
- this.binaryWriter_0.smethod_5(this.method_7(instruction_) - (instruction_0.Offset + opcode.Size + 4));
- return;
- }
- case OperandType.InlineField:
- case OperandType.InlineMethod:
- case OperandType.InlineTok:
- case OperandType.InlineType:
- this.method_10(this.metadataBuilder_0.LookupToken((IMetadataTokenProvider)operand));
- return;
- case OperandType.InlineI:
- this.binaryWriter_0.smethod_5((int)operand);
- return;
- case OperandType.InlineI8:
- this.binaryWriter_0.smethod_6((long)operand);
- return;
- case OperandType.InlineR:
- this.binaryWriter_0.smethod_3((double)operand);
- return;
- case OperandType.InlineSig:
- throw new NotSupportedException();
- case OperandType.InlineString:
- this.method_10(new MetadataToken(TokenType.String, this.method_8((string)operand)));
- return;
- case OperandType.InlineSwitch:
- {
- Instruction[] array = (Instruction[])operand;
- this.binaryWriter_0.smethod_5(array.Length);
- int num = instruction_0.Offset + opcode.Size + 4 * (array.Length + 1);
- for (int i = 0; i < array.Length; i++)
- {
- this.binaryWriter_0.smethod_5(this.method_7(array[i]) - num);
- }
- return;
- }
- case OperandType.InlineVar:
- this.binaryWriter_0.smethod_4((short)Class8.smethod_0((VariableDefinition)operand));
- return;
- case OperandType.InlineArg:
- this.binaryWriter_0.smethod_4((short)this.method_9((ParameterDefinition)operand));
- return;
- case OperandType.ShortInlineBrTarget:
- {
- Instruction instruction_2 = (Instruction)operand;
- this.binaryWriter_0.smethod_7((sbyte)(this.method_7(instruction_2) - (instruction_0.Offset + opcode.Size + 1)));
- return;
- }
- case OperandType.ShortInlineI:
- if (opcode == OpCodes.Ldc_I4_S)
- {
- this.binaryWriter_0.smethod_7((sbyte)operand);
- return;
- }
- this.binaryWriter_0.smethod_0((byte)operand);
- return;
- case OperandType.ShortInlineR:
- this.binaryWriter_0.smethod_8((float)operand);
- return;
- case OperandType.ShortInlineVar:
- this.binaryWriter_0.smethod_0((byte)Class8.smethod_0((VariableDefinition)operand));
- return;
- case OperandType.ShortInlineArg:
- this.binaryWriter_0.smethod_0((byte)this.method_9((ParameterDefinition)operand));
- return;
- }
- throw new ArgumentException();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement