Class DownloadFileAction
Represents a plugin prerequisite action that downloads a file
Inherited Members
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public class DownloadFileAction : PluginPrerequisiteAction
Constructors
DownloadFileAction(string, Func<Task<string>>, string)
Creates a new instance of a copy folder action
Declaration
public DownloadFileAction(string name, Func<Task<string>> urlFunction, string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the action |
Func<Task<string>> | urlFunction | A function returning the URL to download |
string | fileName | The target file to save as (will be created if needed) |
DownloadFileAction(string, string, string)
Creates a new instance of a copy folder action
Declaration
public DownloadFileAction(string name, string url, string fileName)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the action |
string | url | The source URL to download |
string | fileName | 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)
Declaration
public string FileName { get; }
Property Value
Type | Description |
---|---|
string |
Url
Gets the source URL to download
Declaration
public string? Url { get; }
Property Value
Type | Description |
---|---|
string |
UrlFunction
Gets the function returning the URL to download
Declaration
public Func<Task<string>>? UrlFunction { get; }
Property Value
Type | Description |
---|---|
Func<Task<string>> |
Methods
Execute(CancellationToken)
Called when the action must execute
Declaration
public override Task Execute(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |