File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed
source/MetadataProcessor.Core Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -64,4 +64,9 @@ public class ParameterDeclaration
6464 public string MarshallingDeclaration ;
6565 public string Declaration ;
6666 }
67+
68+ public class ClassWithStubs
69+ {
70+ public string Name ;
71+ }
6772}
Original file line number Diff line number Diff line change @@ -15,5 +15,6 @@ public class AssemblyClassTable
1515 public bool IsInterop ;
1616
1717 public List < Class > Classes = new List < Class > ( ) ;
18+ public List < ClassWithStubs > ClassesWithStubs = new List < ClassWithStubs > ( ) ;
1819 }
1920}
Original file line number Diff line number Diff line change @@ -267,11 +267,11 @@ struct {{ClassName}}
267267
268268 {{ProjectName}}.cpp
269269{{#if IsInterop}}
270- {{#each Classes }}
270+ {{#each ClassesWithStubs }}
271271 {{HeaderFileName}}_{{Name}}_mshl.cpp
272272 {{HeaderFileName}}_{{Name}}.cpp{{/each}}
273273{{#else}}
274- {{#each Classes }}
274+ {{#each ClassesWithStubs }}
275275 {{HeaderFileName}}_{{Name}}.cpp{{/each}}
276276{{/if}}
277277)
Original file line number Diff line number Diff line change 77using Mustache ;
88using nanoFramework . Tools . MetadataProcessor . Core . Extensions ;
99using System ;
10+ using System . Collections . Generic ;
1011using System . IO ;
1112using System . Linq ;
1213using System . Text ;
@@ -76,6 +77,8 @@ public void GenerateSkeleton()
7677
7778 private void GenerateStubs ( )
7879 {
80+ var generatedFiles = new List < string > ( ) ;
81+
7982 var classList = new AssemblyClassTable
8083 {
8184 AssemblyName = _tablesContext . AssemblyDefinition . Name . Name ,
@@ -235,6 +238,12 @@ private void GenerateStubs()
235238 var output = generator . Render ( classStubs ) ;
236239 headerFile . Write ( output ) ;
237240 }
241+
242+ // add class to list of classes with stubs
243+ classList . ClassesWithStubs . Add ( new ClassWithStubs ( )
244+ {
245+ Name = className
246+ } ) ;
238247 }
239248 else
240249 {
@@ -269,6 +278,12 @@ private void GenerateStubs()
269278 var output = generator . Render ( classStubs ) ;
270279 headerFile . Write ( output ) ;
271280 }
281+
282+ // add class to list of classes with stubs
283+ classList . ClassesWithStubs . Add ( new ClassWithStubs ( )
284+ {
285+ Name = className
286+ } ) ;
272287 }
273288 }
274289 }
You can’t perform that action at this time.
0 commit comments