> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SuperOffice.WebApi.ProgressListener

# \<a id="SuperOffice\_WebApi\_ProgressListener">\</a> Class ProgressListener

Namespace: [SuperOffice.WebApi](SuperOffice.WebApi.md)\
Assembly: SuperOffice.WebApi.dll

Default ProgressListener implementation with delegates for event callbacks.

```csharp theme={null}
public class ProgressListener : IProgressListener
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ←
[ProgressListener](SuperOffice.WebApi.ProgressListener.md)

#### Implements

[IProgressListener](SuperOffice.WebApi.IProgressListener.md)

#### Inherited Members

[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring),
[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)),
[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)),
[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals),
[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode),
[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype),
[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone)

## Constructors

### \<a id="SuperOffice\_WebApi\_ProgressListener\_\_ctor">\</a> ProgressListener()

```csharp theme={null}
public ProgressListener()
```

### \<a id="SuperOffice\_WebApi\_ProgressListener\_\_ctor\_System\_Action\_System\_String\_System\_Single\_\_System\_Action\_System\_String\_System\_Exception\_\_">\</a> ProgressListener(Action\<string, float\&gt;, Action\<string, Exception\&gt;)

```csharp theme={null}
public ProgressListener(Action<string, float> onProgress, Action<string, Exception> onError)
```

#### Parameters

`onProgress` [Action](https://learn.microsoft.com/dotnet/api/system.action-2)\<[string](https://learn.microsoft.com/dotnet/api/system.string), [float](https://learn.microsoft.com/dotnet/api/system.single)\&gt;

`onError` [Action](https://learn.microsoft.com/dotnet/api/system.action-2)\<[string](https://learn.microsoft.com/dotnet/api/system.string), [Exception](https://learn.microsoft.com/dotnet/api/system.exception)\&gt;

## Properties

### \<a id="SuperOffice\_WebApi\_ProgressListener\_OnErrorDelegate">\</a> OnErrorDelegate

Triggered if request fails.

```csharp theme={null}
public Action<string, Exception> OnErrorDelegate { get; set; }
```

#### Property Value

[Action](https://learn.microsoft.com/dotnet/api/system.action-2)\<[string](https://learn.microsoft.com/dotnet/api/system.string), [Exception](https://learn.microsoft.com/dotnet/api/system.exception)\&gt;

### \<a id="SuperOffice\_WebApi\_ProgressListener\_OnProgressDelegate">\</a> OnProgressDelegate

Triggered when request has made progress.

```csharp theme={null}
public Action<string, float> OnProgressDelegate { get; set; }
```

#### Property Value

[Action](https://learn.microsoft.com/dotnet/api/system.action-2)\<[string](https://learn.microsoft.com/dotnet/api/system.string), [float](https://learn.microsoft.com/dotnet/api/system.single)\&gt;

## Methods

### \<a id="SuperOffice\_WebApi\_ProgressListener\_OnError\_System\_String\_System\_Exception\_">\</a> OnError(string, Exception)

Called when request fails.

```csharp theme={null}
public void OnError(string request, Exception errorMessage)
```

#### Parameters

`request` [string](https://learn.microsoft.com/dotnet/api/system.string)

URL being loaded

`errorMessage` [Exception](https://learn.microsoft.com/dotnet/api/system.exception)

Exception that is being thrown. Probably a \<xref href="SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiException" data-throw-if-not-resolved="false">\</xref>.

### \<a id="SuperOffice\_WebApi\_ProgressListener\_OnProgress\_System\_String\_System\_Single\_">\</a> OnProgress(string, float)

Called during upload/download, and at end to indicate completion.

```csharp theme={null}
public void OnProgress(string request, float progress)
```

#### Parameters

`request` [string](https://learn.microsoft.com/dotnet/api/system.string)

URL for the request

`progress` [float](https://learn.microsoft.com/dotnet/api/system.single)

Complete progress. 0.0 not started, 1.0 finished


## Related topics

- [SuperOffice.WebApi.WebApiOptions](/en/api/reference/webapi/SuperOffice.WebApi.WebApiOptions.md)
- [SuperOffice.WebApi.Agents.IAgentBase](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IAgentBase.md)
- [SuperOffice.WebApi.Agents.AgentBase](/en/api/reference/webapi/SuperOffice.WebApi.Agents.AgentBase.md)
- [SuperOffice.WebApi](/en/api/reference/webapi/SuperOffice.WebApi.md)
- [SuperOffice.WebApi.IProgressListener](/en/api/reference/webapi/SuperOffice.WebApi.IProgressListener.md)
- [SuperOffice.WebApi.Agents.ApiAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.ApiAgent.md)
