-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResultSet.cs
66 lines (65 loc) · 1.9 KB
/
ResultSet.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
namespace Storage.CompoundDocument
{
/// <summary>
///
/// </summary>
public sealed class ResultSet
{
/// <summary>
/// Gets or sets the out directory.
/// </summary>
/// <value>The out directory.</value>
public Directory OutDirectory { get; private set; }
/// <summary>
/// Gets or sets the out stream.
/// </summary>
/// <value>The out stream.</value>
public System.IO.Stream OutStream { get; private set; }
/// <summary>
/// Initializes a new instance of the <see cref="ResultSet"/> class.
/// </summary>
/// <param name="outDirectory">The out directory.</param>
/// <param name="outStream">The out stream.</param>
public ResultSet(Directory outDirectory, System.IO.Stream outStream)
{
OutDirectory = outDirectory;
OutStream = outStream;
}
/// <summary>
/// Gets a value indicating whether this instance has content.
/// </summary>
/// <value>
/// <c>true</c> if this instance has content; otherwise, <c>false</c>.
/// </value>
public bool HasContent
{
get
{
return OutStream != null;
}
}
/// <summary>
/// Gets a value indicating whether this instance is root.
/// </summary>
/// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value>
public bool IsRoot
{
get
{
return OutDirectory.IsRoot;
}
}
/// <summary>
/// Closes the stream.
/// </summary>
public void CloseStream()
{
if (HasContent)
{
OutStream.Close();
OutStream.Dispose();
OutStream = null;
}
}
}
}