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

◆ Set() [1/2]

override void System.Net.Mime.HeaderCollection.Set ( string name,
string value )
inline

Definition at line 75 of file HeaderCollection.cs.

76 {
77 if (name == null)
78 {
79 throw new ArgumentNullException("name");
80 }
81 if (value == null)
82 {
83 throw new ArgumentNullException("value");
84 }
85 if (name.Length == 0)
86 {
87 throw new ArgumentException(System.SR.Format(System.SR.net_emptystringcall, "name"), "name");
88 }
89 if (value.Length == 0)
90 {
91 throw new ArgumentException(System.SR.Format(System.SR.net_emptystringcall, "value"), "value");
92 }
93 if (!MimeBasePart.IsAscii(name, permitCROrLF: false))
94 {
95 throw new FormatException(System.SR.InvalidHeaderName);
96 }
98 value = value.Normalize(NormalizationForm.FormC);
99 base.Set(name, value);
100 }
static string NormalizeCase(string name)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string InvalidHeaderName
Definition SR.cs:48
static string net_emptystringcall
Definition SR.cs:14
Definition SR.cs:7

References System.SR.Format(), System.SR.InvalidHeaderName, System.Net.Mime.MimeBasePart.IsAscii(), System.SR.net_emptystringcall, System.Net.Mail.MailHeaderInfo.NormalizeCase(), and System.value.

Referenced by System.Net.Mail.Message.EncodeHeaders().