Table of Contents

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

string

EngineVersion

The Version of the engine

public static readonly Version EngineVersion

Field Value

Version

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

string

RuntimeName

The official runtime name

public const string RuntimeName = ".NETFramework"

Field Value

string

SourceFolderName

The folder name used to write the reflected classes

public const string SourceFolderName = "src"

Field Value

string

StartupLocation

Running location identified on startup

public static readonly string StartupLocation

Field Value

string

Properties

JarDestinationFolder

Destination of JARs relative to RootFolder

public static string JarDestinationFolder { get; set; }

Property Value

string

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

bool

RootFolder

Root used for all operations

public static string RootFolder { get; set; }

Property Value

string

SourceFolder

Destination of produced sources

public static string SourceFolder { get; set; }

Property Value

string

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

type JobTypes

The JobTypes to use

file string

The file containing argument to use

Returns

CommonEventArgs

CreateFolderList(FolderBuilderEventArgs, bool)

Gets the list of generated folder from reflection

public static AssemblyDataCollection CreateFolderList(FolderBuilderEventArgs args, bool avoidJCOReflector = false)

Parameters

args FolderBuilderEventArgs

A FolderBuilderEventArgs with instructions

avoidJCOReflector bool

Avoid 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 FolderBuilderEventArgs
avoidJCOReflector 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 T

The operation object

fileName string

The 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

string

Import<T>(string)

Imports a configuration written on a file

public static T Import<T>(string path) where T : class

Parameters

path string

The 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 AssemblyName

The AssemblyName to be checked

Returns

bool

true if it is available

IsReflected(string)

Check if assemblyName was available in the refelected assemblies of JCOReflector

public static bool IsReflected(string assemblyName)

Parameters

assemblyName string

The assembly name to be checked

Returns

bool

true if it is available

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 T

The argument to use

waitEnd bool

True 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 appendToConsoleHandler

Handler 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 CommonEventArgs

The 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 CommonEventArgs

The 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 T

The 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 T

The instance to be updated

args string[]

Arguments from command line

Returns

T

An instance of CommonEventArgs

Type Parameters

T

A concrete instance of CommonEventArgs