File tree 2 files changed +10
-7
lines changed
docs/samples/Microsoft.ML.Samples
2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 6
6
<SignAssembly >false</SignAssembly >
7
7
<PublicSign >false</PublicSign >
8
8
<RootNamespace >Samples</RootNamespace >
9
+ <StartupObject >Microsoft.ML.Samples.Program</StartupObject >
9
10
</PropertyGroup >
10
11
11
12
<ItemGroup >
Original file line number Diff line number Diff line change 1
1
using System ;
2
- using System . Collections . Generic ;
3
2
using System . Reflection ;
4
3
using Samples . Dynamic ;
5
4
6
5
namespace Microsoft . ML . Samples
7
6
{
8
- internal static class Program
7
+ public static class Program
9
8
{
10
- static void Main ( string [ ] args )
9
+ public static void Main ( string [ ] args )
11
10
{
12
- //DataViewEnumerable .Example();
11
+ CalculateFeatureContribution . Example ( ) ;
13
12
14
- // if (args[1 ] == "-runall")
13
+ if ( args . Length > 0 && args [ 0 ] == "-runall" )
15
14
RunAll ( ) ;
16
15
}
17
16
18
17
internal static void RunAll ( )
19
18
{
20
- List < Type > failures = new List < Type > ( ) ;
21
19
foreach ( var type in Assembly . GetExecutingAssembly ( ) . GetTypes ( ) )
22
20
{
23
21
var method = type . GetMethod ( "Example" , BindingFlags . NonPublic | BindingFlags . Public
@@ -31,8 +29,12 @@ internal static void RunAll()
31
29
}
32
30
catch ( Exception ex )
33
31
{
32
+ // Print the exception for debugging.
33
+ Console . Write ( type ) ;
34
34
Console . Write ( ex ) ;
35
- failures . Add ( type ) ;
35
+
36
+ // Throw to fail.
37
+ throw ex ;
36
38
}
37
39
}
38
40
}
You can’t perform that action at this time.
0 commit comments