protected virtual ComUnwrappedMetaObject UnwrapSelf() { return new ComUnwrappedMetaObject( ComObject.RcwFromComObject(Expression), Restrictions.Merge(ComBinderHelpers.GetTypeRestrictionForDynamicMetaObject(this)), ((ComObject)Value).RuntimeCallableWrapper ); }
protected override ComUnwrappedMetaObject UnwrapSelf() { return(new ComUnwrappedMetaObject( ComObject.RcwFromComObject(Expression), IDispatchRestriction(), _self.RuntimeCallableWrapper )); }
private DynamicMetaObject BindEvent(ComEventDesc @event) { // BoundDispEvent CreateComEvent(object rcw, Guid sourceIid, int dispid) Expression result = Expression.Call( typeof(ComRuntimeHelpers).GetMethod("CreateComEvent"), ComObject.RcwFromComObject(Expression), Expression.Constant(@event.sourceIID), Expression.Constant(@event.dispid) ); return(new DynamicMetaObject( result, IDispatchRestriction() )); }