forked from smiley22/S22.Imap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MailboxQuota.cs
45 lines (41 loc) · 1.34 KB
/
MailboxQuota.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
using System;
namespace S22.Imap {
/// <summary>
/// Represents an IMAP QUOTA entry for a resource which typically consists of a resource name,
/// the current usage of the resource, and the resource limit.
/// </summary>
internal class MailboxQuota {
/// <summary>
/// Initializes a new instance of the MailboxQuota class with the specified values.
/// </summary>
/// <param name="Name">The name of the resource this MailboxQuota instance describes.</param>
/// <param name="Usage">The current usage of the resource in units of 1024 bytes.</param>
/// <param name="Limit">The limit of the resource in units of 1024 bytes.</param>
internal MailboxQuota(string Name, uint Usage, uint Limit) {
this.ResourceName = Name.ToUpperInvariant();
this.Usage = Convert.ToUInt64(Usage) * 1024;
this.Limit = Convert.ToUInt64(Limit) * 1024;
}
/// <summary>
/// The name of the resource this MailboxQuota instance describes.
/// </summary>
public string ResourceName {
get;
private set;
}
/// <summary>
/// The current usage of the resource this MailboxQuota instance describes, in bytes.
/// </summary>
public UInt64 Usage {
get;
private set;
}
/// <summary>
/// The limit of the resource this MailboxQuota instance describes, in bytes.
/// </summary>
public UInt64 Limit {
get;
private set;
}
}
}