Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
MailAddressCollection.cs
Go to the documentation of this file.
3
4namespace System.Net.Mail;
5
6public class MailAddressCollection : Collection<MailAddress>
7{
8 public void Add(string addresses)
9 {
10 if (addresses == null)
11 {
12 throw new ArgumentNullException("addresses");
13 }
14 if (addresses.Length == 0)
15 {
16 throw new ArgumentException(System.SR.Format(System.SR.net_emptystringcall, "addresses"), "addresses");
17 }
19 }
20
21 protected override void SetItem(int index, MailAddress item)
22 {
23 if (item == null)
24 {
25 throw new ArgumentNullException("item");
26 }
27 base.SetItem(index, item);
28 }
29
30 protected override void InsertItem(int index, MailAddress item)
31 {
32 if (item == null)
33 {
34 throw new ArgumentNullException("item");
35 }
36 base.InsertItem(index, item);
37 }
38
39 internal void ParseValue(string addresses)
40 {
42 for (int i = 0; i < list.Count; i++)
43 {
44 Add(list[i]);
45 }
46 }
47
48 public override string ToString()
49 {
50 return string.Join(", ", this);
51 }
52
53 internal string Encode(int charsConsumed, bool allowUnicode)
54 {
55 string text = string.Empty;
57 while (enumerator.MoveNext())
58 {
59 MailAddress current = enumerator.Current;
60 text = ((!string.IsNullOrEmpty(text)) ? (text + ", " + current.Encode(1, allowUnicode)) : current.Encode(charsConsumed, allowUnicode));
61 }
62 return text;
63 }
64}
string Encode(int charsConsumed, bool allowUnicode)
override void SetItem(int index, MailAddress item)
override void InsertItem(int index, MailAddress item)
static List< MailAddress > ParseMultipleAddresses(string data)
string Encode(int charsConsumed, bool allowUnicode)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string net_emptystringcall
Definition SR.cs:14
Definition SR.cs:7