#### [Abblix\.Oidc\.Server\.Mvc](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc 'index')
### [Abblix\.Oidc\.Server\.Mvc](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc 'Abblix\.Oidc\.Server\.Mvc')

## IUriResolver Interface

Provides functionality for generating URIs for controller actions and static content within an application\.

```csharp
public interface IUriResolver
```

Derived  
↳ [UriResolver](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.UriResolver 'Abblix\.Oidc\.Server\.Mvc\.UriResolver')
### Methods

## IUriResolver\.Action\(string, string, object\) Method {#Abblix.Oidc.Server.Mvc.IUriResolver.Action(string,string,object)}

Generates an absolute URI for a specified controller action, enabling action methods to be easily referenced
across the application for things like redirects or link generation\.

```csharp
System.Uri Action(string actionName, string controllerName, object? routeValues=null);
```
#### Parameters

###### `actionName` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Mvc.IUriResolver.Action(string,string,object).actionName}

The name of the action method within the controller\.

###### `controllerName` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Mvc.IUriResolver.Action(string,string,object).controllerName}

The name of the controller that contains the action method\.

###### `routeValues` [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') {#Abblix.Oidc.Server.Mvc.IUriResolver.Action(string,string,object).routeValues}

An object containing the route values for the action method\. These values are used to
            construct the query string and populate parameters in the route template\. This parameter is optional\.

#### Returns
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')  
An absolute URI as a [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') object for the specified action within the controller\.

### Example

```csharp
var uri = uriResolver.Action("Index", "Home", new { id = 42 });
// Result could be something like: "http://example.com/Home/Index?id=42"
```

## IUriResolver\.Content\(string\) Method {#Abblix.Oidc.Server.Mvc.IUriResolver.Content(string)}

Generates an absolute URI for a given content path\. This method is useful for creating links to static resources
stored within the application, such as images, CSS files, and JavaScript files\. It supports:
\- Application root\-relative paths using the '~' symbol \(e\.g\., "~/images/logo\.png"\)
\- Route template constants from [Path](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Path 'Abblix\.Oidc\.Server\.Mvc\.Path') class \(e\.g\., [Authorize](https://www.abblix.com/en/docs/api/abblix-oidc-server-mvc/Abblix.Oidc.Server.Mvc.Path#Abblix.Oidc.Server.Mvc.Path.Authorize 'Abblix\.Oidc\.Server\.Mvc\.Path\.Authorize')\)
\- Regular relative paths

```csharp
System.Uri Content(string path);
```
#### Parameters

###### `path` [System\.String](https://learn.microsoft.com/en-us/dotnet/api/system.string 'System\.String') {#Abblix.Oidc.Server.Mvc.IUriResolver.Content(string).path}

The path to the content\. This can be:
             \- A virtual path \(e\.g\., "~/images/logo\.png"\) indicating the application root
             \- A route template constant \(e\.g\., Path\.Authorize = "\[route:authorize?~/connect/authorize\]"\)
             \- A relative path from the current executing location

#### Returns
[System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri')  
An absolute URI as a [System\.Uri](https://learn.microsoft.com/en-us/dotnet/api/system.uri 'System\.Uri') object for the specified content path\.

### Example

```csharp
// Static content
var uri1 = uriResolver.Content("~/content/site.css");
// Result: "https://example.com/content/site.css"

// Route template constant (uses configured or default path)
var uri2 = uriResolver.Content(Path.Authorize);
// Result: "https://example.com/connect/authorize"
```
