xtd 0.2.0
Loading...
Searching...
No Matches
process_start_info.h
Go to the documentation of this file.
1
4#pragma once
5#include <map>
6#include <memory>
7#include <string>
8#include "../collections/generic/list.h"
9#include "../core_export.h"
10#include "../object.h"
11#include "../security/secure_string.h"
13
15namespace xtd {
17 namespace diagnostics {
40 public:
42
47 process_start_info() = default;
48
53 explicit process_start_info(const xtd::string& file_name);
54
60 process_start_info(const xtd::string& file_name, const xtd::string& arguments);
61
64 process_start_info& operator =(const process_start_info&) = default;
67
69
73 const xtd::string& arguments() const noexcept;
77 process_start_info& arguments(const xtd::string& value) noexcept;
78
82 bool create_no_window() const noexcept;
87 process_start_info& create_no_window(bool value) noexcept;
88
91 const xtd::string& domain() const noexcept;
95 process_start_info& domain(const xtd::string& value) noexcept;
96
101 const std::map<xtd::string, xtd::string>& environment() const noexcept;
106 std::map<xtd::string, xtd::string>& environment() noexcept;
107
111 const std::map<xtd::string, xtd::string>& environment_variables() const noexcept;
115 std::map<xtd::string, xtd::string>& environment_variables() noexcept;
116
120 bool error_dialog() const noexcept;
125 process_start_info& error_dialog(bool value) noexcept;
126
130 intptr error_dialog_parent_handle() const noexcept;
135 process_start_info& error_dialog_parent_handle(intptr value) noexcept;
136
141 const xtd::string& file_name() const noexcept;
147 process_start_info& file_name(const xtd::string& value) noexcept;
149 process_start_info& file_name(const char* value) noexcept;
151
156 bool load_user_profile() const noexcept;
162 process_start_info& load_user_profile(bool value) noexcept;
163
171 const xtd::security::secure_string& password() const noexcept;
180 process_start_info& password(const xtd::security::secure_string& value) noexcept;
181
184 xtd::string password_in_clear_text() const noexcept;
188 process_start_info& password_in_clear_text(const xtd::string& value) noexcept;
189
295 bool redirect_standard_error() const noexcept;
402 process_start_info& redirect_standard_error(bool value) noexcept;
403
465 bool redirect_standard_input() const noexcept;
528 process_start_info& redirect_standard_input(bool value) noexcept;
529
649 bool redirect_standard_output() const noexcept;
770 process_start_info& redirect_standard_output(bool value) noexcept;
771
777 const xtd::string& user_name() const noexcept;
784 process_start_info& user_name(const xtd::string& value) noexcept;
785
794 bool use_shell_execute() const noexcept;
804 process_start_info& use_shell_execute(bool value) noexcept;
805
810 xtd::string verb() const noexcept;
816 process_start_info& verb(const xtd::string& value) noexcept;
817
822 xtd::collections::generic::list<xtd::string> verbs() const;
823
827 xtd::diagnostics::process_window_style window_style() const noexcept;
832 process_start_info& window_style(xtd::diagnostics::process_window_style value) noexcept;
833
842 const xtd::string& working_directory() const noexcept;
852 process_start_info& working_directory(const xtd::string& value) noexcept;
854
855 private:
856 xtd::string file_name_;
857 xtd::string arguments_;
858 bool create_no_window_ = false;
859 xtd::string domain_;
860 bool error_dialog_ = false;
861 intptr error_dialog_parent_handle_ = 0;
862 std::map<xtd::string, xtd::string> environment_variables_;
863 bool load_user_profile_ = false;
864 xtd::security::secure_string password_;
865 bool redirect_standard_error_ = false;
866 bool redirect_standard_input_ = false;
867 bool redirect_standard_output_ = false;
868 xtd::string user_name_;
869 bool use_shell_execute_ = true;
870 xtd::string verb_;
871 xtd::diagnostics::process_window_style window_style_ = xtd::diagnostics::process_window_style::normal;
872 xtd::string working_directory_;
873 };
874 }
875}
Represents text as a sequence of character units.
Definition basic_string.h:79
Specifies a set of values that are used when you start a process.
Definition process_start_info.h:39
process_start_info(const xtd::string &file_name)
Initializes a new instance of the xtd::diagnostics::process_start_info class and specifies a file nam...
process_start_info(const xtd::string &file_name, const xtd::string &arguments)
Initializes a new instance of the xtd::diagnostics::process_start_info class, specifies an applicatio...
const xtd::string & arguments() const noexcept
Gets the set of command-line arguments to use when starting the application.
process_start_info()=default
Initializes a new instance of the xtd::diagnostics::process_start_info class without specifying a fil...
The environment class.
Definition environment.h:66
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define core_export_
Define shared library export.
Definition core_export.h:13
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
process_window_style
Specified how a new window should appear when the system starts a process.
Definition process_window_style.h:24
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::diagnostics::process_window_style enum class.