-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for specifying extension methods from referenced assemblies
- Loading branch information
Showing
11 changed files
with
201 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace AsyncGenerator.TestCases | ||
{ | ||
public class FileResult | ||
{ | ||
|
||
} | ||
|
||
public interface IFileReader | ||
{ | ||
FileResult Read(string path); | ||
} | ||
|
||
public static class FileReaderExtensions | ||
{ | ||
public static Task<FileResult> ReadAsync(this IFileReader reader, string path) | ||
{ | ||
return Task.FromResult(new FileResult()); | ||
} | ||
} | ||
} |
This file contains 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
12 changes: 12 additions & 0 deletions
12
Source/AsyncGenerator.Tests/AsyncMethodFinder/Input/ExternalExtensionMethods.cs
This file contains 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using AsyncGenerator.TestCases; | ||
|
||
namespace AsyncGenerator.Tests.AsyncMethodFinder.Input | ||
{ | ||
public class ExternalExtensionMethods | ||
{ | ||
public void External(IFileReader reader) | ||
{ | ||
reader.Read("test"); | ||
} | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Source/AsyncGenerator.Tests/AsyncMethodFinder/Output/ExternalExtensionMethods.txt
This file contains 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by AsyncGenerator. | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
|
||
using AsyncGenerator.TestCases; | ||
|
||
namespace AsyncGenerator.Tests.AsyncMethodFinder.Input | ||
{ | ||
using System.Threading.Tasks; | ||
public partial class ExternalExtensionMethods | ||
{ | ||
public Task ExternalAsync(IFileReader reader) | ||
{ | ||
return reader.ReadAsync("test"); | ||
} | ||
} | ||
} |
This file contains 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 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