Пример #1
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];
        }
Пример #2
0
        public void ExecuteComplete([In] object recordsAffected, [In, MarshalAs(UnmanagedType.IDispatch)] object pError, [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("ExecuteComplete");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(recordsAffected, pError, adStatus, pCommand, pRecordset, pConnection);
                return;
            }

            Int32 newRecordsAffected = Convert.ToInt32(recordsAffected);

            NetOffice.ADODBApi.Error newpError = Factory.CreateObjectFromComProxy(_eventClass, pError) as NetOffice.ADODBApi.Error;
            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[6];
            paramsArray[0] = newRecordsAffected;
            paramsArray[1] = newpError;
            paramsArray[2] = newadStatus;
            paramsArray[3] = newpCommand;
            paramsArray[4] = newpRecordset;
            paramsArray[5] = newpConnection;
            _eventBinding.RaiseCustomEvent("ExecuteComplete", ref paramsArray);
        }
Пример #3
0
        public void WillConnect([In][Out] ref object connectionString, [In][Out] ref object userID, [In][Out] ref object password, [In][Out] ref object options, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("WillConnect");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(connectionString, userID, password, options, adStatus, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateObjectFromComProxy(_eventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[6];
            paramsArray.SetValue(connectionString, 0);
            paramsArray.SetValue(userID, 1);
            paramsArray.SetValue(password, 2);
            paramsArray.SetValue(options, 3);
            paramsArray[4] = newadStatus;
            paramsArray[5] = newpConnection;
            _eventBinding.RaiseCustomEvent("WillConnect", ref paramsArray);

            connectionString = (string)paramsArray[0];
            userID           = (string)paramsArray[1];
            password         = (string)paramsArray[2];
            options          = (Int32)paramsArray[3];
        }
Пример #4
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 Int32 Disconnect(NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(adStatus, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "Disconnect", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
Пример #6
0
        public void Disconnect([In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("Disconnect"))
            {
                Invoker.ReleaseParamsArray(adStatus, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[2];
            paramsArray[0] = newadStatus;
            paramsArray[1] = newpConnection;
            EventBinding.RaiseCustomEvent("Disconnect", ref paramsArray);
        }
Пример #7
0
        public void Disconnect([In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("Disconnect");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(adStatus, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateObjectFromComProxy(_eventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[2];
            paramsArray[0] = newadStatus;
            paramsArray[1] = newpConnection;
            _eventBinding.RaiseCustomEvent("Disconnect", ref paramsArray);
        }
Пример #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pError"></param>
        /// <param name="adStatus"></param>
        /// <param name="pConnection"></param>
        public virtual void CommitTransComplete([In, MarshalAs(UnmanagedType.IDispatch)] object pError, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("CommitTransComplete"))
            {
                Invoker.ReleaseParamsArray(pError, adStatus, pConnection);                return;
            }

            NetOffice.ADODBApi.Error newpError = Factory.CreateKnownObjectFromComProxy <NetOffice.ADODBApi.Error>(EventClass, pError, typeof(NetOffice.ADODBApi.Error));
            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[3];
            paramsArray[0] = newpError;
            paramsArray[1] = newadStatus;
            paramsArray[2] = newpConnection;
            EventBinding.RaiseCustomEvent("CommitTransComplete", ref paramsArray);
        }
Пример #9
0
        public void BeginTransComplete([In] object transactionLevel, [In, MarshalAs(UnmanagedType.IDispatch)] object pError, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("BeginTransComplete"))
            {
                Invoker.ReleaseParamsArray(transactionLevel, pError, adStatus, pConnection);
                return;
            }

            Int32 newTransactionLevel = ToInt32(transactionLevel);

            NetOffice.ADODBApi.Error newpError = Factory.CreateKnownObjectFromComProxy <NetOffice.ADODBApi.Error>(EventClass, pError, NetOffice.ADODBApi.Error.LateBindingApiWrapperType);
            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[4];
            paramsArray[0] = newTransactionLevel;
            paramsArray[1] = newpError;
            paramsArray[2] = newadStatus;
            paramsArray[3] = newpConnection;
            EventBinding.RaiseCustomEvent("BeginTransComplete", ref paramsArray);
        }
Пример #10
0
        public void BeginTransComplete([In] object transactionLevel, [In, MarshalAs(UnmanagedType.IDispatch)] object pError, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("BeginTransComplete");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(transactionLevel, pError, adStatus, pConnection);
                return;
            }

            Int32 newTransactionLevel = Convert.ToInt32(transactionLevel);

            NetOffice.ADODBApi.Error newpError = Factory.CreateObjectFromComProxy(_eventClass, pError) as NetOffice.ADODBApi.Error;
            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateObjectFromComProxy(_eventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[4];
            paramsArray[0] = newTransactionLevel;
            paramsArray[1] = newpError;
            paramsArray[2] = newadStatus;
            paramsArray[3] = newpConnection;
            _eventBinding.RaiseCustomEvent("BeginTransComplete", ref paramsArray);
        }
Пример #11
0
        public void WillConnect([In][Out] ref object connectionString, [In][Out] ref object userID, [In][Out] ref object password, [In][Out] ref object options, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("WillConnect"))
            {
                Invoker.ReleaseParamsArray(connectionString, userID, password, options, adStatus, pConnection);
                return;
            }

            NetOffice.ADODBApi.Enums.EventStatusEnum newadStatus    = (NetOffice.ADODBApi.Enums.EventStatusEnum)adStatus;
            NetOffice.ADODBApi._Connection           newpConnection = Factory.CreateEventArgumentObjectFromComProxy(EventClass, pConnection) as NetOffice.ADODBApi._Connection;
            object[] paramsArray = new object[6];
            paramsArray.SetValue(connectionString, 0);
            paramsArray.SetValue(userID, 1);
            paramsArray.SetValue(password, 2);
            paramsArray.SetValue(options, 3);
            paramsArray[4] = newadStatus;
            paramsArray[5] = newpConnection;
            EventBinding.RaiseCustomEvent("WillConnect", ref paramsArray);

            connectionString = ToString(paramsArray[0]);
            userID           = ToString(paramsArray[1]);
            password         = ToString(paramsArray[2]);
            options          = ToInt32(paramsArray[3]);
        }
Пример #12
0
        public void ExecuteComplete([In] object recordsAffected, [In, MarshalAs(UnmanagedType.IDispatch)] object pError, [In] object adStatus, [In, MarshalAs(UnmanagedType.IDispatch)] object pCommand, [In, MarshalAs(UnmanagedType.IDispatch)] object pRecordset, [In, MarshalAs(UnmanagedType.IDispatch)] object pConnection)
        {
            if (!Validate("ExecuteComplete"))
            {
                Invoker.ReleaseParamsArray(recordsAffected, pError, adStatus, pCommand, pRecordset, pConnection);
                return;
            }

            Int32 newRecordsAffected = ToInt32(recordsAffected);

            NetOffice.ADODBApi.Error newpError = Factory.CreateKnownObjectFromComProxy <NetOffice.ADODBApi.Error>(EventClass, pError, NetOffice.ADODBApi.Error.LateBindingApiWrapperType);
            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[6];
            paramsArray[0] = newRecordsAffected;
            paramsArray[1] = newpError;
            paramsArray[2] = newadStatus;
            paramsArray[3] = newpCommand;
            paramsArray[4] = newpRecordset;
            paramsArray[5] = newpConnection;
            EventBinding.RaiseCustomEvent("ExecuteComplete", ref paramsArray);
        }
Пример #13
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 }));
 }
Пример #14
0
 public Int32 ExecuteComplete(Int32 recordsAffected, NetOffice.ADODBApi.Error pError, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Command pCommand, NetOffice.ADODBApi._Recordset pRecordset, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "ExecuteComplete", new object[] { recordsAffected, pError, adStatus, pCommand, pRecordset, pConnection }));
 }
Пример #15
0
 public Int32 WillConnect(string connectionString, string userID, string password, Int32 options, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "WillConnect", new object[] { connectionString, userID, password, options, adStatus, pConnection }));
 }
Пример #16
0
 public Int32 ConnectComplete(NetOffice.ADODBApi.Error pError, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "ConnectComplete", pError, adStatus, pConnection));
 }
Пример #17
0
 public Int32 Disconnect(NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "Disconnect", adStatus, pConnection));
 }
Пример #18
0
 public Int32 BeginTransComplete(Int32 transactionLevel, NetOffice.ADODBApi.Error pError, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
 {
     return(Factory.ExecuteInt32MethodGet(this, "BeginTransComplete", transactionLevel, pError, adStatus, pConnection));
 }
        public Int32 WillConnect(string connectionString, string userID, string password, Int32 options, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(connectionString, userID, password, options, adStatus, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "WillConnect", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
        public Int32 ExecuteComplete(Int32 recordsAffected, NetOffice.ADODBApi.Error pError, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Command pCommand, NetOffice.ADODBApi._Recordset pRecordset, NetOffice.ADODBApi._Connection pConnection)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(recordsAffected, pError, adStatus, pCommand, pRecordset, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "ExecuteComplete", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
        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)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(source, cursorType, lockType, options, adStatus, pCommand, pRecordset, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "WillExecute", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }
        public Int32 RollbackTransComplete(NetOffice.ADODBApi.Error pError, NetOffice.ADODBApi.Enums.EventStatusEnum adStatus, NetOffice.ADODBApi._Connection pConnection)
        {
            object[] paramsArray = Invoker.ValidateParamsArray(pError, adStatus, pConnection);
            object   returnItem  = Invoker.MethodReturn(this, "RollbackTransComplete", paramsArray);

            return(NetRuntimeSystem.Convert.ToInt32(returnItem));
        }