减少TraceItem数据量较大时的性能浪费
智能大石头 authored at 2024-10-22 08:41:14
870.00 B
Stardust
using System.Collections;
using System.Diagnostics;

Console.WriteLine("TestC启动,PID={0}", Process.GetCurrentProcess().Id);
Console.WriteLine("测试参数:{0}", String.Join(',', args));

Console.WriteLine("GetFullPath:\t{0}", Path.GetFullPath("."));
Console.WriteLine("CurrentDirectory:\t{0}", Environment.CurrentDirectory);
Console.WriteLine("BaseDirectory:\t{0}", AppDomain.CurrentDomain.BaseDirectory);
Console.WriteLine("BasePath:\t{0}", Environment.GetEnvironmentVariable("BasePath"));

var envs = new[] { "BasePath", "star" };
Console.WriteLine("环境变量:");
foreach (DictionaryEntry item in Environment.GetEnvironmentVariables())
{
    if (envs.Contains(item.Key))
        Console.WriteLine("{0}:\t{1}", item.Key, item.Value);
}

Console.WriteLine("TestC OK!");
//Console.ReadKey();
Thread.Sleep(15_000);
Console.WriteLine("Auto Exist!");