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

◆ AddAttribute()

void System.Security.SecurityElement.AddAttribute ( string name,
string value )
inline

Definition at line 181 of file SecurityElement.cs.

182 {
183 if (name == null)
184 {
185 throw new ArgumentNullException("name");
186 }
187 if (value == null)
188 {
189 throw new ArgumentNullException("value");
190 }
191 if (!IsValidAttributeName(name))
192 {
193 throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, name));
194 }
196 {
197 throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, value));
198 }
199 AddAttributeSafe(name, value);
200 }
static bool IsValidAttributeValue([NotNullWhen(true)] string? value)
void AddAttributeSafe(string name, string value)
static bool IsValidAttributeName([NotNullWhen(true)] string? name)

References System.Security.SecurityElement.AddAttributeSafe(), System.SR.Argument_InvalidElementName, System.SR.Argument_InvalidElementValue, System.SR.Format(), System.Security.SecurityElement.IsValidAttributeName(), System.Security.SecurityElement.IsValidAttributeValue(), and System.value.