private static void EditFeature(JObject featureRep, DelegatableFeature feature) { if (feature.EditableType == typeof(bool)) { featureRep[feature.EditablePropertyName] = !featureRep.Value <bool>(feature.EditablePropertyName); } }
private static JObject GetScopedFeature(HttpClient client, DelegatableFeature feature, string siteName, string path) { if (path != null) { if (!path.StartsWith("/")) { throw new ArgumentException("path"); } } string content; if (!client.Get($"{Configuration.TEST_SERVER_URL}" + feature.Path + "?scope=" + siteName + path, out content)) { return null; } return Utils.ToJ(content); }