Esempio n. 1
0
 public override MetaObject BindCreateInstance(CreateInstanceBinder binder, MetaObject[] args) {
     return new MetaObject(
         Expression.Call(
             AstUtils.Convert(Expression, typeof(ComTypeClassDesc)),
             typeof(ComTypeClassDesc).GetMethod("CreateInstance")
         ),
         Restrictions.Combine(args).Merge(
             Restrictions.GetTypeRestriction(Expression, typeof(ComTypeClassDesc))
         )
     );
 }
Esempio n. 2
0
 public virtual MetaObject BindCreateInstance(CreateInstanceBinder binder, MetaObject[] args)
 {
     ContractUtils.RequiresNotNull(binder, "binder");
     return(binder.FallbackCreateInstance(this, args));
 }
        public override bool Equals(object obj)
        {
            CreateInstanceBinder ca = obj as CreateInstanceBinder;

            return(ca != null && ca._arguments.ListEquals(_arguments));
        }
Esempio n. 4
0
 public virtual bool TryCreateInstance(CreateInstanceBinder binder, object[] args, out object result) {
     throw new NotSupportedException();
 }
Esempio n. 5
0
            public override MetaObject BindCreateInstance(CreateInstanceBinder binder, MetaObject[] args) {
                if (IsOverridden("TryCreateInstance")) {
                    return CallMethodWithResult("TryCreateInstance", binder, GetArgArray(args), (e) => binder.FallbackCreateInstance(this, args, e));
                }

                return base.BindCreateInstance(binder, args);
            }
Esempio n. 6
0
 public virtual MetaObject BindCreateInstance(CreateInstanceBinder binder, MetaObject[] args) {
     ContractUtils.RequiresNotNull(binder, "binder");
     return binder.FallbackCreateInstance(this, args);
 }