Table of Contents

Class PermitFileWriter

Namespace
EncDotNet.S100.ExchangeSets.Protection
Assembly
EncDotNet.S100.ExchangeSets.dll

Writes PERMIT.XML files, and signs them as PERMIT.SIGN: the data-server side of the Part 15 permit exchange.

public static class PermitFileWriter
Inheritance
PermitFileWriter
Inherited Members

Remarks

S-100 Edition 5.2.1 Part 15 §15-7.4. The inverse of Read(Stream). Build the permit with Create(IEnumerable<PermitGroup>) and Create(string, ReadOnlySpan<byte>, HardwareId, DateOnly, int?, DateOnly?).

Fields

PermitFileName

The name of the permit file in an exchange set.

public const string PermitFileName = "PERMIT.XML"

Field Value

string

SignatureFileName

The name of the permit's signature file in an exchange set.

public const string SignatureFileName = "PERMIT.SIGN"

Field Value

string

Methods

Write(PermitFile, Stream)

Writes a permit file to a stream.

public static void Write(PermitFile permit, Stream destination)

Parameters

permit PermitFile

The permit file.

destination Stream

The stream to write to; it is left open.

Remarks

This method is synchronous.

WriteSigned(PermitFile, Part15Signer, Stream, Stream)

Writes a permit file and its standalone signature, signed over the exact bytes written (§15-7.4.5).

public static void WriteSigned(PermitFile permit, Part15Signer signer, Stream permitDestination, Stream signatureDestination)

Parameters

permit PermitFile

The permit file.

signer Part15Signer

The data server's signer.

permitDestination Stream

The stream to write PERMIT.XML to; it is left open.

signatureDestination Stream

The stream to write PERMIT.SIGN to; it is left open.

Remarks

This method is synchronous.