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
argsFolderBuilderEventArgsA FolderBuilderEventArgs with instructions
avoidJCOReflectorboolAvoid 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
argsFolderBuilderEventArgsavoidJCOReflectorbool
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
typeTThe operation object
fileNamestringThe file path where operation will be written
Type Parameters
TThe operation type
FromArgs(string[])
Convert arguments into an instance of CommonEventArgs
public static CommonEventArgs FromArgs(this string[] args)
Parameters
argsstring[]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
pathstringThe full file path containing the serialized operation
Returns
- T
The T object
Type Parameters
TThe operation type
IsReflected(AssemblyName)
Check if assemblyName was available in the refelected assemblies of JCOReflector
public static bool IsReflected(AssemblyName assemblyName)
Parameters
assemblyNameAssemblyNameThe 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
assemblyNamestringThe 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
argTThe argument to use
waitEndboolTrue to wait the end of operation
Type Parameters
TThe argument type inherited from CommonEventArgs
SetHandler(appendToConsoleHandler, EventHandler<EndOperationEventArgs>)
Sets the operations handler
public static void SetHandler(appendToConsoleHandler appendToConsoleHandler, EventHandler<EndOperationEventArgs> endOperationHandler)
Parameters
appendToConsoleHandlerappendToConsoleHandlerHandler for logging purpose
endOperationHandlerEventHandler<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
argCommonEventArgsThe CommonEventArgs to be updated
argsIEnumerable<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
argCommonEventArgsThe CommonEventArgs to be updated
argsstring[]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
argTThe instance to be updated
argsIEnumerable<IArgumentMetadataParsed>Arguments parsed from command line
Returns
- T
An instance of CommonEventArgs
Type Parameters
TA 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
argTThe instance to be updated
argsstring[]Arguments from command line
Returns
- T
An instance of CommonEventArgs
Type Parameters
TA concrete instance of CommonEventArgs