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

◆ WriteStartAttribute() [1/2]

void System.Xml.XmlCanonicalWriter.WriteStartAttribute ( byte[] prefixBuffer,
int prefixOffset,
int prefixLength,
byte[] localNameBuffer,
int localNameOffset,
int localNameLength )
inline

Definition at line 604 of file XmlCanonicalWriter.cs.

605 {
606 if (prefixBuffer == null)
607 {
608 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("prefixBuffer"));
609 }
610 if (prefixOffset < 0)
611 {
612 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("prefixOffset", System.SR.ValueMustBeNonNegative));
613 }
614 if (prefixOffset > prefixBuffer.Length)
615 {
616 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("prefixOffset", System.SR.Format(System.SR.OffsetExceedsBufferSize, prefixBuffer.Length)));
617 }
618 if (prefixLength < 0)
619 {
620 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("prefixLength", System.SR.ValueMustBeNonNegative));
621 }
622 if (prefixLength > prefixBuffer.Length - prefixOffset)
623 {
624 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("prefixLength", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, prefixBuffer.Length - prefixOffset)));
625 }
626 if (localNameBuffer == null)
627 {
628 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("localNameBuffer"));
629 }
630 if (localNameOffset < 0)
631 {
632 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("localNameOffset", System.SR.ValueMustBeNonNegative));
633 }
634 if (localNameOffset > localNameBuffer.Length)
635 {
636 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("localNameOffset", System.SR.Format(System.SR.OffsetExceedsBufferSize, localNameBuffer.Length)));
637 }
638 if (localNameLength < 0)
639 {
640 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("localNameLength", System.SR.ValueMustBeNonNegative));
641 }
642 if (localNameLength > localNameBuffer.Length - localNameOffset)
643 {
644 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("localNameLength", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, localNameBuffer.Length - localNameOffset)));
645 }
650 _attribute.prefixLength = prefixLength;
651 _attribute.localNameOffset = _attribute.prefixOffset + prefixLength + ((prefixLength != 0) ? 1 : 0);
652 _attribute.localNameLength = localNameLength;
655 _elementWriter.WriteStartAttribute(prefixBuffer, prefixOffset, prefixLength, localNameBuffer, localNameOffset, localNameLength);
656 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ValueMustBeNonNegative
Definition SR.cs:296
static string SizeExceedsRemainingBufferSpace
Definition SR.cs:324
static string OffsetExceedsBufferSize
Definition SR.cs:322
Definition SR.cs:7
override void WriteStartAttribute(string prefix, string localName)

References System.Xml.XmlCanonicalWriter._elementWriter, System.Xml.Dictionary, System.SR.Format(), System.SR.OffsetExceedsBufferSize, System.Xml.XmlStreamNodeWriter.Position, System.SR.SizeExceedsRemainingBufferSpace, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Xml.XmlCanonicalWriter.ThrowIfClosed(), System.SR.ValueMustBeNonNegative, and System.Xml.XmlUTF8NodeWriter.WriteStartAttribute().