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

◆ ReadContentAsBase64() [2/2]

byte[] System.Runtime.Serialization.XmlReaderDelegator.ReadContentAsBase64 ( string str)
inlinepackageinherited

Definition at line 657 of file XmlReaderDelegator.cs.

658 {
659 if (str == null)
660 {
661 return null;
662 }
663 str = str.Trim();
664 if (str.Length == 0)
665 {
666 return Array.Empty<byte>();
667 }
668 try
669 {
670 return Convert.FromBase64String(str);
671 }
673 {
674 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(str, "byte[]", exception));
675 }
676 catch (FormatException exception2)
677 {
678 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlExceptionHelper.CreateConversionException(str, "byte[]", exception2));
679 }
680 }
static XmlException CreateConversionException(string type, Exception exception)

References System.Xml.XmlExceptionHelper.CreateConversionException(), System.exception, System.Convert.FromBase64String(), System.str, and System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError().