Interface INCStorage
The auxiliary object that contains the output files data and additional implements two important things:
writing into an arbitrary file location; mapping between written data and CLDATA commands, when processing which these data were written.
Namespace: DotnetPostprocessing.SDK
Assembly: DotnetPostprocessing.SDK.dll
Syntax
public interface INCStorage
Properties
ID
Unique numerical identifier of the storage.
Declaration
int ID { get; }
Property Value
Type | Description |
---|---|
int |
NCFile
Link to an output file of type TNCFile that corresponds to this storage.
Declaration
TNCFile NCFile { get; set; }
Property Value
Type | Description |
---|---|
TNCFile |
StorageEnd
The special kind of INCLabel that always points to the end of this storage (NCFile).
Declaration
INCLabel StorageEnd { get; }
Property Value
Type | Description |
---|---|
INCLabel |
StorageStart
The special kind of INCLabel that always points to the start of this storage (NCFile).
Declaration
INCLabel StorageStart { get; }
Property Value
Type | Description |
---|---|
INCLabel |
StorageType
The type of storage: binary or text.
Declaration
TNCStorageType StorageType { get; }
Property Value
Type | Description |
---|---|
TNCStorageType |
Methods
AddLabel(INCLabel, int)
Creates a new label of type INCLabel that offsets from another label, passed as a parameter, to specified count of bytes.
Declaration
INCLabel AddLabel(INCLabel label, int byteOffset)
Parameters
Type | Name | Description |
---|---|---|
INCLabel | label | The label relative to which the new label should be created. |
int | byteOffset | The count of bytes the new label should offset from the specified label. |
Returns
Type | Description |
---|---|
INCLabel | Returns the new label. |
Flush()
Writes the cashed in memory data to a temporary file on a hard drive.
Declaration
void Flush()
RemoveLabel(INCLabel)
Removes the specified label from the storage.
Declaration
void RemoveLabel(INCLabel label)
Parameters
Type | Name | Description |
---|---|---|
INCLabel | label |
SaveToFile(string, Encoding)
Writes content of this storage to an external file with the specified name. For a textual storage you should also specify desired chars encoding. If there is no encoding specified for textual storage then data will be written using UTF16 encoding without preamble (byte order mark).
Declaration
void SaveToFile(string FileName, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
string | FileName | The name of the file to which you want to write the data of this storage. If the directory of new file does not exist then it will be created. If a file with the name already exists then it will be overwritten. |
System.Text.Encoding | encoding | Desired encoding for the output file. You should specify null for binary storage. If the encoding for textual storage doesn't specified (null) then UTF16 encoding without preamble will be used. |