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

◆ FlushAsync() [2/2]

override Task System.Security.Cryptography.CryptoStream.FlushAsync ( CancellationToken cancellationToken)
inlinevirtual

Reimplemented from System.IO.Stream.

Definition at line 181 of file CryptoStream.cs.

182 {
183 if (GetType() != typeof(CryptoStream))
184 {
185 return base.FlushAsync(cancellationToken);
186 }
187 if (!cancellationToken.IsCancellationRequested)
188 {
189 if (_canWrite)
190 {
192 }
193 return Task.CompletedTask;
194 }
196 }
Task FlushAsync()
Definition Stream.cs:669
CryptoStream(Stream stream, ICryptoTransform transform, CryptoStreamMode mode)
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363
static Task CompletedTask
Definition Task.cs:1120

References System.Security.Cryptography.CryptoStream._canWrite, System.Security.Cryptography.CryptoStream._stream, System.cancellationToken, System.Threading.Tasks.Task< TResult >.CompletedTask, System.IO.Stream.FlushAsync(), and System.Threading.Tasks.Task< TResult >.FromCanceled().