public IHttpActionResult WrapResponse(object data, ApiResponseWrap.ResponseState state, IEnumerable <ApiResponseWrap.Message> messages) { // добавляем сообщения, если надо messages.Do(a => ResponseMessages.AddRange(a)); return(Json(new ApiResponseWrap(state, data, ResponseMessages))); }
public IHttpActionResult WrapResponse(object data, ApiResponseWrap.ResponseState state, ApiResponseWrap.Message message) { return(WrapResponse(data, state, message.IfNotNull(a => new ApiResponseWrap.Message[] { message }).IfNull(new ApiResponseWrap.Message[0]))); }
public IHttpActionResult WrapResponse(object data, ApiResponseWrap.ResponseState state) { return(WrapResponse(data, state, new ApiResponseWrap.Message[0])); }