diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.Syntax.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.Syntax.cs
similarity index 96%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.Syntax.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.Syntax.cs
index e6338f55..7dac3342 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.Syntax.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.Syntax.cs
@@ -11,7 +11,7 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- partial class GetPixelOptions
+ partial class PixelOptions
{
///
/// Creates a instance for the PixelOptions property.
@@ -41,7 +41,7 @@ partial class ID2D1ShaderGenerator
//
// readonly ComputeSharp.D2D1.D2D1PixelOptions global::ComputeSharp.D2D1.__Internals.ID2D1Shader.PixelOptions => ;
return
- PropertyDeclaration(IdentifierName("ComputeSharp.D2D1.D2D1PixelOptions"), Identifier("PixelOptions"))
+ PropertyDeclaration(IdentifierName("ComputeSharp.D2D1.D2D1PixelOptions"), Identifier(nameof(PixelOptions)))
.WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifier(IdentifierName($"global::ComputeSharp.D2D1.__Internals.{nameof(ID2D1Shader)}")))
.AddModifiers(Token(SyntaxKind.ReadOnlyKeyword))
.WithExpressionBody(ArrowExpressionClause(pixelOptionsExpression))
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.cs
similarity index 89%
rename from src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.cs
rename to src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.cs
index 428cbe61..08907815 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreateGetPixelOptionsMethod.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.CreatePixelOptionsProperty.cs
@@ -7,9 +7,9 @@ namespace ComputeSharp.D2D1.SourceGenerators;
partial class ID2D1ShaderGenerator
{
///
- /// A helper with all logic to generate the GetPixelOptions method.
+ /// A helper with all logic to generate the PixelOptions property.
///
- private static partial class GetPixelOptions
+ private static partial class PixelOptions
{
///
/// Extracts the pixel options for the current shader.
diff --git a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
index 5f779817..220d70e1 100644
--- a/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
+++ b/src/ComputeSharp.D2D1.SourceGenerators/ID2D1ShaderGenerator.cs
@@ -139,8 +139,8 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
token.ThrowIfCancellationRequested();
- // Get the info for GetPixelOptions()
- GetPixelOptions.GetInfo(typeSymbol, out D2D1PixelOptions pixelOptions);
+ // Get the info for PixelOptions
+ PixelOptions.GetInfo(typeSymbol, out D2D1PixelOptions pixelOptions);
token.ThrowIfCancellationRequested();
@@ -415,18 +415,18 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
context.AddSource($"{item.Info.Hierarchy.FullyQualifiedMetadataName}.{nameof(InputDescriptions)}.g.cs", compilationUnit.GetText(Encoding.UTF8));
});
- // Get the GetPixelOptions() info (hierarchy and pixel options)
+ // Get the PixelOptions info (hierarchy and pixel options)
IncrementalValuesProvider<(HierarchyInfo Hierarchy, D2D1PixelOptions PixelOptions)> pixelOptionsInfo =
shaderInfoWithErrors
.Select(static (item, _) => (item.Hierarchy, item.PixelOptions));
- // Generate the GetPixelOptions() methods
+ // Generate the PixelOptions properties
context.RegisterSourceOutput(pixelOptionsInfo, static (context, item) =>
{
- PropertyDeclarationSyntax pixelOptionsProperty = GetPixelOptions.GetSyntax(item.PixelOptions);
+ PropertyDeclarationSyntax pixelOptionsProperty = PixelOptions.GetSyntax(item.PixelOptions);
CompilationUnitSyntax compilationUnit = GetCompilationUnitFromMember(item.Hierarchy, pixelOptionsProperty, canUseSkipLocalsInit: false);
- context.AddSource($"{item.Hierarchy.FullyQualifiedMetadataName}.{nameof(GetPixelOptions)}.g.cs", compilationUnit.GetText(Encoding.UTF8));
+ context.AddSource($"{item.Hierarchy.FullyQualifiedMetadataName}.{nameof(PixelOptions)}.g.cs", compilationUnit.GetText(Encoding.UTF8));
});
}
}
\ No newline at end of file