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

◆ RemoveAttribute()

void System.Xml.Linq.XElement.RemoveAttribute ( XAttribute a)
inlinepackage

Definition at line 1198 of file XElement.cs.

1199 {
1200 bool flag = NotifyChanging(a, XObjectChangeEventArgs.Remove);
1201 if (a.parent != this)
1202 {
1204 }
1205 XAttribute xAttribute = lastAttr;
1206 XAttribute xAttribute2;
1207 while ((xAttribute2 = xAttribute.next) != a)
1208 {
1210 }
1211 if (xAttribute == a)
1212 {
1213 lastAttr = null;
1214 }
1215 else
1216 {
1217 if (lastAttr == a)
1218 {
1220 }
1221 xAttribute.next = a.next;
1222 }
1223 a.parent = null;
1224 a.next = null;
1225 if (flag)
1226 {
1227 NotifyChanged(a, XObjectChangeEventArgs.Remove);
1228 }
1229 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
static string InvalidOperation_ExternalCode
Definition SR.cs:50
Definition SR.cs:7
bool NotifyChanging(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:428
bool NotifyChanged(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:399

References System.Xml.Dictionary, System.SR.InvalidOperation_ExternalCode, System.Xml.Linq.XElement.lastAttr, System.Xml.Linq.XObject.NotifyChanged(), System.Xml.Linq.XObject.NotifyChanging(), and System.Xml.Linq.XObjectChangeEventArgs.Remove.

Referenced by System.Xml.Linq.XElement.SetAttributeValue().