Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ContentId

string System.Net.Mail.AttachmentBase.ContentId
getsetinherited

Definition at line 28 of file AttachmentBase.cs.

29 {
30 get
31 {
32 string contentID = _part.ContentID;
33 if (string.IsNullOrEmpty(contentID))
34 {
35 return ContentId = Guid.NewGuid().ToString();
36 }
37 if (contentID.Length >= 2 && contentID[0] == '<' && contentID[contentID.Length - 1] == '>')
38 {
39 return contentID.Substring(1, contentID.Length - 2);
40 }
41 return contentID;
42 }
43 [param: AllowNull]
44 set
45 {
46 if (string.IsNullOrEmpty(value))
47 {
48 _part.ContentID = null;
49 return;
50 }
51 if (value.IndexOfAny(s_contentCIDInvalidChars) != -1)
52 {
54 }
55 _part.ContentID = "<" + value + ">";
56 }
57 }
static readonly char[] s_contentCIDInvalidChars
static string MailHeaderInvalidCID
Definition SR.cs:60
Definition SR.cs:7