-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
53 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using SpeedyGenerators; | ||
|
||
namespace ConsoleTest; | ||
|
||
internal partial class FileScopedClass | ||
{ | ||
[MakeProperty("MyProperty")] | ||
private int _myField; | ||
} |
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,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using SpeedyGenerators; | ||
|
||
namespace LibraryTest; | ||
|
||
internal partial class ClassOutsideNamespace | ||
{ | ||
[MakeProperty("MyProperty")] | ||
private int _myField1; | ||
} | ||
|
||
file partial class FileScopedClass | ||
{ | ||
// Cannot use source generators with file scoped classes because | ||
// - source generators must create a separate source file | ||
// - file scoped classes must reside in the same file | ||
//[MakeProperty("YourProperty")] | ||
//protected int _yourField1; | ||
} | ||
|
||
// file scoped partial classes can be defined only in the same file | ||
file partial class FileSCopedClass | ||
{ | ||
} |
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