-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore indexers from row types in source generator
- Loading branch information
Showing
3 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...napshotTest/Snapshots/G.PropertyType_ClassWithIndexer#MyNamespace.MyContext.g.verified.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,35 @@ | ||
//HintName: MyNamespace.MyContext.g.cs | ||
// <auto-generated /> | ||
#nullable enable | ||
using SpreadCheetah; | ||
using SpreadCheetah.SourceGeneration; | ||
using SpreadCheetah.Styling; | ||
using System; | ||
using System.Buffers; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
namespace MyNamespace | ||
{ | ||
public partial class MyContext | ||
{ | ||
private static MyContext? _default; | ||
public static MyContext Default => _default ??= new MyContext(); | ||
|
||
public MyContext() | ||
{ | ||
} | ||
|
||
private WorksheetRowTypeInfo<MyNamespace.MyClass>? _MyClass; | ||
public WorksheetRowTypeInfo<MyNamespace.MyClass> MyClass => _MyClass | ||
??= EmptyWorksheetRowContext.CreateTypeInfo<MyNamespace.MyClass>(); | ||
|
||
private static DataCell ConstructTruncatedDataCell(string? value, int truncateLength) | ||
{ | ||
return value is null || value.Length <= truncateLength | ||
? new DataCell(value) | ||
: new DataCell(value.AsMemory(0, truncateLength)); | ||
} | ||
} | ||
} |
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