Add NotAccessibleGeneratedShaderDescriptorAttributeTargetAnalyzerBase

このコミットが含まれているのは:
Sergio Pedri committed 2023-10-19 11:55:40 +02:00
1 親 d5ddf8bf1e
コミット e85c8f870a
14ファイル変更
+182 -5

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

+6
ファイルの表示
@@ -43,6 +43,12 @@ public sealed partial class D2DPixelShaderDescriptorGenerator : IIncrementalGene
return default;
}
// Immediately bail if the target type doesn't have internal accessibility
if (!typeSymbol.IsAccessibleFromContainingAssembly(context.SemanticModel.Compilation))
{
return default;
}
// Check that the shader implements the ID2D1PixelShader interface
if (!typeSymbol.HasInterfaceWithType(context.SemanticModel.Compilation.GetTypeByMetadataName("ComputeSharp.D2D1.ID2D1PixelShader")!))
{