Esempio n. 1
0
 public static bool TryBindGetIndex(GetIndexBinder binder, ref MetaObject instance, MetaObject[] args) {
     if (TryGetMetaObject(ref instance)) {
         instance = instance.BindGetIndex(binder, args);
         return true;
     }
     return false;
 }
 public override MetaObject BindGetIndex(GetIndexBinder binder, MetaObject[] indexes) {
     if (_callable.ComMethodDesc.IsPropertyGet) {
         if (indexes.Any(arg => ComBinderHelpers.IsStrongBoxArg(arg))) {
             return ComBinderHelpers.RewriteStrongBoxAsRef(binder, this, indexes);
         }
         return BindComInvoke(binder.Arguments, indexes);
     }
     return base.BindGetIndex(binder, indexes);
 }
 public override MetaObject BindGetIndex(GetIndexBinder binder, MetaObject[] indexes) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetIndex(UnwrapSelf(), indexes);
 }
Esempio n. 4
0
            public override MetaObject BindGetIndex(GetIndexBinder binder, MetaObject[] indexes) {
                if (IsOverridden("TryGetIndex")) {
                    return CallMethodWithResult("TryGetIndex", binder, GetArgArray(indexes), (e) => binder.FallbackGetIndex(this, indexes, e));
                }

                return base.BindGetIndex(binder, indexes);
            }
Esempio n. 5
0
 public virtual bool TryGetIndex(GetIndexBinder binder, object[] args, out object result) {
     throw new NotSupportedException();
 }
Esempio n. 6
0
 public virtual MetaObject BindGetIndex(GetIndexBinder binder, MetaObject[] indexes) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetIndex(this, indexes);
 }