SaveAlg

Syntax

bool SaveAlg(AlgId tAlg)

Parameters

tAlg. Moniker of opened indicators calculation algorithm instance.

Description

The SaveAlg operation saves indicators calculation algorithm instance.

Comments

The operation is called for the calculation algorithm instance opened for edit, after making all necessary changes. To execute the operation, in the tAlg field specify moniker of opened calculation algorithm instance. The moniker can be obtained on executing the OpenAlg operation.

The operation results in the logical True if the calculation algorithm was saved successfully.

Example

Below is the example of saving calculation algorithm. The request contains opened calculation algorithm instance moniker. The response contains whether saving was successful.

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">
<SaveAlg xmlns="http://www.fsight.ru/PP.SOM.Som">
<tAlg xmlns="">
  <id>S1!M!S!C1</id>
  </tAlg>
  </SaveAlg>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <SaveAlgResult 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">1</SaveAlgResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"SaveAlg" :
{
"tAlg" :
{
"id" : "S1!M!S!C1"
}
}
}

JSON response:

{
"SaveAlgResult" : "1"
}
public static bool SaveAlg(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSave = new SaveAlg()
{
tAlg = new AlgId() { id = moniker }
};
//Save indicators calculation algorithm
var result = somClient.SaveAlg(tSave);
return result;
}

See also:

Working with Indicators Calculation Algorithm