Below is the example of using the SetSvc operation to enable a mode of saving operation execution statistics collected in system repository tables. To do this, the appropriate IsOn checkbox is sent in the request.
{ "SetSvc" : { "tArg" : { "credentials" : { "user" : { "id" : "pprepository" }, "pass" : "pprepository" }, "log" : { "activeFlags" : { "it" : "IsOn" } } } } }
{ "SetSvcResult" : { "log" : { "activeFlags" : { "it" : "IsOn" }, "filter" : "" } } }
public static SetSvcResult EnableSaveStatisic(MbId mb, string login, string password)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tSet = new SetSvc()
{
tArg = new SetSvcArg()
{
credentials = new UserCreds()
{
user = new UserId() { id = login },
pass = password
},
log = new SvcLogArg()
{
activeFlags = new SvcSamplingFlag[] { SvcSamplingFlag.IsOn }
}
}
};
//Set parameters
var result = somClient.SetSvc(tSet);
return result;
}
See also: