public MessageProcessResponse(string message, MessageProcessResponseType type, Type entityType)
 {
     if (string.IsNullOrEmpty(message))
         throw new ArgumentNullException(message);
     Message = message;
     MessageType = type;
     EntityType = entityType;
 }
Esempio n. 2
0
 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 };
 }
Esempio n. 3
0
 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
                };
 }