public static KalathingalResponse <T> SetResponse(string statusCode, /* string localizedMessage,*/ T data, string message = null) { KalathingalResponse <T> response = new KalathingalResponse <T>() { StatusCode = statusCode, Data = data, //LocalizedMessage = localizedMessage, Message = message }; return(response); }
public static KalathingalResponse <T> SetResponse(string statusCode, /*IStringLocalizer localizer,*/ T data, string message = null, params object[] arguments) { //var localizedString = (arguments != null && arguments.Length > 0) ? // localizer[statusCode, arguments] : localizer[statusCode]; KalathingalResponse <T> response = new KalathingalResponse <T>() { StatusCode = statusCode, Data = data, //LocalizedMessage = (localizedString.ResourceNotFound) //? "Localization message not found. Please report this error code: " + statusCode //: localizedString.Value, Message = message }; return(response); }