private string LoadJson() { try { StringBuilder sb = new StringBuilder(); System.Web.Script.Serialization.JavaScriptSerializer js = new System.Web.Script.Serialization.JavaScriptSerializer(); sb.Append("\"DeleteFlag\":\"" + (DeleteFlag == null ? "" : DeleteFlag.NAME) + "\""); sb.Append(","); sb.Append("\"IsReadable\":" + IsReadable.ToString().ToLower() + ""); sb.Append(","); sb.Append("\"IsCreatable\":" + IsCreatable.ToString().ToLower() + ""); sb.Append(","); sb.Append("\"IsEditable\":" + IsEditable.ToString().ToLower() + ""); sb.Append(","); sb.Append("\"IsDeletable\":" + IsDeletable.ToString().ToLower() + ""); sb.Append(","); string fEntityKeys = "{" + (FirstEntityKeys.Any() ? FirstEntityKeys.Select(x => "\"" + x.Key + "\":" + js.Serialize(x.Value)).Aggregate((a, b) => a + "," + b) : "") + "}"; sb.Append("\"FirstEntity\":" + fEntityKeys); string baseJson = base.Json; baseJson = baseJson.Replace(("\"SecurityZone\":\"" + base.SecurityZone + "\""), ("\"SecurityZone\":\"" + SecurityZone + "\"")); sb.Append(string.IsNullOrEmpty(baseJson) ? "" : ("," + baseJson)); sb.Append(",\"AVAILABLE_FORMATS\":["); if (AVAILABLE_FORMATS != null && AVAILABLE_FORMATS.Any()) { sb.Append(AVAILABLE_FORMATS.Select(x => "{" + x.Json + "}").Aggregate((a, b) => a + "," + b)); } sb.Append("]"); return(sb.ToString()); } catch (Exception e) { WSStatus status = WSStatusBase.NONE.clone(); CFunc.RegError(GetType(), e, ref status); } return(string.Empty); }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<TemplateScreenIds>("templatescreen.isreadable", request); return response.templatescreenids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<ItemIds>("item.isreadable", request); return response.itemids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<MapIds>("map.isreadable", request); return response.mapids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<HostIds>("host.isreadable", request); return response.hostids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<DiscoveryRuleIds>("drule.isreadable", request); return response.druleids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<ServiceIds>("service.isreadable", request); return response.serviceids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<UserGroupIds>("usergroup.isreadable", request); return response.usrgrpids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<HostGroupIds>("hostgroup.isreadable", request); return response.groupids; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<ProxyIds>("proxy.isreadable", request); return response.proxyids; }
public bool IsReadable(IsReadable request) { var response = base.SendRequest<bool>("trigger.isreadable", request); return response; }
public string[] IsReadable(IsReadable request) { var response = base.SendRequest<WebScenarioIds>("httptest.isreadable", request); return response.httptestids; }