本文整理汇总了C#中Program.Main方法的典型用法代码示例。如果您正苦于以下问题:C# Program.Main方法的具体用法?C# Program.Main怎么用?C# Program.Main使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Program
的用法示例。
在下文中一共展示了Program.Main方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
private static void Main(string[] argv)
{
Console.WriteLine(argv);
Console.WriteLine("Hello from Test World!");
try
{
RunNeoTests();
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
try
{
RunScenarioTests();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
try
{
RunAggregatorTests();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
Program program = new Program();
program.Main();
Console.WriteLine("So Long from Test World");
}
示例2: AddUserSecrets_With_An_Existing_Secret_File
public void AddUserSecrets_With_An_Existing_Secret_File()
{
string userSecretsId;
var projectPath = UserSecretHelper.GetTempSecretProject(out userSecretsId);
var logger = new TestLogger(_runtimeEnv);
var secretManager = new Program(_runtimeEnv) { Logger = logger };
secretManager.Main(new string[] { "set", "Facebook:AppSecret", "value1", "-p", projectPath });
var builder = new ConfigurationBuilder().SetBasePath(projectPath).AddUserSecrets();
var configuration = builder.Build();
Assert.Equal("value1", configuration["Facebook:AppSecret"]);
UserSecretHelper.DeleteTempSecretProject(projectPath);
}
示例3: Main
static void Main(string[] args)
{
Program _P = new Program();
_P.Main();
}
示例4: Main
static void Main(string[] args)
{
Program p1 = new Program();
p1.Main();
}
示例5: Main
public static int Main(string[] args)
{
if (args.Length == 0)
{
outwriter.WriteLine(" Please provide filename to sort");
return 1;
}
IFileWrapper input = new StreamWrapper(args[0]);
ISort sortImpl = new ArraySorter();
TextWriter output = Console.Out;
Program app = new Program(input, sortImpl, output);
return app.Main();
}
示例6: Start
void Start () {
Program program = new Program();
program.Main(personPrefab, pathPrefab);
}