Microsoft.Web.Administration.ProcessExtensions.GetCommandLine C# (CSharp) Метод

GetCommandLine() публичный статический Метод

public static GetCommandLine ( this process ) : string
process this
Результат string
        public static string GetCommandLine(this Process process)
        {
            using (var searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id))
            {
                foreach (var @object in searcher.Get())
                {
                    return @object["CommandLine"].ToString();
                }
            }

            return string.Empty;
        }
    }
ProcessExtensions