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

◆ LoadString()

string System.Resources.ResourceReader.LoadString ( int pos)
inlinepackage

Definition at line 580 of file ResourceReader.cs.

581 {
583 string result = null;
584 int num = _store.Read7BitEncodedInt();
585 if (_version == 1)
586 {
587 if (num == -1)
588 {
589 return null;
590 }
591 if (FindType(num) != typeof(string))
592 {
593 throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ResourceNotString_Type, FindType(num).FullName));
594 }
595 result = _store.ReadString();
596 }
597 else
598 {
601 {
602 throw new InvalidOperationException(SR.Format(p1: (resourceTypeCode >= ResourceTypeCode.StartOfUserTypes) ? FindType((int)(resourceTypeCode - 64)).FullName : resourceTypeCode.ToString(), resourceFormat: SR.InvalidOperation_ResourceNotString_Type));
603 }
605 {
606 result = _store.ReadString();
607 }
608 }
609 return result;
610 }
virtual string ReadString()
virtual Stream BaseStream

References System.Resources.ResourceReader._dataSectionOffset, System.Resources.ResourceReader._store, System.Resources.ResourceReader._version, System.IO.BinaryReader.BaseStream, System.Resources.ResourceReader.FindType(), System.SR.Format(), System.Type.FullName, System.FullName, System.SR.InvalidOperation_ResourceNotString_Type, System.IO.BinaryReader.Read7BitEncodedInt(), and System.IO.BinaryReader.ReadString().

Referenced by System.Resources.RuntimeResourceSet.ReadValue().