Exclude explicit interface implementations in shaders

このコミットが含まれているのは:
Sergio Pedri committed 2022-04-29 12:58:19 +02:00
1 親 44c6958530
コミット 3bf77618e4
2ファイル変更
+24

検索条件に一致するファイルはありません

@@ -240,6 +240,12 @@ partial class ID2D1ShaderGenerator
methodDeclarationSymbol.TypeParameters.Length == 0 &&
methodDeclarationSymbol.Parameters.Length == 0;
// Except for the entry point, ignore explicit interface implementations
if (!isShaderEntryPoint && !methodDeclarationSymbol.ExplicitInterfaceImplementations.IsDefaultOrEmpty)
{
continue;
}
// Create the source rewriter for the current method
ShaderSourceRewriter shaderSourceRewriter = new(
structDeclarationSymbol,
@@ -374,6 +380,12 @@ partial class ID2D1ShaderGenerator
{
foreach (var propertySymbol in structDeclarationSymbol.GetMembers().OfType<IPropertySymbol>())
{
// Ignore explicit interface implementations
if (!propertySymbol.ExplicitInterfaceImplementations.IsDefaultOrEmpty)
{
return;
}
diagnostics.Add(DiagnosticDescriptors.PropertyDeclaration, propertySymbol);
}
}
+12
ファイルの表示
@@ -354,6 +354,12 @@ partial class IShaderGenerator
methodDeclarationSymbol.TypeParameters.Length == 0 &&
methodDeclarationSymbol.Parameters.Length == 0);
// Except for the entry point, ignore explicit interface implementations
if (!isShaderEntryPoint && !methodDeclarationSymbol.ExplicitInterfaceImplementations.IsDefaultOrEmpty)
{
continue;
}
// Create the source rewriter for the current method
ShaderSourceRewriter shaderSourceRewriter = new(
structDeclarationSymbol,
@@ -495,6 +501,12 @@ partial class IShaderGenerator
{
foreach (var propertySymbol in structDeclarationSymbol.GetMembers().OfType<IPropertySymbol>())
{
// Ignore explicit interface implementations
if (!propertySymbol.ExplicitInterfaceImplementations.IsDefaultOrEmpty)
{
return;
}
diagnostics.Add(DiagnosticDescriptors.PropertyDeclaration, propertySymbol);
}
}