public TreeWidget(GetTreeObject treeObj, string connectionString) { TreeObj = treeObj; // Modifico direttamente l'attributo locale usato per identificare la cultura del web service //TreeObj.Configuration.Locale = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName; ConnectionString = connectionString; }
private string CallNewTree(string Configuration) { try { EndpointSettings set = Newtonsoft.Json.JsonConvert.DeserializeObject <EndpointSettings>(Configuration); GetTreeObject TreeObj = new GetTreeObject() { Configuration = set }; TreeWidget tw = new TreeWidget(TreeObj, null); return(tw.GetTreeforCache(TreeObj.Configuration.Locale)); } catch (Exception) { return(null); } }