Class SignedRequestWriter
Used to write a Humm request as json including the relevant signature in the output.
Implements
Inherited Members
Namespace: Yort.Humm.InStore.Infrastructure
Assembly: Yort.Humm.InStore.dll
Syntax
public sealed class SignedRequestWriter : IDisposable
Constructors
| Improve this Doc View SourceSignedRequestWriter(ISignatureGenerator)
Initializes a new instance of the SignedRequestWriter class.
Declaration
public SignedRequestWriter(ISignatureGenerator signatureGenerator)
Parameters
Type | Name | Description |
---|---|---|
ISignatureGenerator | signatureGenerator | The signature generator. |
Methods
| Improve this Doc View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Remarks
Will dispose the ISignatureGenerator passed into the constructor when this instance was created.
WriteRequest<T>(T)
Writes the specified request as to a string and returns the result.
Declaration
public string WriteRequest<T>(T request)
where T : class
Parameters
Type | Name | Description |
---|---|---|
T | request | The request to write. |
Returns
Type | Description |
---|---|
String | A string containing the request written as json and containing the required digital signature. |
Type Parameters
Name | Description |
---|---|
T | The type of request to be written, must be a .Net reference type. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Thrown if this instance is disposed. |
ArgumentNullException | Thrown if |
See Also
| Improve this Doc View SourceWriteRequest<T>(T, Stream)
Writes the specified request to the specified stream.
Declaration
public void WriteRequest<T>(T request, [ValidatedNotNull] Stream outputStream)
where T : class
Parameters
Type | Name | Description |
---|---|---|
T | request | The request to write. |
Stream | outputStream | The stream to write to. |
Type Parameters
Name | Description |
---|---|
T | The type of request to be written, must be a .Net reference type. |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Thrown if this instance is disposed. |
ArgumentNullException | Thrown if |