The WorkSession type exposes the following members.
Back to Top
Back to Top
Back to Top
Constructors
Name | Description | |
---|---|---|
![]() | WorkSession(IServices, Template) | WorkSession constructor
|
![]() | WorkSession(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.
|
Methods
Name | Description | |
---|---|---|
![]() | AssembleDocuments(String) |
AssembleDocuments causes all contiguous pending document work items (from CurrentWorkItem onwards)
to be assembled, and returns the assembled documents.
|
![]() | AssembleDocuments(PreAssembleDocumentDelegate, PostAssembleDocumentDelegate, Object, String) |
AssembleDocuments causes all contiguous pending document work items (from CurrentWorkItem onwards)
to be assembled, and returns the assembled documents.
|
![]() | ![]() | (Inherited from ![]() |
![]() | FinishInterview |
Called by the host application when answers have been posted back from a browser interview.
|
![]() | GetCurrentInterview |
Returns the current interview using default interview settings
|
![]() | GetCurrentInterview(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.
|
![]() | GetCurrentInterview(InterviewSettings, IEnumerable String , String) |
Returns the current interview with the given settings
|
![]() | ![]() | Serves as a hash function for a particular type. (Inherited from ![]() |
![]() | ![]() | Gets the (Inherited from ![]() ![]() |
![]() | ![]() | Returns a string that represents the current object. (Inherited from ![]() |
Properties
Name | Description | |
---|---|---|
![]() | AnswerCollection |
Returns the collection of answers pertaining to the current work item.
|
![]() | CurrentWorkItem |
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.
|
![]() | DefaultAssemblySettings |
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.
|
![]() | DefaultInterviewSettings |
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).
|
![]() | IsCompleted |
returns true when all work items in the session have been completed, i.e. CurrentWorkItem == null.
|
![]() | Service |
Returns the IServices object for the current work session.
|
![]() | WorkItems |
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).
|
See Also