Search Results for

Show / Hide Table of Contents

# Class TempFileCleanupService

Background service that periodically asks the active upload provider to remove expired temporary uploads and chunk sessions.

##### Inheritance

object
BackgroundService
TempFileCleanupService

##### Implements

IHostedService
IDisposable

##### Inherited Members

BackgroundService.Dispose()
BackgroundService.StartAsync(CancellationToken)
BackgroundService.StopAsync(CancellationToken)
BackgroundService.ExecuteTask
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: CoreUpload.Services

###### Assembly: CoreUpload.dll

##### Syntax

    public class TempFileCleanupService : BackgroundService, IHostedService, IDisposable

### Constructors

#### TempFileCleanupService(IServiceProvider, ILogger<TempFileCleanupService>, IOptions<CoreUploadOptions>)

##### Declaration

    public TempFileCleanupService(IServiceProvider services, ILogger<TempFileCleanupService> logger, IOptions<CoreUploadOptions> options)

##### Parameters

Type | Name | Description
--- | --- | ---
IServiceProvider | services |
ILogger<TempFileCleanupService> | logger |
IOptions<CoreUploadOptions> | options |

### Methods

#### ExecuteAsync(CancellationToken)

Runs the cleanup loop until the host is shutting down.

##### Declaration

    protected override Task ExecuteAsync(CancellationToken stoppingToken)

##### Parameters

Type | Name | Description
--- | --- | ---
CancellationToken | stoppingToken |

##### Returns

Type | Description
--- | ---
Task |

##### Overrides

BackgroundService.ExecuteAsync(CancellationToken)

### Implements

IHostedService
IDisposable