AjScript.Expressions.InstanceOfExpression.Apply C# (CSharp) Метод

Apply() публичный Метод

public Apply ( object leftValue, object rightValue ) : object
leftValue object
rightValue object
Результат object
        public override object Apply(object leftValue, object rightValue)
        {
            if (!(rightValue is DynamicObject))
                return false;

            var proto = ((DynamicObject)rightValue).GetValue("prototype");

            if (!(leftValue is DynamicObject))
                return false;

            for (object lproto = ((DynamicObject)leftValue).Function.GetValue("prototype"); lproto != null && !(lproto is Undefined); lproto = ((DynamicObject)lproto).GetValue("prototype"))
                if (proto == lproto)
                    return true;

            return false;
        }
InstanceOfExpression