HotDocs.Sdk.Server Namespace
The HotDocs.Sdk.Server namespace contains types implementing an abstraction layer between integrated applications and EITHER HotDocs Server (running locally or remotely via web services) OR HotDocs Cloud Services. The interface at the "center" of this namespace is IServices, an abstract and stateless interface for accessing either HotDocs Server or Cloud Services. Layered on top of that is the WorkSession class, which encapsulates the potential complexity of HotDocs assembly queues.
Classes

  Class Description
Public class AssembleDocumentResult
The results of assembling a document. An object of this type is returned by AssembleDocument().
Public class Document
Return result of WorkSession.AssembleDocuments and IServices.ConvertDocument. Encapsulates an assembled or converted document, together with any supporting files that document may require.
Public class DocumentWorkItem
A DocumentWorkItem represents a document that needs to be (or has been) generated as part of a WorkSession. It keeps track of the template used to generate the document, and for documents that have already been generated, it also tracks the unanswered variables encountered during assembly.
Public class InterviewAnswerSet
Represents the answers returned from a HotDocs interview.
Public class InterviewResponse
The response from a HotDocs interview that includes answers entered by the user.
Public class InterviewResult
Return result of GetInterview.
Public class InterviewWorkItem
An InterviewWorkItem represents an interview that will be (or has been) presented to the end user in a web browser. In includes a method to retrieve the interview HTML fragment (when delivering the interview to a browser), and another to "finish" the interview once answers have been posted back from the browser.
Public class NamedStream
This class encapsulates a named file that is returned as part of the result of AssembleDocument, ConvertDocument or GetInterview. It is typically used to return files (such as graphics) that are supplementary to the primary document that is returned. Instances of this class are created by the SDK and are meant to be consumed by the host application (typically in response to a request from the browser for the file). Instances should always be disposed of to ensure streams are closed properly.

Use of this class can generally be avoided by other means (i.e. the host application already knowing where, on disk, to find the requested file), but it is there as an option if necessary.

Public class Util
The Util class provides some methods needed for this class. Some of those methods are used for a specific implementation of IServices.
Public class WorkItem
WorkItem is an abstract class representing either a browser interview OR an assembled document. Work Sessions (also known as assembly queues) in the Open SDK are composed of one or more WorkItems.
Public class WorkSession
WorkSession is a state machine enabling a host application to easily navigate an assembly queue. It maintains an answer collection and a list of completed (and pending) interviews and documents. A host application uses this class not only to process through the assembly queue, but also to inspect the assembly queue for purposes of providing user feedback ("disposition pages").
Interfaces

  Interface Description
Public interface IServices
This is a stateless, object-oriented interface for basic communications with HotDocs Server or Cloud Services, including getting interviews, assembling documents, and other simple operations. There are three implementations of IServices:
  • Local.Services - talks to a locally-running copy of HotDocs Server;
  • WebService.Services - talks to a remotely-running copy of HotDocs Server via the HotDocs Server web services interface;
  • Cloud.Services - talks to HotDocs Cloud Services running in Windows Azure.
Delegates

  Delegate Description
Public delegate PostAssembleDocumentDelegate
This delegate type allows a host application to request notification immediately following the SDK assembling a document during the execution of the WorkSession.AssembleDocuments method.
Public delegate PreAssembleDocumentDelegate
This delegate type allows a host application to request notification immediately prior to the SDK assembling a specific document (during the execution of the WorkSession.AssembleDocuments method).