1717 "Runtime" ,
1818 "Assembly" ,
1919 "RuntimeInfo" ,
20+ "DotnetCoreRuntimeSpec" ,
2021]
2122
2223
2324def get_mono (
2425 * ,
25- domain : Optional [str ] = None ,
26+ # domain: Optional[str] = None,
2627 config_file : Optional [StrOrPath ] = None ,
2728 global_config_file : Optional [StrOrPath ] = None ,
2829 libmono : Optional [StrOrPath ] = None ,
2930 sgen : bool = True ,
3031 debug : bool = False ,
3132 jit_options : Optional [Sequence [str ]] = None ,
3233) -> Runtime :
34+ """Get a Mono runtime instance
35+
36+ :param config_file:
37+ Path to the domain configuration file
38+ :param global_config_file:
39+ Path to the global configuration file to load (defaults to, e.g.,
40+ ``/etc/mono/config``)
41+ :param libmono:
42+ Path to the Mono runtime dll/so/dylib. If this is not specified, we try
43+ to discover a globally installed instance using :py:func:`find_libmono`
44+ :param sgen:
45+ If ``libmono`` is not specified, this is passed to
46+ :py:func:`find_libmono`
47+ :param debug:
48+ Whether to initialise Mono debugging
49+ :param jit_options:
50+ "Command line options" passed to Mono's ``mono_jit_parse_options``
51+ """
3352 from .mono import Mono
3453
3554 libmono = _maybe_path (libmono )
3655 if libmono is None :
37- libmono = find_libmono (sgen )
56+ libmono = find_libmono (sgen = sgen )
3857
3958 impl = Mono (
40- domain = domain ,
59+ # domain=domain,
4160 debug = debug ,
4261 jit_options = jit_options ,
4362 config_file = _maybe_path (config_file ),
@@ -54,6 +73,27 @@ def get_coreclr(
5473 properties : Optional [Dict [str , str ]] = None ,
5574 runtime_spec : Optional [DotnetCoreRuntimeSpec ] = None ,
5675) -> Runtime :
76+ """Get a CoreCLR (.NET Core) runtime instance
77+
78+ The returned ``DotnetCoreRuntime`` also acts as a mapping of the config
79+ properties. They can be retrieved using the index operator and can be
80+ written until the runtime is initialized. The runtime is initialized when
81+ the first function object is retrieved.
82+
83+ :param runtime_config:
84+ Pass to a ``runtimeconfig.json`` as generated by
85+ ``dotnet publish``. If this parameter is not given, a temporary runtime
86+ config will be generated.
87+ :param dotnet_root:
88+ The root directory of the .NET Core installation. If this is not
89+ specified, we try to discover it using :py:func:`find_dotnet_root`.
90+ :param properties:
91+ Additional runtime properties. These can also be passed using the
92+ ``configProperties`` section in the runtime config.
93+ :param runtime_spec:
94+ If the ``runtime_config`` is not specified, the concrete runtime to use
95+ can be controlled by passing this parameter. Possible values can be
96+ retrieved using :py:func:`find_runtimes`."""
5797 from .hostfxr import DotnetCoreRuntime
5898
5999 dotnet_root = _maybe_path (dotnet_root )
@@ -91,11 +131,21 @@ def get_coreclr(
91131
92132
93133def get_netfx (
94- * , name : Optional [str ] = None , config_file : Optional [StrOrPath ] = None
134+ * , domain : Optional [str ] = None , config_file : Optional [StrOrPath ] = None
95135) -> Runtime :
136+ """Get a .NET Framework runtime instance
137+
138+ :param domain:
139+ Name of the domain to create. If no value is passed, assemblies will be
140+ loaded into the root domain.
141+ :param config_file:
142+ Configuration file to use to initialize the ``AppDomain``. This will
143+ only be used for non-root-domains as we can not control the
144+ configuration of the implicitly loaded root domain.
145+ """
96146 from .netfx import NetFx
97147
98- impl = NetFx (name = name , config_file = _maybe_path (config_file ))
148+ impl = NetFx (domain = domain , config_file = _maybe_path (config_file ))
99149 return impl
100150
101151
0 commit comments