Click or drag to resize

ProcessProgressHandlerTUnit Class

Defines a delegate handler for a ProcessProgressTUnit instance.
Inheritance Hierarchy
SystemObject
  GSFProcessProgressHandlerTUnit

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public class ProcessProgressHandler<TUnit>
where TUnit : struct, new()
View Source

Type Parameters

TUnit
Unit of progress used (long, double, int, etc.)

The ProcessProgressHandlerTUnit type exposes the following members.

Constructors
 NameDescription
Public methodProcessProgressHandlerTUnit(ActionProcessProgressTUnit, String) Constructs a new process progress handler for the specified parameters.
Public methodProcessProgressHandlerTUnit(ActionProcessProgressTUnit, String, TUnit) Constructs a new process progress handler for the specified parameters.
Top
Properties
 NameDescription
Public propertyComplete Gets or sets current process progress (i.e., number of units completed processing so far) - note that when this property value is assigned, the callback function is automatically called with updated ProcessProgressTUnit instance so consumer can track progress.
Public propertyProcessProgress Gets instance of ProcessProgressTUnit used to track progress for this handler.
Public propertyProgressHandler Gets or sets reference to delegate handler used as a callback to report process progress.
Public propertyTotal Gets or sets total number of units to be processed.
Top
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodUpdateProgress Calls callback function with updated ProcessProgressTUnit instance so consumer can track progress.
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks

This handler is used by methods with an Action delegate parameter (e.g., Action<ProcessProgress<long>>) providing a simple callback mechanism for reporting progress on a long operation.

Examples include: Compress(Stream, Stream, CompressionStrength, ActionProcessProgressInt64), Encrypt(Stream, Stream, Byte, Byte, CipherStrength, ActionProcessProgressInt64) and Decrypt(Stream, Stream, Byte, Byte, CipherStrength, ActionProcessProgressInt64)

See Also

Reference

GSF Namespace