-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBackgroundCopyJobTimes.cs
91 lines (69 loc) · 2.56 KB
/
BackgroundCopyJobTimes.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//
// @(#) BackgroundCopyJobProgress.cs
//
// Project: usis.Net.Bits
// System: Microsoft Visual Studio 2017
// Author: Udo Schäfer
//
// Copyright (c) 2017,2018 usis GmbH. All rights reserved.
using System;
using usis.Net.Bits.Interop;
namespace usis.Net.Bits
{
// ----------------------------
// BackgroundCopyJobTimes class
// ----------------------------
/// <summary>
/// Provides job-related time stamps.
/// </summary>
public class BackgroundCopyJobTimes
{
#region fields
private BG_JOB_TIMES times;
#endregion fields
#region construction
// ------------
// construction
// ------------
internal BackgroundCopyJobTimes(BG_JOB_TIMES times) => this.times = times;
#endregion construction
#region properties
// ---------------------
// CreationTime property
// ---------------------
/// <summary>
/// Gets the time the job was created.
/// </summary>
/// <value>
/// The time the job was created.
/// </value>
public DateTime CreationTime => times.CreationTime.ToDateTime();
// -------------------------
// ModificationTime property
// -------------------------
/// <summary>
/// Gets the time the job was last modified or bytes were transferred.
/// </summary>
/// <value>
/// The time the job was last modified or bytes were transferred.
/// </value>
/// <remarks>
/// Adding files or calling any of the set methods of the <see cref="BackgroundCopyJob"/> class changes this value.
/// In addition, changes to the state of the job and calling the <c>Suspend</c>, <c>Resume</c>, <c>Cancel</c>,
/// and <c>Complete</c> methods change this value
/// </remarks>
public DateTime ModificationTime => times.ModificationTime.ToDateTime();
// -------------------------------
// TransferCompletionTime property
// -------------------------------
/// <summary>
/// Gets the time the job entered the <see cref="BackgroundCopyJobState.Transferred"/> state.
/// </summary>
/// <value>
/// The transfer completion time.
/// </value>
public DateTime TransferCompletionTime => times.TransferCompletionTime.ToDateTime();
#endregion properties
}
}
// eof "BackgroundCopyJobProgress.cs"