Simplify creating source generator builder types
このコミットが含まれているのは:
1 親
26934553f6
コミット
7506cab338
27ファイル変更
+58
-88
検索条件に一致するファイルはありません
+7
-7
@@ -105,8 +105,8 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
out ImmutableArray<(string Name, string HlslType)> valueFields,
|
||||
out ImmutableArray<(string Name, string HlslType, int Index)> resourceTextureFields)
|
||||
{
|
||||
using ImmutableArrayBuilder<(string, string)> values = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string, int)> resourceTextures = ImmutableArrayBuilder<(string, string, int)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string)> values = new();
|
||||
using ImmutableArrayBuilder<(string, string, int)> resourceTextures = new();
|
||||
|
||||
foreach (IFieldSymbol fieldSymbol in structDeclarationSymbol.GetMembers().OfType<IFieldSymbol>())
|
||||
{
|
||||
@@ -198,7 +198,7 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
IDictionary<IFieldSymbol, string> constantDefinitions,
|
||||
out bool needsD2D1RequiresScenePosition)
|
||||
{
|
||||
using ImmutableArrayBuilder<(string, string, string?)> builder = ImmutableArrayBuilder<(string, string, string?)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string, string?)> builder = new();
|
||||
|
||||
needsD2D1RequiresScenePosition = false;
|
||||
|
||||
@@ -279,7 +279,7 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
|
||||
string? entryPoint = null;
|
||||
|
||||
using ImmutableArrayBuilder<(string, string)> methods = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string)> methods = new();
|
||||
|
||||
needsD2D1RequiresScenePosition = false;
|
||||
|
||||
@@ -357,7 +357,7 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
/// <returns>A sequence of discovered constants to declare in the shader.</returns>
|
||||
private static ImmutableArray<(string Name, string Value)> GetDefinedConstants(IReadOnlyDictionary<IFieldSymbol, string> constantDefinitions)
|
||||
{
|
||||
using ImmutableArrayBuilder<(string, string)> builder = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string)> builder = new();
|
||||
|
||||
foreach (KeyValuePair<IFieldSymbol, string> constant in constantDefinitions)
|
||||
{
|
||||
@@ -384,7 +384,7 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
IEnumerable<INamedTypeSymbol> types,
|
||||
IReadOnlyDictionary<IMethodSymbol, MethodDeclarationSyntax> instanceMethods)
|
||||
{
|
||||
using ImmutableArrayBuilder<(string, string)> builder = ImmutableArrayBuilder<(string, string)>.Rent();
|
||||
using ImmutableArrayBuilder<(string, string)> builder = new();
|
||||
|
||||
IReadOnlyCollection<INamedTypeSymbol> invalidTypes;
|
||||
|
||||
@@ -526,7 +526,7 @@ partial class D2DPixelShaderDescriptorGenerator
|
||||
ImmutableArray<int> inputComplexIndices,
|
||||
bool requiresScenePosition)
|
||||
{
|
||||
using ImmutableArrayBuilder<char> hlslBuilder = ImmutableArrayBuilder<char>.Rent();
|
||||
using ImmutableArrayBuilder<char> hlslBuilder = new();
|
||||
|
||||
void AppendLF()
|
||||
{
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする