Table of Contents

Class ResourceProviderGetOptions

Namespace
FoundationaLLM.Common.Models.ResourceProviders
Assembly
FoundationaLLM.Common.dll

Provides options for resource provider get operations.

public class ResourceProviderGetOptions : ResourceProviderOperationOptionsBase
Inheritance
ResourceProviderGetOptions
Inherited Members
Extension Methods

Properties

IncludeActions

Gets or sets a value indicating whether to include actions in the response.

public bool IncludeActions { get; set; }

Property Value

bool

Remarks

If the value is set to true, for each resource, the response will include the authorizable actions assigned directly or indirectly to the resource.

IncludeRoles

Gets or sets a value indicating whether to include roles in the response.

public bool IncludeRoles { get; set; }

Property Value

bool

Remarks

If the value is set to true, for each resource, the response will include the roles assigned directly or indirectly to the resource.

LoadContent

Gets or sets a value indicating whether to load resource content (applicable only to resources that have content).

public bool LoadContent { get; set; }

Property Value

bool

Methods

FromQueryParams(Dictionary<string, string>, bool, bool)

Creates a new instance of the ResourceProviderGetOptions class by parsing option values from the specified query parameter dictionary.

public static ResourceProviderGetOptions FromQueryParams(Dictionary<string, string> queryParams, bool includeRolesDefault, bool includeActionsDefault)

Parameters

queryParams Dictionary<string, string>

A dictionary containing query parameter names and their corresponding values. Parameter names are expected to match option names such as "loadContent", "includeRoles", and "includeActions".

includeRolesDefault bool

The default value to use for the IncludeRoles option if it is not specified in the query parameters.

includeActionsDefault bool

The default value to use for the IncludeActions option if it is not specified in the query parameters.

Returns

ResourceProviderGetOptions

A ResourceProviderGetOptions instance populated with values parsed from the query parameters. If a parameter is missing or cannot be parsed, the corresponding option retains its default value.

Remarks

Boolean option values are parsed using case-insensitive string representations of true or false. Unrecognized or missing parameters are ignored.