Table of Contents

Class DownloadFileAction

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a plugin prerequisite action that downloads a file

public class DownloadFileAction : PluginPrerequisiteAction
Inheritance
object
CorePropertyChanged
DownloadFileAction
Inherited Members

Constructors

DownloadFileAction(string, Func<Task<string>>, string)

Creates a new instance of a copy folder action

public DownloadFileAction(string name, Func<Task<string>> urlFunction, string fileName)

Parameters

name string

The name of the action

urlFunction Func<Task<string>>

A function returning the URL to download

fileName string

The target file to save as (will be created if needed)

DownloadFileAction(string, string, string)

Creates a new instance of a copy folder action

public DownloadFileAction(string name, string url, string fileName)

Parameters

name string

The name of the action

url string

The source URL to download

fileName string

The target file to save as (will be created if needed)

Properties

FileName

Gets the target file to save as (will be created if needed)

public string FileName { get; }

Property Value

string

Url

Gets the source URL to download

public string? Url { get; }

Property Value

string

UrlFunction

Gets the function returning the URL to download

public Func<Task<string>>? UrlFunction { get; }

Property Value

Func<Task<string>>

Methods

Execute(CancellationToken)

Called when the action must execute

public override Task Execute(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task