Class JobManager
- Namespace
- MASES.JCOReflector.Engine
- Assembly
- MASES.JCOReflectorEngine.dll
The main entry point
public static class JobManager
- Inheritance
-
JobManager
- Inherited Members
Fields
DefaultRootFolder
Default root which use the JCOReflector repository rules
public static readonly string DefaultRootFolder
Field Value
EngineVersion
The Version of the engine
public static readonly Version EngineVersion
Field Value
Parser
Parser associated to JobManager
public static readonly Parser Parser
Field Value
- Parser
RuntimeFolder
The runtime folder name used from the engine
public const string RuntimeFolder = "net462"
Field Value
RuntimeName
The official runtime name
public const string RuntimeName = ".NETFramework"
Field Value
SourceFolderName
The folder name used to write the reflected classes
public const string SourceFolderName = "src"
Field Value
StartupLocation
Running location identified on startup
public static readonly string StartupLocation
Field Value
Properties
JarDestinationFolder
Destination of JARs relative to RootFolder
public static string JarDestinationFolder { get; set; }
Property Value
ReportException
Set to true to report the internal exception outside execution of RunJob<T>(T, bool). Default is false for backward compatibility.
public static bool ReportException { get; set; }
Property Value
RootFolder
Root used for all operations
public static string RootFolder { get; set; }
Property Value
SourceFolder
Destination of produced sources
public static string SourceFolder { get; set; }
Property Value
Methods
CancelJob()
Cancel a running job
public static void CancelJob()
ConvertFile(JobTypes, string)
Convert a file into a Job
public static CommonEventArgs ConvertFile(JobTypes type, string file)
Parameters
Returns
CreateFolderList(FolderBuilderEventArgs, bool)
Gets the list of generated folder from reflection
public static AssemblyDataCollection CreateFolderList(FolderBuilderEventArgs args, bool avoidJCOReflector = false)
Parameters
args
FolderBuilderEventArgsA FolderBuilderEventArgs with instructions
avoidJCOReflector
boolAvoid to add JCOReflector in the list of returned AssemblyData
Returns
- AssemblyDataCollection
An AssemblyDataCollection with the data
CreateList(FolderBuilderEventArgs, bool)
public static string[] CreateList(this FolderBuilderEventArgs args, bool avoidJCOReflector)
Parameters
args
FolderBuilderEventArgsavoidJCOReflector
bool
Returns
- string[]
Export<T>(T, string)
Exports a configuration to a file
public static void Export<T>(T type, string fileName) where T : class
Parameters
type
TThe operation object
fileName
stringThe file path where operation will be written
Type Parameters
T
The operation type
FromArgs(string[])
Convert arguments into an instance of CommonEventArgs
public static CommonEventArgs FromArgs(this string[] args)
Parameters
args
string[]Arguments from command line
Returns
- CommonEventArgs
An instance of CommonEventArgs
GetArgumentHelp()
Returns the help info for parameters
public static string GetArgumentHelp()
Returns
Import<T>(string)
Imports a configuration written on a file
public static T Import<T>(string path) where T : class
Parameters
path
stringThe full file path containing the serialized operation
Returns
- T
The T object
Type Parameters
T
The operation type
IsReflected(AssemblyName)
Check if assemblyName
was available in the refelected assemblies of JCOReflector
public static bool IsReflected(AssemblyName assemblyName)
Parameters
assemblyName
AssemblyNameThe AssemblyName to be checked
Returns
IsReflected(string)
Check if assemblyName
was available in the refelected assemblies of JCOReflector
public static bool IsReflected(string assemblyName)
Parameters
assemblyName
stringThe assembly name to be checked
Returns
Reset()
Reset JobManager state
public static void Reset()
RunJob<T>(T, bool)
Executes a Job
public static void RunJob<T>(T arg, bool waitEnd = false) where T : CommonEventArgs
Parameters
arg
TThe argument to use
waitEnd
boolTrue to wait the end of operation
Type Parameters
T
The argument type inherited from CommonEventArgs
SetHandler(appendToConsoleHandler, EventHandler<EndOperationEventArgs>)
Sets the operations handler
public static void SetHandler(appendToConsoleHandler appendToConsoleHandler, EventHandler<EndOperationEventArgs> endOperationHandler)
Parameters
appendToConsoleHandler
appendToConsoleHandlerHandler for logging purpose
endOperationHandler
EventHandler<EndOperationEventArgs>Handler for completed operations
UpdateFromArgs(CommonEventArgs, IEnumerable<IArgumentMetadataParsed>)
Convert arguments into an instance of CommonEventArgs
public static CommonEventArgs UpdateFromArgs(this CommonEventArgs arg, IEnumerable<IArgumentMetadataParsed> args)
Parameters
arg
CommonEventArgsThe CommonEventArgs to be updated
args
IEnumerable<IArgumentMetadataParsed>Arguments parsed from command line
Returns
- CommonEventArgs
An instance of CommonEventArgs
UpdateFromArgs(CommonEventArgs, string[])
Convert arguments into an instance of CommonEventArgs
public static CommonEventArgs UpdateFromArgs(this CommonEventArgs arg, string[] args)
Parameters
arg
CommonEventArgsThe CommonEventArgs to be updated
args
string[]Arguments from command line
Returns
- CommonEventArgs
An instance of CommonEventArgs
UpdateFromArgs<T>(T, IEnumerable<IArgumentMetadataParsed>)
Convert arguments into an instance of T
public static T UpdateFromArgs<T>(this T arg, IEnumerable<IArgumentMetadataParsed> args) where T : CommonEventArgs
Parameters
arg
TThe instance to be updated
args
IEnumerable<IArgumentMetadataParsed>Arguments parsed from command line
Returns
- T
An instance of CommonEventArgs
Type Parameters
T
A concrete instance of CommonEventArgs
UpdateFromArgs<T>(T, string[])
Convert arguments into an instance of CommonEventArgs
public static T UpdateFromArgs<T>(this T arg, string[] args) where T : CommonEventArgs
Parameters
arg
TThe instance to be updated
args
string[]Arguments from command line
Returns
- T
An instance of CommonEventArgs
Type Parameters
T
A concrete instance of CommonEventArgs