From 482049ad9c6b84a45e291a30f7ac7308bce17e76 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 20 Sep 2022 04:08:11 -0500 Subject: [PATCH] Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h (#75860) * Add definition of hostfxr_get_dotnet_environment_info_fn to hostfxr.h. * Move doc for hostfxr_get_dotnet_environment_info into hostfxr.h. --- src/native/corehost/fxr/hostfxr.cpp | 35 ------------------------ src/native/corehost/hostfxr.h | 41 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/src/native/corehost/fxr/hostfxr.cpp b/src/native/corehost/fxr/hostfxr.cpp index 96f8b047611..40e20f0ad10 100644 --- a/src/native/corehost/fxr/hostfxr.cpp +++ b/src/native/corehost/fxr/hostfxr.cpp @@ -344,41 +344,6 @@ SHARED_API int32_t HOSTFXR_CALLTYPE hostfxr_get_available_sdks( return StatusCode::Success; } -// -// Returns available SDKs and frameworks. -// -// Resolves the existing SDKs and frameworks from a dotnet root directory (if -// any), or the global default location. If multi-level lookup is enabled and -// the dotnet root location is different than the global location, the SDKs and -// frameworks will be enumerated from both locations. -// -// The SDKs are sorted in ascending order by version, multi-level lookup -// locations are put before private ones. -// -// The frameworks are sorted in ascending order by name followed by version, -// multi-level lookup locations are put before private ones. -// -// Parameters: -// dotnet_root -// The path to a directory containing a dotnet executable. -// -// reserved -// Reserved for future parameters. -// -// result -// Callback invoke to return the list of SDKs and frameworks. -// Structs and their elements are valid for the duration of the call. -// -// result_context -// Additional context passed to the result callback. -// -// Return value: -// 0 on success, otherwise failure. -// -// String encoding: -// Windows - UTF-16 (pal::char_t is 2 byte wchar_t) -// Unix - UTF-8 (pal::char_t is 1 byte char) -// SHARED_API int32_t HOSTFXR_CALLTYPE hostfxr_get_dotnet_environment_info( const pal::char_t* dotnet_root, void* reserved, diff --git a/src/native/corehost/hostfxr.h b/src/native/corehost/hostfxr.h index 591a8ebbea5..0eb54aa4427 100644 --- a/src/native/corehost/hostfxr.h +++ b/src/native/corehost/hostfxr.h @@ -320,4 +320,45 @@ struct hostfxr_dotnet_environment_info const struct hostfxr_dotnet_environment_framework_info* frameworks; }; +// +// Returns available SDKs and frameworks. +// +// Resolves the existing SDKs and frameworks from a dotnet root directory (if +// any), or the global default location. If multi-level lookup is enabled and +// the dotnet root location is different than the global location, the SDKs and +// frameworks will be enumerated from both locations. +// +// The SDKs are sorted in ascending order by version, multi-level lookup +// locations are put before private ones. +// +// The frameworks are sorted in ascending order by name followed by version, +// multi-level lookup locations are put before private ones. +// +// Parameters: +// dotnet_root +// The path to a directory containing a dotnet executable. +// +// reserved +// Reserved for future parameters. +// +// result +// Callback invoke to return the list of SDKs and frameworks. +// Structs and their elements are valid for the duration of the call. +// +// result_context +// Additional context passed to the result callback. +// +// Return value: +// 0 on success, otherwise failure. +// +// String encoding: +// Windows - UTF-16 (pal::char_t is 2 byte wchar_t) +// Unix - UTF-8 (pal::char_t is 1 byte char) +// +typedef int32_t(HOSTFXR_CALLTYPE* hostfxr_get_dotnet_environment_info_fn)( + const char_t* dotnet_root, + void* reserved, + hostfxr_get_dotnet_environment_info_result_fn result, + void* result_context); + #endif //__HOSTFXR_H__ -- GitLab