public override MetaObject BindGetMember(GetMemberBinder binder) {
            ContractUtils.RequiresNotNull(binder, "binder");
            string name = binder.Name;

            if (name == _info.Name) {
                name = "TypeLibDesc";
            } else if (name != "Guid" &&
                name != "Name" &&
                name != "VersionMajor" &&
                name != "VersionMinor") {

                return binder.FallbackGetMember(this);
            }

            return new MetaObject(
                Expression.Property(
                    AstUtils.Convert(Expression, typeof(ComTypeLibInfo)),
                    typeof(ComTypeLibInfo).GetProperty(name)
                ),
                ComTypeLibInfoRestrictions(this)
            );
        }
 public override MetaObject BindGetMember(GetMemberBinder binder) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetMember(UnwrapSelf());
 }
Exemple #3
0
            public override MetaObject BindGetMember(GetMemberBinder binder)
            {
                if (IsOverridden("TryGetMember"))
                {
                    return(CallMethodWithResult("TryGetMember", binder, NoArgs, (e) => binder.FallbackGetMember(this, e)));
                }

                return(base.BindGetMember(binder));
            }
 public override MetaObject/*!*/ BindGetMember(GetMemberBinder/*!*/ binder) {
     var self = (RubyClass)Value;
     return RubyGetMemberBinder.TryBind(self.Context, binder, this) ?? binder.FallbackGetMember(this);
 }
Exemple #5
0
 public virtual MetaObject BindGetMember(GetMemberBinder binder)
 {
     ContractUtils.RequiresNotNull(binder, "binder");
     return(binder.FallbackGetMember(this));
 }
Exemple #6
0
            public override MetaObject BindGetMember(GetMemberBinder binder) {
                if (IsOverridden("TryGetMember")) {
                    return CallMethodWithResult("TryGetMember", binder, NoArgs, (e) => binder.FallbackGetMember(this, e));
                }

                return base.BindGetMember(binder);
            }
Exemple #7
0
 public virtual MetaObject BindGetMember(GetMemberBinder binder) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackGetMember(this);
 }