You are here: Programmers Reference > Programmer's Reference > DataService > ClientContext Object

ClientContext Object

This object is an argument to the DataService.OpenAsync method. The solution creates and owns this JavaScript object. It should contain information for setting up a scanning and/or correction session. The object can also hold other solution specific information. Some members are mandatory, most are optional.

These member(s) are invoked by DataService. The handler function takes a single argument of type DataServiceEventArgs.

The following member(s) MUST be specified, otherwise an exception is thrown.

Member Name Description
License The 14-character license key for the ScanTools Plus Link SDK. Please note that ScanTools Plus has a different license key. Refer to ScanningManager.License for more information

The following members match a subset of the SessionInfo class. If you do not specify these members, defaults are applied.

Member Name Type Description
Application string URLs of the respective metadata files. Watch out for server specific case sensitivity and permitted file extensions.

EditProfile

string URLs of the respective metadata files. Watch out for server specific case sensitivity and permitted file extensions.
ScoreProfile string URLs of the respective metadata files. Watch out for server specific case sensitivity and permitted file extensions.
StopAfter integer See information on property in SessionInfo
Starting_SerialNo integer See information on property in SessionInfo

BatchNumber

integer

See information on property in SessionInfo
RunNumber integer See information on property in SessionInfo
PrintPosition integer See information on property in SessionInfo
PrintOption integer See information on property in SessionInfo
StopOptions integer See information on property in SessionInfo
DisplayScanningProgressWindow 0 or 1 See information on property in SessionInfo
LightSource Enum L_LIGHT_SOURCE_ENUM
MarkThreshold Enum L_MARKTHRESH_ENUM
DiscriminationMargin Enum L_DISCMARGIN_ENUM
DeleteDownloadedMetadata false, true Refer to information on property in SessionInfo

The following members are optional. Typically you will not need to specify these at all. They are there as potential mitigation for unusual situations as might occur.

Member Name Description
ScannerConfiguration See Scanner.Configuration property
ScannerSearchHints See ScanningManager.FindAndConfigureScannerAsync
SpecificScannerModel See ScanningManager.FindAndConfigureScannerAsync
KernelErrorMode See ScanningManager.SetKernelErrorMode

Example

clientContext = {

// mandatory member(s)…

License: “1234567890ABCD”,

// optional members…

Application: “./ScanMetadata/My Scan App.StxAppDef.bin”,

StopAfter: 1

// properties and methods proprietary to solution

//

};

 

 

See Help on Help for additional information on using this help file.

See Scantron Technical Support for additional information on technical support and training options.

See the ScanTools Suite System Requirements for further details on hardware and software requirements.

ScanTools is a suite of products; the specific information you want may appear in the help for a different module. If you don't find what you're looking for here, try one of the following:

 

Scantron Corporation

Customer Service (forms, products, and services):

1-800-SCANTRON (722-6876)

www.scantron.com

Technical Support:

1-800-445-3141

support@scantron.com

Copyright © 1998-2012 Scantron Corporation. All rights reserved. Use permitted only under license. www.scantron.com. No part of the Help or user guides may be reproduced in any form, or by any means, without express permission from Scantron Corporation.

LINKS TO THIRD PARTY SITES

This help system may contain links to third party websites ("Linked Sites"). The Linked Sites are not under the control of Scantron and Scantron is not responsible for the content of any Linked Site, including without limitation any link contained in a Linked Site or any changes or modifications to a Linked Site. Scantron is not responsible for web casting or any other form of transmission received from any Linked Site. Scantron provides Users with the ability to link the Assessment System to the Linked Sites as a convenience to you, and the inclusion of any link does not imply endorsement by Scantron of the Linked Site or any association with its operators.