SharedData ClassC# API
Provides functionality for communication with the Shared Data Server.
Inheritance Hierarchy

System Object
  Facilita.Fc.Runtime SharedData

Namespace: Facilita.Fc.Runtime
Assembly: fc_clr (in fc_clr.dll) Version: 9.5.5.77
Syntax

public class SharedData
Remarks

It provides the following features:
  • Data can saved in a common data store and read by other Virtual Users.
  • Data can be saved and retrieved as FIFO (first in, first out) and LIFO (last in, first out) lists against keys.
  • Data can be saved as single key/value pairs.
  • Virtual Users will optionally wait until the requested data becomes available.
  • Access is locked between Virtual Users for atomic operations.
Data is stored in the Shared Data Server as a Dictionary in the form of a key and an associated value or list of values. It can be used in a similar way to a IDataDictionary or IDataTable. The keys and values are stored as strings, typically (but not necessarily) text characters. To save data types such as integers you should convert the values to strings.
Examples

The following example demonstrates using the Shared Data Server.
// Declare a double and convert to string 
double uid = 1234.567;
string value = uid.ToString();
// Add it to the front of a shared list
sharedData.AddFirst("UID", value);
// Retrieve and then convert back to a double 
value = sharedData.First("UID", -1);
Double.TryParse(value, out uid);
See Also