51Degrees Pipeline .NET  4.1

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, bool supportsPromises, string url, bool enableCookies, bool updateEnabled)
Constructor More...
 JavaScriptResource (string objName, string jsonObject, bool supportsPromises, Uri url, bool enableCookies, bool updateEnabled)
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,
bool   supportsPromises,
string   url,
bool   enableCookies,
bool   updateEnabled  
)

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.
supportsPromises - If true, the template will produce JavaScript that makes use of promises. If false, promises will not be used.
url - The complete URL to use for the callback mechanism described in remarks for this constructor.
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.

◆ JavaScriptResource() [2/2]

FiftyOne.Pipeline.JavaScriptBuilder.Templates.JavaScriptResource.JavaScriptResource ( string   objName,
string   jsonObject,
bool   supportsPromises,
Uri   url,
bool   enableCookies,
bool   updateEnabled  
)

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.
supportsPromises - If true, the template will produce JavaScript that makes use of promises. If false, promises will not be used.
url - The complete URL to use for the callback mechanism described in remarks for this constructor.
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.

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.