public void TestGetJSONReturnsNotNull() { _json = new JSON(); var result = _json.getJSON(); Assert.IsTrue(result != null); }
public GroupController(IAccount account, IJSON json, ICSContentType contenttype, ILogging logging) { this.account = account; this.json = json; this.contenttype = contenttype; this.logging = logging; }
public void TestGetJSONReturnsCorrectFormate() { _json = new JSON(); var result = _json.getJSON(); Assert.IsTrue(result is Dictionary <string, dynamic>); }
public ConfiguratorController(IJSTree jstree, ITagConfigurator tagConfigurator, IJSON json, IFileWork filework) { this.jstree = jstree; this.tagConfigurator = tagConfigurator; this.json = json; this.filework = filework; }
/// <summary> /// /// </summary> /// <param name="ty"></param> /// <param name="i"></param> public static void ToJSON(Type ty, IJSON i) { if (_jsonMap.ContainsKey(ty)) { throw new ArgumentException(string.Format("已经为{0}注册了{1}", ty.FullName, _jsonMap[ty].GetType().FullName)); } _jsonMap.Add(ty, i); }
public void TestGetJSONReturnsOP() { _json = new JSON(); var result = _json.getJSON(); dynamic value; result.TryGetValue("op", out value); Assert.IsTrue(value != null); }
/// <summary> /// A Response containing the given status, reason and a body from the given json. /// </summary> public Of(int status, string reason, IJSON body, params IMapInput[] extraParts) : base(() => new Response.Of( new Status(status), new Reason(reason), new Body(body), new Parts.Joined(extraParts) ), live: false ) { }
public IJSON Merge(IJSON json) { foreach (String key in keys) { foreach (String foreignKey in json.Keys()) { if (key.Equals(foreignKey)) { throw new Exception("Key already exists!"); } } } StringBuilder str = new StringBuilder(json.GetFormatted()); str.Remove(0, 1).Remove(str.Length - 1, 1); if (this.length > 0) { this.json.Append(", "); } this.json.Append(str.ToString()); return(this); }
public ReportsController(IReportServer reports, IJSON json) { this._reports = reports; this._json = json; }
public TrendsController(ITrends trends, IJSON json) { _Trends = trends; _json = json; }
public ReportsController(IReportServer reports, IJSON json, IAccount account) { this.account = account; this._reports = reports; this._json = json; }
public ContentTypeController(ICSContentType contenttype, IJSON json, ILogging logging) { this.contenttype = contenttype; this.json = json; this.logging = logging; }
/// <summary> /// A 200/OK Response containing the given json. /// </summary> public Of(IJSON body, params IMapInput[] extraParts) : this(200, "OK", body, extraParts) { }
public AccountController(IAccount account, IJSON json, ILogging logging) { this.account = account; this.json = json; this.logging = logging; }
/// <summary> /// Adds a json body to a request. Sets the Content-Type to 'application/json' /// </summary> public Body(IJSON json) : this( new TextOf(() => json.Token().ToString()), "application/json" ) { }
//public static List<ConfiguratorState> configuratorState = new List<ConfiguratorState>(); public ConfiguratorController(IJSTree jstree, ITagConfigurator tagConfigurator, IJSON json) { this.jstree = jstree; this.tagConfigurator = tagConfigurator; this.json = json; }