FormatForeModule

Syntax

FormatForeModuleResult FormatForeModule(FormatForeModuleArg tArg)

Parameters

tArg. Operation execution parameters.

Description

The FormatForeModule operation formats unit code.

Comments

The operation formats unit code by adding single spaces and deleting insignificant spaces in various code elements. To execute the operation, in the tArg.moduleText field specify the unit code, to which formatting should be applied.

The operation results in the unit code after the formatting is applied.

Example

Below is the example of applying formatting to unit code in the development environment. The request contains unit code. The response contains unit code after the formatting is applied.

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">
<FormatForeModule xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
  <moduleText>Class test:object Function test:integer; Begin End Function test;End Class test;</moduleText>
  </tArg>
  </FormatForeModule>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<FormatForeModuleResult 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">
  <moduleText xmlns="">Class test: object Function test: integer; Begin End Function test; End Class test; </moduleText>
  </FormatForeModuleResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"FormatForeModule" :
{
"tArg" :
{
"moduleText" : "Class test:object\tFunction test:integer;\tBegin\t\t\tEnd Function test;End Class test;"
}
}
}

JSON response:

{
"FormatForeModuleResult" :
{
"moduleText" : "Class test: object \tFunction test: integer; \tBegin \t\t \tEnd Function test; End Class test; "
}
}
public static FormatForeModuleResult FormatForeModule(string text)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tFormat = new FormatForeModule()
{
tArg = new FormatForeModuleArg()
{
moduleText = text
}
};
//
var result = somClient.FormatForeModule(tFormat);
return result;
}

See also:

Working with Development Environment