forked from David-Barrett-MS/OutlookEventsInspector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JournalItemWrapper.cs
39 lines (32 loc) · 1.68 KB
/
JournalItemWrapper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* By David Barrett, Microsoft Ltd. 2016. Use at your own risk. No warranties are given.
*
* DISCLAIMER:
* THIS CODE IS SAMPLE CODE. THESE SAMPLES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
* MICROSOFT FURTHER DISCLAIMS ALL IMPLIED WARRANTIES INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR OF FITNESS FOR
* A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF THE SAMPLES REMAINS WITH YOU. IN NO EVENT SHALL
* MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
* BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE
* SAMPLES, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION
* OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.
*/
using Outlook = Microsoft.Office.Interop.Outlook;
using Office = Microsoft.Office.Core;
using System;
namespace InspectorEvents {
internal class JournalItemWrapper : InspectorWrapper {
public JournalItemWrapper(Outlook.Inspector inspector)
: base(inspector) {
}
public Outlook.JournalItem Item { get; private set; }
protected override void Initialize() {
Item = (Outlook.JournalItem)Inspector.CurrentItem;
}
protected override void Close() {
Globals.ThisAddIn.EventTrackerForm.AddLog("Inspector_Close (JournalItem)");
Item = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
}
}