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

◆ UniqueId() [4/6]

unsafe System.Xml.UniqueId.UniqueId ( byte[] guid,
int offset )
inline

Definition at line 77 of file UniqueId.cs.

78 {
79 if (guid == null)
80 {
81 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("guid"));
82 }
83 if (offset < 0)
84 {
85 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
86 }
87 if (offset > guid.Length)
88 {
89 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, guid.Length)));
90 }
91 if (16 > guid.Length - offset)
92 {
94 }
95 fixed (byte* ptr = &guid[offset])
96 {
99 }
100 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ValueMustBeNonNegative
Definition SR.cs:296
static string XmlArrayTooSmallInput
Definition SR.cs:350
static string OffsetExceedsBufferSize
Definition SR.cs:322
Definition SR.cs:7
unsafe long UnsafeGetInt64(byte *pb)
Definition UniqueId.cs:398

References System.Xml.UniqueId._idHigh, System.Xml.UniqueId._idLow, System.Xml.ArgumentException, System.Xml.Dictionary, System.SR.Format(), System.offset, System.SR.OffsetExceedsBufferSize, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Xml.UniqueId.UnsafeGetInt64(), System.SR.ValueMustBeNonNegative, and System.SR.XmlArrayTooSmallInput.