Exemple #1
0
        public override int MaxBytes => 4; // Long branch

        internal override void CopyTo(MsilOperand operand)
        {
            var lt = operand as MsilOperandBrTarget;

            if (lt == null)
            {
                throw new ArgumentException($"Target {operand?.GetType().Name} must be of same type {GetType().Name}", nameof(operand));
            }
            lt.Target = Target;
        }
Exemple #2
0
        internal override void CopyTo(MsilOperand operand)
        {
            var lt = operand as MsilOperandSwitch;

            if (lt == null)
            {
                throw new ArgumentException($"Target {operand?.GetType().Name} must be of same type {GetType().Name}", nameof(operand));
            }
            if (Labels == null)
            {
                lt.Labels = null;
            }
            else
            {
                lt.Labels = new MsilLabel[Labels.Length];
                Array.Copy(Labels, lt.Labels, Labels.Length);
            }
        }
Exemple #3
0
 internal abstract void CopyTo(MsilOperand operand);