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

◆ TryUpdateContentLength()

void System.Net.FtpControlStream.TryUpdateContentLength ( string str)
inlineprivate

Definition at line 754 of file FtpControlStream.cs.

755 {
756 int num = str.LastIndexOf('(');
757 if (num == -1)
758 {
759 return;
760 }
761 int num2 = str.IndexOf(" bytes).", StringComparison.Ordinal);
762 if (num2 != -1 && num2 > num)
763 {
764 num++;
765 if (long.TryParse(str.AsSpan(num, num2 - num), NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, NumberFormatInfo.InvariantInfo, out var result))
766 {
767 _contentLength = result;
768 }
769 }
770 }

References System.Net.FtpControlStream._contentLength, System.Globalization.NumberFormatInfo.InvariantInfo, and System.str.

Referenced by System.Net.FtpControlStream.PipelineCallback().