/// <summary> /// Restituisce i costruttori del client richiesto in formato JSON. Princiaplmente viene usato per capire come impostare il cofig 'BaseProxy.json' per far instanziare correttamente i client /// </summary> /// <param name="_serviceClient">Nome del clienti del quale recuperare i costruttori</param> /// <returns>I costruttori in formato stringa JSON</returns> public string GetClientConstructorInfo(string _serviceClient) { var serviceClient = new WSClient { Name = _serviceClient }; var constructors = serviceClient.GetConstructors(); List <object> _result = new List <object>(); for (var i = 0; i < constructors.Length; i++) { var constructor = constructors[i]; var _params = new List <object>(); foreach (var par in constructor.GetParameters()) { var _param = new { name = par.Name, type = par.ParameterType.Name }; _params.Add(_param); } var _constr = new { num = i.ToString(), parameters = _params }; _result.Add(_constr); } return(_result.SerializeObject()); }