WorkSession Members

The WorkSession type exposes the following members.
Constructors

  NameDescription
Public methodWorkSession(IServices, Template)
WorkSession constructor
Public methodWorkSession(IServices, Template, TextReader)
Creates a WorkSession object that a host application can use to step through the process of presenting all the interviews and assembling all the documents that may result from the given template.
Back to Top
Methods

  NameDescription
Public methodAssembleDocuments(String)
AssembleDocuments causes all contiguous pending document work items (from CurrentWorkItem onwards) to be assembled, and returns the assembled documents.
Public methodAssembleDocuments(PreAssembleDocumentDelegate, PostAssembleDocumentDelegate, Object, String)
AssembleDocuments causes all contiguous pending document work items (from CurrentWorkItem onwards) to be assembled, and returns the assembled documents.
Public methodOnlineEquals
Determines whether the specified OnlineObject is equal to the current OnlineObject.
(Inherited from OnlineObject.)
Public methodFinishInterview
Called by the host application when answers have been posted back from a browser interview.
Public methodGetCurrentInterview 
Returns the current interview using default interview settings
Public methodGetCurrentInterview(InterviewFormat)
This constructor accepts a value for the interview format in case the host application wants to have more control over which format to use other than the one format specified in web.config. For example, the host application can detect whether or not the user's browser has Silverlight installed, and if not, it can choose to fall back to JavaScript interviews even if its normal preference is Silverlight.
Public methodGetCurrentInterview(InterviewSettings, IEnumerable String , String)
Returns the current interview with the given settings
Public methodOnlineGetHashCode
Serves as a hash function for a particular type.
(Inherited from OnlineObject.)
Public methodOnlineGetType
Gets the OnlineType of the current instance.
(Inherited from OnlineObject.)
Public methodOnlineToString
Returns a string that represents the current object.
(Inherited from OnlineObject.)
Back to Top
Properties

  NameDescription
Public propertyAnswerCollection
Returns the collection of answers pertaining to the current work item.
Public propertyCurrentWorkItem
This is the one that's next in line to be completed. In the case of interview work items, an interview is current both before and after it has been presented to the user, all the way up until FinishInterview is called, at which time whatever work item that follows becomes current. If the current work item is a document, AssembleDocuments() should be called, which will complete that document (and any that follow it), advancing CurrentWorkItem as it goes.
Public propertyDefaultAssemblySettings
When you create a WorkSession, a copy of the application-wide default assembly settings (as specified in web.config) is made and assigned to this property of the AnswerCollection. If the host app customizes these DefaultAssemblyOptions, each subsequent document generated in the WorkSession will inherit those customized settings.
Public propertyDefaultInterviewSettings
The intent with DefaultInterviewOptions was to work much like DefaultAssemblyOptions. When you create a WorkSession, a copy of the application-wide default interview settings (as specified in web.config) is made and assigned to this property of the AnswerCollection. If the host app customizes these DefaultInterviewOptions, each subsequent interview in the WorkSession will inherit those customized settings. HOWEVER, this doesn't work currently because InterviewWorkItems do not carry a reference to the WorkSession, and therefore don't have access to this property. TODO: figure out how this should work. One possibility would be for the WorkSession class to expose the GetInterview method (and maybe also FinishInterview) rather than having those on the InterviewWorkItem class. However, this would mean WorkSession would expose a GetInterview method all the time, but it is only callable some of the time (i.e. when the CurrentWorkItem is an interview).
Public propertyIsCompleted
returns true when all work items in the session have been completed, i.e. CurrentWorkItem == null.
Public propertyService
Returns the IServices object for the current work session.
Public propertyWorkItems
Exposees a list of interview and document work items, both already completed and pending, as suitable for presentation in a host application (for example, to show progress through the work session).
Back to Top
See Also