public static ModelDescriptor ToRecordDescriptor(this ClassDeclarationSyntax typeDeclaration, ImmutableArray <TemplateDescriptor> templateDescriptors) { return(new ModelDescriptor( typeDeclaration.GetTypeSyntax().WithoutTrivia(), typeDeclaration.Identifier.WithoutTrivia(), typeDeclaration.GetEntries(templateDescriptors), typeDeclaration.WithoutTrivia())); }