Skip to content

Commit 14f5d4a

Browse files
committed
cleanup.
1 parent c1b1e14 commit 14f5d4a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<SignAssembly>false</SignAssembly>
77
<PublicSign>false</PublicSign>
88
<RootNamespace>Samples</RootNamespace>
9+
<StartupObject>Microsoft.ML.Samples.Program</StartupObject>
910
</PropertyGroup>
1011

1112
<ItemGroup>

docs/samples/Microsoft.ML.Samples/Program.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.Reflection;
43
using Samples.Dynamic;
54

65
namespace Microsoft.ML.Samples
76
{
8-
internal static class Program
7+
public static class Program
98
{
10-
static void Main(string[] args)
9+
public static void Main(string[] args)
1110
{
12-
//DataViewEnumerable.Example();
11+
CalculateFeatureContribution.Example();
1312

14-
//if (args[1] == "-runall")
13+
if (args.Length > 0 && args[0] == "-runall")
1514
RunAll();
1615
}
1716

1817
internal static void RunAll()
1918
{
20-
List<Type> failures = new List<Type>();
2119
foreach (var type in Assembly.GetExecutingAssembly().GetTypes())
2220
{
2321
var method = type.GetMethod("Example", BindingFlags.NonPublic | BindingFlags.Public
@@ -31,8 +29,12 @@ internal static void RunAll()
3129
}
3230
catch (Exception ex)
3331
{
32+
// Print the exception for debugging.
33+
Console.Write(type);
3434
Console.Write(ex);
35-
failures.Add(type);
35+
36+
// Throw to fail.
37+
throw ex;
3638
}
3739
}
3840
}

0 commit comments

Comments
 (0)