This repository was archived by the owner on Nov 20, 2018. It is now read-only.
File tree 2 files changed +2
-17
lines changed
Microsoft.AspNet.Http/Features
Microsoft.AspNet.Http.Abstractions
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -53,17 +53,11 @@ public interface IFormFile
53
53
/// <param name="path">The path of the file to create.</param>
54
54
void SaveAs ( string path ) ;
55
55
56
- /// <summary>
57
- /// Asynchronously saves the contents of the uploaded file.
58
- /// </summary>
59
- /// <param name="path">The path of the file to create.</param>
60
- Task SaveAsAsync ( string path ) ;
61
-
62
56
/// <summary>
63
57
/// Asynchronously saves the contents of the uploaded file.
64
58
/// </summary>
65
59
/// <param name="path">The path of the file to create.</param>
66
60
/// <param name="cancellationToken"></param>
67
- Task SaveAsAsync ( string path , CancellationToken cancellationToken ) ;
61
+ Task SaveAsAsync ( string path , CancellationToken cancellationToken = default ( CancellationToken ) ) ;
68
62
}
69
63
}
Original file line number Diff line number Diff line change @@ -84,21 +84,12 @@ public void SaveAs(string path)
84
84
}
85
85
}
86
86
87
- /// <summary>
88
- /// Asynchronously saves the contents of the uploaded file.
89
- /// </summary>
90
- /// <param name="path">The path of the file to create.</param>
91
- public Task SaveAsAsync ( string path )
92
- {
93
- return SaveAsAsync ( path , CancellationToken . None ) ;
94
- }
95
-
96
87
/// <summary>
97
88
/// Asynchronously saves the contents of the uploaded file.
98
89
/// </summary>
99
90
/// <param name="path">The path of the file to create.</param>
100
91
/// <param name="cancellationToken"></param>
101
- public async Task SaveAsAsync ( string path , CancellationToken cancellationToken )
92
+ public async Task SaveAsAsync ( string path , CancellationToken cancellationToken = default ( CancellationToken ) )
102
93
{
103
94
using ( var fileStream = File . Create ( path , DefaultBufferSize ) )
104
95
{
You can’t perform that action at this time.
0 commit comments