File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System ;
2- using System . Collections . Generic ;
1+ using System . Collections . Generic ;
32using System . Linq ;
3+ using Microsoft . CodeAnalysis ;
44using Microsoft . CodeAnalysis . CSharp ;
55using Microsoft . CodeAnalysis . CSharp . Syntax ;
66using SharpGen . Config ;
@@ -11,6 +11,21 @@ namespace SharpGen.Generator
1111{
1212 internal sealed class VtblGenerator : CodeGeneratorBase , ICodeGenerator < CsInterface , MemberDeclarationSyntax >
1313 {
14+ private static readonly SyntaxList < AttributeListSyntax > DebuggerTypeProxyAttribute = SingletonList (
15+ AttributeList (
16+ SingletonSeparatedList (
17+ Attribute (
18+ ParseName ( "System.Diagnostics.DebuggerTypeProxy" ) ,
19+ AttributeArgumentList (
20+ SingletonSeparatedList (
21+ AttributeArgument ( TypeOfExpression ( IdentifierName ( "CppObjectVtblDebugView" ) ) )
22+ )
23+ )
24+ )
25+ )
26+ )
27+ ) ;
28+
1429 public MemberDeclarationSyntax GenerateCode ( CsInterface csElement )
1530 {
1631 var vtblClassName = csElement . VtblName . Split ( '.' ) . Last ( ) ;
@@ -105,6 +120,7 @@ StatementSyntax MethodBuilder(PlatformDetectionType platform)
105120 ModelUtilities . VisibilityToTokenList ( vtblVisibility , SyntaxKind . UnsafeKeyword ,
106121 SyntaxKind . PartialKeyword )
107122 )
123+ . WithAttributeLists ( DebuggerTypeProxyAttribute )
108124 . WithBaseList (
109125 BaseList (
110126 SingletonSeparatedList < BaseTypeSyntax > (
You can’t perform that action at this time.
0 commit comments