Skip to content

Commit 0344538

Browse files
committed
CQ: Add interface for class
1 parent 58c9adb commit 0344538

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Files.Core.SourceGenerator/Generators/RealTimeLayoutGenerator.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ private static string GenerateClass(string namespaceName, string className, Spec
121121
// Class declaration
122122
var classDeclaration = SyntaxFactory.ClassDeclaration(className)
123123
.AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword), SyntaxFactory.Token(SyntaxKind.PartialKeyword))
124+
.AddBaseListTypes(SyntaxFactory.SimpleBaseType(SyntaxFactory.ParseTypeName(
125+
type is SpecificationType.Window ? SpecificationWindowName : SpecificationControlName)))
124126
.AddMembers(fieldDeclaration, initializeContentLayoutMethod, updateContentLayoutMethod)
125127
.AddAttributeLists(SourceGeneratorHelper.GetAttributeForField(nameof(RealTimeLayoutGenerator)));
126128

0 commit comments

Comments
 (0)