\r\n

51Degrees Pipeline .NET  4.3

51Degrees Pipeline for .NET

FiftyOne.Pipeline.JavaScriptBuilder.Templates.JavaScriptResource Class Reference

Detailed Description

A helper class that packages the parameters required by the JavaScript mustache template into the required format.

Public Member Functions

 JavaScriptResource (string objName, string jsonObject, string sessionId, int sequence, bool supportsPromises, bool supportsFetch, string url, string parameters, bool enableCookies, bool updateEnabled, bool hasDelayedProperties)
Constructor More...
 JavaScriptResource (string objName, string jsonObject, string sessionId, int sequence, bool supportsPromises, bool supportsFetch, Uri url, string parameters, bool enableCookies, bool updateEnabled, bool hasDelayedProperties)
Constructor More...
Dictionary< string, object >  AsDictionary ()
Get the parameters supplied to this class as a More...

Constructor & Destructor Documentation

◆ JavaScriptResource() [1/2]

FiftyOne.Pipeline.JavaScriptBuilder.Templates.JavaScriptResource.JavaScriptResource ( string   objName,
string   jsonObject,
string   sessionId,
int   sequence,
bool   supportsPromises,
bool   supportsFetch,
string   url,
string   parameters,
bool   enableCookies,
bool   updateEnabled,
bool   hasDelayedProperties  
)

Constructor

The callback mechanism is a feature that allows the client-side data to be updated in the background when any properties that contain JavaScript code have been executed on the client and therefore, new evidence is available.

Parameters
objName - The name of the global-scope JavaScript object that will be created on the client-side by the JavaScript produced by the template.
jsonObject - The JSON data payload to be inserted into the template.
sessionId - The session Id to use in the JavaScript response.
sequence - The sequence value to use in the JavaScript response.
supportsPromises - If true, the template will produce JavaScript that makes use of promises. If false, promises will not be used.
supportsFetch - If true, the template will produce JavaScript that makes use of the fetch API. Otherwise, the template will fall back to using XMLHttpRequest.
url - The complete URL to use for the callback mechanism described in remarks for this constructor.
parameters - The parameters to append to the call-back URL.
enableCookies - If false, any cookies created by JavaScript properties that execute on the client-side and that start with '51D_' will be deleted automatically.
updateEnabled - True to use the callback mechanism that is described in remarks for this constructor. False to disable that mechanism. In this case, a second request must be initiated by the user in order for the server to access the additional evidence gathered by client-side code.
hasDelayedProperties - True to include support for JavaScript properties that are not executed immediately when the JavaScript is loaded.

◆ JavaScriptResource() [2/2]

FiftyOne.Pipeline.JavaScriptBuilder.Templates.JavaScriptResource.JavaScriptResource ( string   objName,
string   jsonObject,
string   sessionId,
int   sequence,
bool   supportsPromises,
bool   supportsFetch,
Uri   url,
string   parameters,
bool   enableCookies,
bool   updateEnabled,
bool   hasDelayedProperties  
)

Constructor

The callback mechanism is a feature that allows the client-side data to be updated in the background when any properties that contain JavaScript code have been executed on the client and therefore, new evidence is available.

Parameters
objName - The name of the global-scope JavaScript object that will be created on the client-side by the JavaScript produced by the template.
jsonObject - The JSON data payload to be inserted into the template.
sessionId - The session Id to use in the JavaScript response.
sequence - The sequence value to use in the JavaScript response.
supportsPromises - If true, the template will produce JavaScript that makes use of promises. If false, promises will not be used.
supportsFetch - If true, the template will produce JavaScript that makes use of the fetch API. Otherwise, the template will fall back to using XMLHttpRequest.
url - The complete URL to use for the callback mechanism described in remarks for this constructor.
parameters - The parameters to append to the call-back URL.
enableCookies - If false, any cookies created by JavaScript properties that execute on the client-side and that start with '51D_' will be deleted automatically.
updateEnabled - True to use the callback mechanism that is described in remarks for this constructor. False to disable that mechanism. In this case, a second request must be initiated by the user in order for the server to access the additional evidence gathered by client-side code.
hasDelayedProperties - True to include support for JavaScript properties that are not executed immediately when the JavaScript is loaded.

Member Function Documentation

◆ AsDictionary()

Dictionary<string, object> FiftyOne.Pipeline.JavaScriptBuilder.Templates.JavaScriptResource.AsDictionary ( )

Get the parameters supplied to this class as a

Dictionary<string, object>

Returns
A new
Dictionary\<string, object\>
containing the parameters passed to the constructor.