public NetOffice.OutlookApi.Selection GetSelection(NetOffice.OutlookApi.Enums.OlSelectionContents selectionContents) { object[] paramsArray = Invoker.ValidateParamsArray(selectionContents); object returnItem = Invoker.MethodReturn(this, "GetSelection", paramsArray); NetOffice.OutlookApi.Selection newObject = Factory.CreateKnownObjectFromComProxy(this, returnItem, NetOffice.OutlookApi.Selection.LateBindingApiWrapperType) as NetOffice.OutlookApi.Selection; return(newObject); }
public void ItemContextMenuDisplay([In, MarshalAs(UnmanagedType.IDispatch)] object commandBar, [In, MarshalAs(UnmanagedType.IDispatch)] object selection) { if (!Validate("ItemContextMenuDisplay")) { Invoker.ReleaseParamsArray(commandBar, selection); return; } NetOffice.OfficeApi.CommandBar newCommandBar = Factory.CreateKnownObjectFromComProxy <NetOffice.OfficeApi.CommandBar>(EventClass, commandBar, NetOffice.OfficeApi.CommandBar.LateBindingApiWrapperType); NetOffice.OutlookApi.Selection newSelection = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.Selection>(EventClass, selection, NetOffice.OutlookApi.Selection.LateBindingApiWrapperType); object[] paramsArray = new object[2]; paramsArray[0] = newCommandBar; paramsArray[1] = newSelection; EventBinding.RaiseCustomEvent("ItemContextMenuDisplay", ref paramsArray); }
public void ItemContextMenuDisplay([In, MarshalAs(UnmanagedType.IDispatch)] object commandBar, [In, MarshalAs(UnmanagedType.IDispatch)] object selection) { Delegate[] recipients = _eventBinding.GetEventRecipients("ItemContextMenuDisplay"); if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0)) { Invoker.ReleaseParamsArray(commandBar, selection); return; } NetOffice.OfficeApi.CommandBar newCommandBar = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, commandBar) as NetOffice.OfficeApi.CommandBar; NetOffice.OutlookApi.Selection newSelection = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, selection) as NetOffice.OutlookApi.Selection; object[] paramsArray = new object[2]; paramsArray[0] = newCommandBar; paramsArray[1] = newSelection; _eventBinding.RaiseCustomEvent("ItemContextMenuDisplay", ref paramsArray); }