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

◆ ToString() [2/2]

void System.Security.SecurityElement.ToString ( object obj,
Action< object, string > write )
inlineprivate

Definition at line 430 of file SecurityElement.cs.

431 {
432 write(obj, "<");
433 write(obj, _tag);
434 if (_attributes != null && _attributes.Count > 0)
435 {
436 write(obj, " ");
437 int count = _attributes.Count;
438 for (int i = 0; i < count; i += 2)
439 {
440 string arg = (string)_attributes[i];
441 string arg2 = (string)_attributes[i + 1];
442 write(obj, arg);
443 write(obj, "=\"");
444 write(obj, arg2);
445 write(obj, "\"");
446 if (i != _attributes.Count - 2)
447 {
448 write(obj, "\r\n");
449 }
450 }
451 }
452 if (_text == null && (_children == null || _children.Count == 0))
453 {
454 write(obj, "/>");
455 write(obj, "\r\n");
456 return;
457 }
458 write(obj, ">");
459 write(obj, _text);
460 if (_children != null)
461 {
462 write(obj, "\r\n");
463 for (int j = 0; j < _children.Count; j++)
464 {
465 ((SecurityElement)_children[j]).ToString(obj, write);
466 }
467 }
468 write(obj, "</");
469 write(obj, _tag);
470 write(obj, ">");
471 write(obj, "\r\n");
472 }

References System.Security.SecurityElement.SecurityElement(), System.Security.SecurityElement._attributes, System.Security.SecurityElement._children, System.Security.SecurityElement._tag, System.Security.SecurityElement._text, System.count, System.Collections.ArrayList.Count, and System.obj.