This repository was archived by the owner on Dec 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 84
netcoreapp2.0 #228
Merged
Merged
netcoreapp2.0 #228
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,7 +137,6 @@ public override void Write(byte[] buffer, int offset, int count) | |
} | ||
} | ||
|
||
#if NET46 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert |
||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, Object state) | ||
{ | ||
var tcs = new TaskCompletionSource<object>(state); | ||
|
@@ -184,10 +183,6 @@ public override void EndWrite(IAsyncResult asyncResult) | |
var task = (Task)asyncResult; | ||
task.GetAwaiter().GetResult(); | ||
} | ||
#elif NETSTANDARD1_3 | ||
#else | ||
#error target frameworks need to be updated | ||
#endif | ||
|
||
public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) | ||
{ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,6 @@ public async Task SendFileAsync_IsPassedToUnderlyingStream_WhenDisableResponseBu | |
Assert.Equal(File.ReadAllBytes(path), written); | ||
} | ||
|
||
#if NET46 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert |
||
[Theory] | ||
[InlineData(true)] | ||
[InlineData(false)] | ||
|
@@ -133,10 +132,6 @@ public void BeginWrite_IsPassedToUnderlyingStream_WhenDisableResponseBuffering(b | |
|
||
Assert.Equal(buffer, written); | ||
} | ||
#elif NETCOREAPP2_0 | ||
#else | ||
#error Target framework needs to be updated | ||
#endif | ||
|
||
private class MockResponseCompressionProvider: IResponseCompressionProvider | ||
{ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -505,16 +505,9 @@ public async Task TrickleWriteAndFlush_FlushesEachWrite() | |
|
||
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); | ||
|
||
#if NET46 // Flush not supported, compression disabled | ||
Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5)); | ||
Assert.Empty(response.Content.Headers.ContentEncoding); | ||
#elif NETCOREAPP2_0 // Flush supported, compression enabled | ||
IEnumerable<string> contentMD5 = null; | ||
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); | ||
Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); | ||
#else | ||
#error Target frameworks need to be updated. | ||
#endif | ||
|
||
var body = await response.Content.ReadAsStreamAsync(); | ||
|
||
|
@@ -570,16 +563,9 @@ public async Task TrickleWriteAndFlushAsync_FlushesEachWrite() | |
|
||
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); | ||
|
||
#if NET46 // Flush not supported, compression disabled | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this work? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Flush is supported on core |
||
Assert.NotNull(response.Headers.GetValues(HeaderNames.ContentMD5)); | ||
Assert.Empty(response.Content.Headers.ContentEncoding); | ||
#elif NETCOREAPP2_0 // Flush supported, compression enabled | ||
IEnumerable<string> contentMD5 = null; | ||
Assert.False(response.Headers.TryGetValues(HeaderNames.ContentMD5, out contentMD5)); | ||
Assert.Single(response.Content.Headers.ContentEncoding, "gzip"); | ||
#else | ||
#error Target framework needs to be updated | ||
#endif | ||
|
||
var body = await response.Content.ReadAsStreamAsync(); | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep these APIs