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

◆ UniqueId() [6/6]

unsafe System.Xml.UniqueId.UniqueId ( char[] chars,
int offset,
int count )
inline

Definition at line 119 of file UniqueId.cs.

120 {
121 if (chars == null)
122 {
123 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
124 }
125 if (offset < 0)
126 {
127 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
128 }
129 if (offset > chars.Length)
130 {
131 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, chars.Length)));
132 }
133 if (count < 0)
134 {
135 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
136 }
137 if (count > chars.Length - offset)
138 {
139 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)));
140 }
141 if (count == 0)
142 {
144 }
145 fixed (char* chars2 = &chars[offset])
146 {
148 }
149 if (!IsGuid)
150 {
151 _s = new string(chars, offset, count);
152 }
153 }
static string XmlInvalidUniqueId
Definition SR.cs:444
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
unsafe void UnsafeParse(char *chars, int charCount)
Definition UniqueId.cs:170

References System.Xml.UniqueId._s, System.chars, System.count, System.Xml.Dictionary, System.SR.Format(), System.Xml.UniqueId.IsGuid, System.offset, System.SR.OffsetExceedsBufferSize, System.SR.SizeExceedsRemainingBufferSpace, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Xml.UniqueId.UnsafeParse(), System.SR.ValueMustBeNonNegative, and System.SR.XmlInvalidUniqueId.