Class DownloadFileAction
Represents a plugin prerequisite action that downloads a file
public class DownloadFileAction : PluginPrerequisiteAction
- Inheritance
-
objectCorePropertyChangedDownloadFileAction
- 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
namestringThe name of the action
urlFunctionFunc<Task<string>>A function returning the URL to download
fileNamestringThe 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
namestringThe name of the action
urlstringThe source URL to download
fileNamestringThe 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
Url
Gets the source URL to download
public string? Url { get; }
Property Value
UrlFunction
Gets the function returning the URL to download
public Func<Task<string>>? UrlFunction { get; }
Property Value
Methods
Execute(CancellationToken)
Called when the action must execute
public override Task Execute(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationToken