예제 #1
0
        public void AttachmentRead([In, MarshalAs(UnmanagedType.IDispatch)] object attachment)
        {
            if (!Validate("AttachmentRead"))
            {
                Invoker.ReleaseParamsArray(attachment);
                return;
            }

            NetOffice.OutlookApi.Attachment newAttachment = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.Attachment>(EventClass, attachment, NetOffice.OutlookApi.Attachment.LateBindingApiWrapperType);
            object[] paramsArray = new object[1];
            paramsArray[0] = newAttachment;
            EventBinding.RaiseCustomEvent("AttachmentRead", ref paramsArray);
        }
예제 #2
0
        public void AttachmentRemove([In, MarshalAs(UnmanagedType.IDispatch)] object attachment)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("AttachmentRemove");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(attachment);
                return;
            }

            NetOffice.OutlookApi.Attachment newAttachment = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, attachment) as NetOffice.OutlookApi.Attachment;
            object[] paramsArray = new object[1];
            paramsArray[0] = newAttachment;
            _eventBinding.RaiseCustomEvent("AttachmentRemove", ref paramsArray);
        }
예제 #3
0
        public void BeforeAttachmentSave([In, MarshalAs(UnmanagedType.IDispatch)] object attachment, [In][Out] ref object cancel)
        {
            if (!Validate("BeforeAttachmentSave"))
            {
                Invoker.ReleaseParamsArray(attachment, cancel);
                return;
            }

            NetOffice.OutlookApi.Attachment newAttachment = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.Attachment>(EventClass, attachment, NetOffice.OutlookApi.Attachment.LateBindingApiWrapperType);
            object[] paramsArray = new object[2];
            paramsArray[0] = newAttachment;
            paramsArray.SetValue(cancel, 1);
            EventBinding.RaiseCustomEvent("BeforeAttachmentSave", ref paramsArray);

            cancel = ToBoolean(paramsArray[1]);
        }
예제 #4
0
        public void BeforeAttachmentWriteToTempFile([In, MarshalAs(UnmanagedType.IDispatch)] object attachment, [In][Out] ref object cancel)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("BeforeAttachmentWriteToTempFile");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(attachment, cancel);
                return;
            }

            NetOffice.OutlookApi.Attachment newAttachment = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, attachment) as NetOffice.OutlookApi.Attachment;
            object[] paramsArray = new object[2];
            paramsArray[0] = newAttachment;
            paramsArray.SetValue(cancel, 1);
            _eventBinding.RaiseCustomEvent("BeforeAttachmentWriteToTempFile", ref paramsArray);

            cancel = (bool)paramsArray[1];
        }