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

◆ ReadAllLinesAsync() [2/2]

static Task< string[]> System.IO.File.ReadAllLinesAsync ( string path,
Encoding encoding,
CancellationToken cancellationToken = default(CancellationToken) )
inlinestatic

Definition at line 841 of file File.cs.

842 {
843 if (path == null)
844 {
845 throw new ArgumentNullException("path");
846 }
847 if (encoding == null)
848 {
849 throw new ArgumentNullException("encoding");
850 }
851 if (path.Length == 0)
852 {
853 throw new ArgumentException(SR.Argument_EmptyPath, "path");
854 }
855 if (!cancellationToken.IsCancellationRequested)
856 {
858 }
859 return Task.FromCanceled<string[]>(cancellationToken);
860 }
static async Task< string[]> InternalReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken)
Definition File.cs:862
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363

References System.SR.Argument_EmptyPath, System.cancellationToken, System.Threading.Tasks.Task< TResult >.FromCanceled(), and System.IO.File.InternalReadAllLinesAsync().