public MessageProcessResponse(string message, MessageProcessResponseType type, Type entityType) { if (string.IsNullOrEmpty(message)) throw new ArgumentNullException(message); Message = message; MessageType = type; EntityType = entityType; }
private MessageProcessResponse CreateMessageResponse(string defaultMessage, MessageProcessResponseType type, params string[] keys) { keys = keys ?? new string[0]; List<string> msgKeys = new List<string>(keys) {type.ToString()}; string message = CoreSection.Current.GetLocalizationString(EntityType, msgKeys.ToArray()); if (message == string.Join(".", msgKeys.ToArray())) message = defaultMessage; return new MessageProcessResponse(message, type, EntityType) { URI = URI }; }
private MessageProcessResponse CreateMessageResponse(string defaultMessage, MessageProcessResponseType type, params string[] keys) { keys = keys ?? new string[0]; var msgKeys = new List<string>(keys) {type.ToString()}; var message = CoreSection.Current.GetLocalizationString(EntityType, msgKeys.ToArray()); if (message == string.Join(".", msgKeys.ToArray())) message = defaultMessage; return new QueryProcessResponse(EntityType, new List<Domain>()) { Message = message, MessageType = type, URI = URI }; }