Пример #1
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("The process is:");
            sb.AppendLine(Process.ToString());
            if (!GlobalEnv.IsEmpty())
            {
                sb.AppendLine();
                sb.AppendLine("The environment is:");
                sb.AppendLine(GlobalEnv.ToString());
            }
            return(sb.ToString());
        }
Пример #2
0
        public override string GetID()
        {
            if (ConfigID == null)
            {
                if (GlobalEnv.IsEmpty())
                {
                    ConfigID = Process.ProcessID;
                }
                else
                {
                    ConfigID = GlobalEnv.GetID(Process.ProcessID);
                }
            }

            //if we can make sure ConfigID is not changed, we can calculate one time only
            System.Diagnostics.Debug.Assert(ConfigID == Process.ProcessID || ConfigID == GlobalEnv.GetID(Process.ProcessID));

            return(ConfigID);
        }