• Articles
  • Api Documentation

    Show / Hide Table of Contents
    • Yort.Humm.InStore
      • CreateKeyRequest
      • CreateKeyResponse
      • HummApiUrlSelector
      • HummClient
      • HummClientConfiguration
      • HummCountry
      • HummEnvironment
      • HummResponseSignatureException
      • HummStatusCodes
      • IHummApiUrlSelector
      • IHummClient
      • InviteRequest
      • InviteResponse
      • PendingAuthorisationEventArgs
      • ProcessAuthorisationRequest
      • ProcessAuthorisationResponse
      • ProcessSalesAdjustmentRequest
      • ProcessSalesAdjustmentResponse
      • ProcessSalesAdjustmentReversalRequest
      • ProcessSalesAdjustmentReversalResponse
      • PurchaseItemsCollection
      • RequestStates
      • SendReceiptRequest
      • SendReceiptResponse
    • Yort.Humm.InStore.Infrastructure
      • Hmac256SignatureGenerator
      • ISignatureGenerator
      • RequestBase
      • ResponseBase
      • SignedRequestWriter

    Class SignedRequestWriter

    Used to write a Humm request as json including the relevant signature in the output.

    Inheritance
    Object
    SignedRequestWriter
    Implements
    IDisposable
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Yort.Humm.InStore.Infrastructure
    Assembly: Yort.Humm.InStore.dll
    Syntax
    public sealed class SignedRequestWriter : IDisposable

    Constructors

    | Improve this Doc View Source

    SignedRequestWriter(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 Source

    Dispose()

    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.

    | Improve this Doc View Source

    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 request is null.

    See Also
    WriteRequest<T>(T, Stream)
    Dispose()
    | Improve this Doc View Source

    WriteRequest<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 request or outputStream is null.

    See Also
    WriteRequest<T>(T)
    Dispose()

    Implements

    System.IDisposable

    See Also

    IDisposable
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2020 Troy Willmot