PERWAPI.SigInstr.GetDeltaDistance C# (CSharp) Метод

GetDeltaDistance() приватный Метод

Get the delta distance for this instruction.
The delta distance is the resulting difference of items left on the stack after calling this instruction.
private GetDeltaDistance ( ) : int
Результат int
        internal override int GetDeltaDistance()
        {
            // Add the parameter count to the depth
            int depth = (int)signature.NumPars * -1;

            // Check to see if this is an instance method
            if (signature.HasCallConv(CallConv.Instance)) depth--;

            // Check to see if this method uses the optional parameters
            if (signature.HasCallConv(CallConv.Vararg)) depth += (int)signature.NumOptPars * -1;

            // Check if a return value will be placed on the stack.
            if (signature.ReturnType.SameType(PrimitiveType.Void)) depth++;

            return depth;
        }