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

◆ SecurityElement() [2/2]

System.Security.SecurityElement.SecurityElement ( string tag,
string? text )
inline

Definition at line 141 of file SecurityElement.cs.

142 {
143 if (tag == null)
144 {
145 throw new ArgumentNullException("tag");
146 }
147 if (!IsValidTag(tag))
148 {
149 throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag));
150 }
151 if (text != null && !IsValidText(text))
152 {
153 throw new ArgumentException(SR.Format(SR.Argument_InvalidElementText, text));
154 }
155 _tag = tag;
156 _text = text;
157 }
static bool IsValidTag([NotNullWhen(true)] string? tag)
static bool IsValidText([NotNullWhen(true)] string? text)

References System.Security.SecurityElement._tag, System.Security.SecurityElement._text, System.SR.Argument_InvalidElementTag, System.SR.Argument_InvalidElementText, System.SR.Format(), System.Security.SecurityElement.IsValidTag(), System.Security.SecurityElement.IsValidText(), and System.text.