Class FileFactory
- Namespace
- DuetControlServer.Files
- Assembly
- DuetControlServer.dll
Factory for creating code and macro files
public class FileFactory
- Inheritance
-
FileFactory
- Inherited Members
Constructors
FileFactory(ILogger<FileFactory>, IServiceProvider)
Factory for creating code and macro files
public FileFactory(ILogger<FileFactory> logger, IServiceProvider serviceProvider)
Parameters
loggerILogger<FileFactory>Logger instance
serviceProviderIServiceProviderService provider
Methods
Create(CodeFile, CodeChannel)
Create a code file copy for execution on the given channel
public CodeFile Create(CodeFile copyFrom, CodeChannel channel)
Parameters
copyFromCodeFilechannelCodeChannelCode channel
Returns
- CodeFile
Code file instance
Create(string, string, CodeChannel)
Create a code file for execution on the given channel
public CodeFile Create(string virtualFile, string physicalFile, CodeChannel channel)
Parameters
virtualFilestringVirtual file path
physicalFilestringPhysical file path
channelCodeChannelCode channel
Returns
- CodeFile
Code file instance
CreateMacro(MacroFile, CodeChannel)
Create a macro file for execution on the given channel from an existing macro file
public MacroFile CreateMacro(MacroFile copyFrom, CodeChannel channel)
Parameters
copyFromMacroFileMacro file to copy from
channelCodeChannelCode channel requesting the macro
Returns
- MacroFile
Macro file or null if it could not be opened
CreateMacro(string, string, CodeChannel, Code?, int)
Create a macro file for execution on the given channel
public MacroFile? CreateMacro(string virtualFile, string physicalFile, CodeChannel channel, Code? startCode = null, int sourceConnection = 0)
Parameters
virtualFilestringVirtual file path
physicalFilestringPhysical file path
channelCodeChannelCode requesting the macro
startCodeCodeCode starting the macro file
sourceConnectionintOriginal IPC connection requesting this macro file
Returns
- MacroFile
Macro file or null if it could not be opened