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
64
64
public string MarshallingDeclaration ;
65
65
public string Declaration ;
66
66
}
67
+
68
+ public class ClassWithStubs
69
+ {
70
+ public string Name ;
71
+ }
67
72
}
Original file line number Diff line number Diff line change @@ -15,5 +15,6 @@ public class AssemblyClassTable
15
15
public bool IsInterop ;
16
16
17
17
public List < Class > Classes = new List < Class > ( ) ;
18
+ public List < ClassWithStubs > ClassesWithStubs = new List < ClassWithStubs > ( ) ;
18
19
}
19
20
}
Original file line number Diff line number Diff line change @@ -267,11 +267,11 @@ struct {{ClassName}}
267
267
268
268
{{ProjectName}}.cpp
269
269
{{#if IsInterop}}
270
- {{#each Classes }}
270
+ {{#each ClassesWithStubs }}
271
271
{{HeaderFileName}}_{{Name}}_mshl.cpp
272
272
{{HeaderFileName}}_{{Name}}.cpp{{/each}}
273
273
{{#else}}
274
- {{#each Classes }}
274
+ {{#each ClassesWithStubs }}
275
275
{{HeaderFileName}}_{{Name}}.cpp{{/each}}
276
276
{{/if}}
277
277
)
Original file line number Diff line number Diff line change 7
7
using Mustache ;
8
8
using nanoFramework . Tools . MetadataProcessor . Core . Extensions ;
9
9
using System ;
10
+ using System . Collections . Generic ;
10
11
using System . IO ;
11
12
using System . Linq ;
12
13
using System . Text ;
@@ -76,6 +77,8 @@ public void GenerateSkeleton()
76
77
77
78
private void GenerateStubs ( )
78
79
{
80
+ var generatedFiles = new List < string > ( ) ;
81
+
79
82
var classList = new AssemblyClassTable
80
83
{
81
84
AssemblyName = _tablesContext . AssemblyDefinition . Name . Name ,
@@ -235,6 +238,12 @@ private void GenerateStubs()
235
238
var output = generator . Render ( classStubs ) ;
236
239
headerFile . Write ( output ) ;
237
240
}
241
+
242
+ // add class to list of classes with stubs
243
+ classList . ClassesWithStubs . Add ( new ClassWithStubs ( )
244
+ {
245
+ Name = className
246
+ } ) ;
238
247
}
239
248
else
240
249
{
@@ -269,6 +278,12 @@ private void GenerateStubs()
269
278
var output = generator . Render ( classStubs ) ;
270
279
headerFile . Write ( output ) ;
271
280
}
281
+
282
+ // add class to list of classes with stubs
283
+ classList . ClassesWithStubs . Add ( new ClassWithStubs ( )
284
+ {
285
+ Name = className
286
+ } ) ;
272
287
}
273
288
}
274
289
}
You can’t perform that action at this time.
0 commit comments