private static void AssertAjaxCodeAndMessage(string actual, AjaxResultCode expectedCode, string expectedMessage) { Assert.IsTrue(actual.IndexOf("{\"ResultCode\":" + (int)expectedCode) != -1, "The response doesn't contain the expected result code: " + expectedCode + "\r\nResponse: " + actual); if (expectedMessage != null) { Assert.IsTrue(actual.IndexOf("\"Message\":\"" + EscapeAjaxProString(expectedMessage) + "\"") != -1, "The response doesn't contain the expected message: " + expectedMessage + "\r\nResponse: " + actual); } }
internal AjaxResult(AjaxResultCode resultCode, string message, AjaxResultUserData userData) { ResultCode = resultCode; Message = message; UserData = userData; }
internal AjaxResult(AjaxResultCode resultCode, string[] messages) : this(resultCode, (messages == null ? null : string.Join(StringUtils.HTML_LINE_BREAK, messages)), null) { }
internal AjaxResult(AjaxResultCode resultCode, string message) : this(resultCode, message, null) { }
internal AjaxResult(AjaxResultCode resultCode) : this(resultCode, null, null) { }
public AjaxResult(AjaxResultCode code, object data, string message) : this(code, data) { Message = message; }
public AjaxResult(AjaxResultCode code, object data) { Code = code; Data = data; }
public AjaxResult(AjaxResultCode code, string message) { Code = code; Message = message; }
public AjaxResult(AjaxResultCode code) : this(code, "") { }