You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.5 KiB
63 lines
1.5 KiB
using Apewer;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Reflection;
|
|
|
|
namespace Apewer.Run
|
|
{
|
|
|
|
class Program
|
|
{
|
|
|
|
public static string[] Arguments = null;
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
// Console.WriteLine(NetworkUtility.Resolve2("www.baidu.com"));
|
|
|
|
// RunPublicClass(args);
|
|
|
|
// new Batch();
|
|
// new FileRenamer();
|
|
// new HashComputer();
|
|
|
|
Console.WriteLine("ended");
|
|
Console.ReadKey();
|
|
}
|
|
|
|
static void RunPublicClass(params string[] args)
|
|
{
|
|
Arguments = args;
|
|
foreach (var type in ClassUtility.GetTypes(Assembly.GetExecutingAssembly()))
|
|
{
|
|
if (type.Equals(typeof(Program))) continue;
|
|
if (!type.IsClass) continue;
|
|
if (!type.IsPublic) continue;
|
|
Console.Title = type.FullName;
|
|
Console.WriteLine("New " + type.FullName);
|
|
|
|
#if DEBUG
|
|
Activator.CreateInstance(type);
|
|
#else
|
|
try
|
|
{
|
|
Activator.CreateInstance(type);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
Console.WriteLine(ex.GetType().FullName);
|
|
Console.WriteLine(ex.ToString());
|
|
}
|
|
#endif
|
|
|
|
Console.WriteLine();
|
|
}
|
|
|
|
Console.WriteLine("end");
|
|
Console.ReadKey();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|