-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Program.cs
30 lines (26 loc) · 857 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Reflection;
using Samples.Dynamic;
namespace Microsoft.ML.Samples
{
public static class Program
{
public static void Main(string[] args) => RunAll();
internal static void RunAll()
{
int samples = 0;
var types = Assembly.GetExecutingAssembly().GetTypes();
foreach (var type in types)
{
var sample = type.GetMethod("Example", BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy);
if (sample != null)
{
Console.WriteLine(type.Name);
sample.Invoke(null, null);
samples++;
}
}
Console.WriteLine("Number of samples that ran without any exception: " + samples);
}
}
}