public Int32 WillExecute(string source, NetOffice.ADODBApi.Enums.CursorTypeEnum cursorType, NetOffice.ADODBApi.Enums.LockTypeEnum lockType, Int32 options, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Command_Deprecated pCommand, NetOffice.ADODBApi._Recordset_Deprecated pRecordset, NetOffice.ADODBApi._Connection_Deprecated pConnection)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "WillExecute", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
Пример #2
0
        public void WillExecute([In][Out] ref object source, [In] object cursorType, [In] object lockType, [In][Out] ref object options, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pCommand, [In, MarshalAs(UnmanagedType.IDispatch)] object pRecordset, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("WillExecute");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.CursorTypeEnum  newCursorType = (NetOffice.ADODBApi.Enums.CursorTypeEnum)cursorType;
            NetOffice.ADODBApi.Enums.LockTypeEnum    newLockType   = (NetOffice.ADODBApi.Enums.LockTypeEnum)lockType;
            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus   = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Command    newpCommand             = Factory.CreateObjectFromComProxy(_eventClass, pCommand) as NetOffice.ADODBApi._Command;
            NetOffice.ADODBApi._Recordset  newpRecordset           = Factory.CreateObjectFromComProxy(_eventClass, pRecordset) as NetOffice.ADODBApi._Recordset;
            NetOffice.ADODBApi._Connection newpConnection          = Factory.CreateObjectFromComProxy(_eventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[8];
            paramsArray.SetValue(source, 0);
            paramsArray[1] = newCursorType;
            paramsArray[2] = newLockType;
            paramsArray.SetValue(options, 3);
            paramsArray[4] = newadStatus;
            paramsArray[5] = newpCommand;
            paramsArray[6] = newpRecordset;
            paramsArray[7] = newpConnection;
            _eventBinding.RaiseCustomEvent("WillExecute", ref paramsArray);

            source  = (string)paramsArray[0];
            options = (Int32)paramsArray[3];
        }
Пример #3
0
        public void WillExecute([In][Out] ref object source, [In] object cursorType, [In] object lockType, [In][Out] ref object options, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pCommand, [In, MarshalAs(UnmanagedType.IDispatch)] object pRecordset, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("WillExecute"))
            {
                Invoker.ReleaseParamsArray(source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.CursorTypeEnum  newCursorType = (NetOffice.ADODBApi.Enums.CursorTypeEnum)cursorType;
            NetOffice.ADODBApi.Enums.LockTypeEnum    newLockType   = (NetOffice.ADODBApi.Enums.LockTypeEnum)lockType;
            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus   = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Command    newpCommand             = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pCommand) as NetOffice.ADODBApi._Command;
            NetOffice.ADODBApi._Recordset  newpRecordset           = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pRecordset) as NetOffice.ADODBApi._Recordset;
            NetOffice.ADODBApi._Connection newpConnection          = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[8];
            paramsArray.SetValue(source, 0);
            paramsArray[1] = newCursorType;
            paramsArray[2] = newLockType;
            paramsArray.SetValue(options, 3);
            paramsArray[4] = newadStatus;
            paramsArray[5] = newpCommand;
            paramsArray[6] = newpRecordset;
            paramsArray[7] = newpConnection;
            EventBinding.RaiseCustomEvent("WillExecute", ref paramsArray);

            source  = ToString(paramsArray[0]);
            options = ToInt32(paramsArray[3]);
        }
 public virtual Int32 WillExecute(string source, NetOffice.ADODBApi.Enums.CursorTypeEnum cursorType, NetOffice.ADODBApi.Enums.LockTypeEnum lockType, Int32 options, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Command_Deprecated pCommand, NetOffice.ADODBApi._Recordset_Deprecated pRecordset, NetOffice.ADODBApi._Connection_Deprecated pConnection)
 {
     return(InvokerService.InvokeInternal.ExecuteInt32MethodGet(this, "WillExecute", new object[] { source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection }));
 }
Пример #5
0
 public void Open(object source, object activeConnection, NetOffice.ADODBApi.Enums.CursorTypeEnum cursorType, NetOffice.ADODBApi.Enums.LockTypeEnum lockType)
 {
     object[] paramsArray = Invoker.ValidateParamsArray(source, activeConnection, cursorType, lockType);
     Invoker.Method(this, "Open", paramsArray);
 }
Пример #6
0
 public Int32 WillExecute(string source, NetOffice.ADODBApi.Enums.CursorTypeEnum cursorType, NetOffice.ADODBApi.Enums.LockTypeEnum lockType, Int32 options, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Command pCommand, NetOffice.ADODBApi._Recordset pRecordset, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "WillExecute", new object[] { source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection }));
 }