<PackageReference Include="Relativity.Server.Import.SDK" Version="2.9.2" />

ProcessContext

public sealed class ProcessContext
Represents a thread-safe context for a IRunnable process to publish events. This class cannot be inherited.
public object InputArgs { get; set; }

Gets or sets input arguments.

public bool SafeMode { get; set; }

Gets or sets a value indicating whether safe mode is enabled.

Occurs when the runnable process has been requested for cancellation.

Occurs when the runnable process non-fatal error is reported.

Occurs when the runnable process requests an export error file.

Occurs when the runnable process requests an export error report file.

Occurs when the runnable process requests the export server errors file.

Occurs when the runnable process throws a fatal exception.

Occurs when the runnable process has mapped a source field to a target field.

Occurs when the runnable process associated with a parent form is closing.

Occurs when the runnable process has completed.

Occurs when the runnable process has ended.

Occurs when the runnable process event takes place.

Occurs when the runnable process progress event takes place.

Occurs when the runnable process increments the record count.

Occurs when the runnable process has completed processing a single record.

Occurs when the runnable process is requested to show the error report.

Occurs when the runnable process has shutdown.

Occurs when a status bar change takes place.

public ProcessContext()

Initializes a new instance of the ProcessContext class.

public ProcessContext(IProcessEventWriter eventWriter, IProcessErrorWriter errorWriter, IAppSettings settings, ILog logger)

Initializes a new instance of the ProcessContext class.

public void Clear()

Clears this instance and assigns null to all events.

public void PublishCancellationRequest(Guid processId)

Halts the runnable process with the specified process unique identifier. This assumes cancellation is requested by the user.

public void PublishCancellationRequest(Guid processId, bool requestByUser)

Halts the runnable process with the specified process unique identifier.

public void PublishErrorEvent(string recordInfo, string message)

Publishes an event indicating the runnable process has handled a non-fatal error.

public void PublishErrorReport(IDictionary error)

Publishes an event indicating the runnable process is reporting a non-fatal error.

public void PublishExportErrorFile(string file)

Publishes an event indicating the runnable process requests an export error file.

public void PublishExportErrorReport(string file)

Publishes an event indicating the runnable process requests an export error report file.

public void PublishExportServerErrors(string file)

Publishes an event indicating the runnable process requests the export server errors file.

public void PublishFatalException(Exception exception)

Publishes an event indicating the runnable process has handled a fatal exception.

public void PublishFieldMapped(string sourceField, string targetField)

Publishes an event indicating the runnable process has mapped a source field to a target field.

public void PublishParentFormClosing(Guid processId)

Publishes an event indicating the runnable process associated with a parent form is closing.

Publishes an event indicating the runnable process has completed. By default, closeForm is false, exportFilePath is Empty, and exportLog is false.

public void PublishProcessCompleted(bool closeForm)

Publishes an event indicating the runnable process has completed. By default, exportFilePath is Empty and exportLog is false.

public void PublishProcessCompleted(bool closeForm, string exportFilePath)

Publishes an event indicating the runnable process has completed. By default, exportLog is false.

public void PublishProcessCompleted(bool closeForm, string exportFilePath, bool exportLog)

Publishes an event indicating the runnable process has completed.

public void PublishProcessEnded(long nativeFileBytes, long metadataBytes, double sqlProcessRate)

Publishes an event indicating the runnable process has ended.

public void PublishProgress(long totalRecords, long totalProcessedRecords, long totalProcessedWarningRecords, long totalProcessedErrorRecords, DateTime startTime, DateTime timestamp, double metadataThroughput, double nativeFileThroughput, Guid processId, string totalRecordsDisplay = null, string totalProcessedRecordsDisplay = null, IDictionary metadata = null)

Publishes an event indicating the runnable process progress event has occurred.

public void PublishProgressInBytes(long totalBytes, long processedBytes, DateTime startTime, DateTime timestamp, Guid processId, string totalBytesDisplay, string processedBytesDisplay)

Publishes an event indicating the runnable process progress event has occurred. Progress is measured in number of bytes.

Publishes an event indicating the runnable process record count has incremented.

public void PublishRecordProcessed(long recordNumber)

Publishes an event indicating the runnable process has completed processing a single record.

public void PublishShutdown()

Publishes an event indicating the runnable process has shutdown.

public void PublishStatusBarChanged(string message, string popupText)

Publishes a status bar change event.

public void PublishStatusEvent(string recordInfo, string message)

Publishes a status event.

public void PublishWarningEvent(string recordInfo, string message)

Publishes a warning event.

public void SaveOutputFile(string file)

Saves the output file to the specified file path.