Struct netcorehost::hostfxr::HostfxrContext[][src]

pub struct HostfxrContext<I> { /* fields omitted */ }
Expand description

State which hostfxr creates and maintains and represents a logical operation on the hosting components.

Implementations

Creates a new context from the given handle.

Safety

The context handle has to be match the context type I. If the context was initialized using initialize_for_dotnet_command_line I has to be InitializedForCommandLine. If the context was initialized using initialize_for_runtime_config I has to be InitializedForRuntimeConfig.

Gets the underlying handle to the hostfxr context.

Gets the underlying handle to the hostfxr context and consume this context.

Gets the runtime property value for the given key of this host context.

Gets the runtime property value for the given key of this host context.

Safety

The value string is owned by the host context. The lifetime of the buffer is only guaranteed until any of the below occur:

Sets the value of a runtime property for this host context.

Remove a runtime property for this host context.

Get all runtime properties for this host context.

Safety

The strings returned are owned by the host context. The lifetime of the buffers is only guaranteed until any of the below occur:

Get all runtime properties for this host context as owned strings.

Get all runtime properties for this host context as an iterator over borrowed key-value pairs.

Safety

The strings returned are owned by the host context. The lifetime of the buffers is only guaranteed until any of the below occur:

Get all runtime properties for this host context as an iterator over owned key-value pairs.

Get all runtime properties for this host context as an hashmap of borrowed strings.

Safety

The strings returned are owned by the host context. The lifetime of the buffers is only guaranteed until any of the below occur:

Get all runtime properties for this host context as an hashmap of owned strings.

Gets a typed delegate from the currently loaded CoreCLR or from a newly created one. You propably want to use get_delegate_loader or get_delegate_loader_for_assembly instead of this function if you want to load function pointers.

Remarks

If the context was initialized using initialize_for_runtime_config, then all delegate types are supported. If it was initialized using initialize_for_dotnet_command_line, then only the following delegate types are currently supported:

Gets a delegate loader for loading an assembly and contained function pointers.

Gets a delegate loader for loading function pointers of the assembly with the given path. The assembly will be loaded lazily when the first function pointer is loaded.

Closes an initialized host context.

This method is automatically called on drop, but can be explicitely called to handle errors during closing.

Load the dotnet runtime and run the application.

Return value

If the app was successfully run, the exit code of the application. Otherwise, the error code result.

Trait Implementations

Consume self without dropping it while dropping all of its contents normally.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.