EvaluateExpressions

Syntax

EvaluateExpressionsResult EvaluateExpressions(OdId tObject, EvaluateExpressionsArg tArg)

Parameters

tObject. Moniker of the development environment object, for which debugging is running.

tArg. Operation execution parameters.

Description

The EvaluateExpressions operation calculates expressions during code debugging.

Comments

The operation calculates one or several expressions in the debugging mode, which result in simple type values. To execute the operation, in the tObject field specify moniker of the object that is in debugging mode, and in the tArg field specify expression calculation parameters.

The operation results in the obtained values and the collection of linked properties.

Example

Below is the example of calculating values for two expressions during code debugging. The request contains moniker of the object that is in debugging mode and a list of calculated expressions. The response contains the obtained expression values.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<EvaluateExpressions xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>PBIOBPCAEDCOFOAEFFEFLOBMFDKGKIMENIGAAFCLHCNIIEAC!M!305559</id>
  </tObject>
<tArg xmlns="">
<expressions>
  <it>count</it>
  <it>value</it>
  </expressions>
  <withProperties>true</withProperties>
  </tArg>
  </EvaluateExpressions>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<EvaluateExpressionsResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<evaluatedExpressions xmlns="">
<it>
  <name>count</name>
  <className>System.Integer</className>
  <value>5</value>
<properties>
  <it>ToString</it>
  </properties>
  </it>
<it>
  <name>value</name>
  <className>System.Double</className>
  <value>100.5</value>
<properties>
  <it>ToString</it>
  </properties>
  </it>
  </evaluatedExpressions>
  </EvaluateExpressionsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"EvaluateExpressions" :
{
"tObject" :
{
"id" : "PBIOBPCAEDCOFOAEFFEFLOBMFDKGKIMENIGAAFCLHCNIIEAC!M!305559"
},
"tArg" :
{
"expressions" :
{
"it" :
[
"count",
"value"
]
},
"withProperties" : "true"
}
}
}

JSON response:

{
"EvaluateExpressionsResult" :
{
"evaluatedExpressions" :
{
"it" :
[
{
"name" : "count",
"className" : "System.Integer",
"value" : "5",
"properties" :
{
"it" : "ToString"
}
},
{
"name" : "value",
"className" : "System.Double",
"value" : "100.5",
"properties" :
{
"it" : "ToString"
}
}
]
}
}
}
public static EvaluateExpressionsResult EvaluateExpressions(MbId mb, string modId, string[] evaluateExpressions)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new EvaluateExpressions()
{
tArg = new EvaluateExpressionsArg()
{
expressions = evaluateExpressions,
withProperties = true
},
// Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, modId).k }
};
// Calculate expression
var result = somClient.EvaluateExpressions(tGet);
return result;
}

See also:

Working with Development Environment