21 namespace Lucene.Net.Messages
31 private const long serialVersionUID = - 3077643314630884523L;
33 private System.String key;
35 private System.Object[] arguments =
new System.Object[0];
42 public MessageImpl(System.String key, params System.Object[] args):this(key)
44 this.arguments = args;
47 public virtual object[] GetArguments()
49 return this.arguments;
52 public virtual string Key
54 get {
return this.key; }
57 public virtual string GetLocalizedMessage()
59 return GetLocalizedMessage(System.Threading.Thread.CurrentThread.CurrentCulture);
62 public virtual string GetLocalizedMessage(System.Globalization.CultureInfo locale)
67 public override string ToString()
69 System.Object[] args = GetArguments();
70 StringBuilder argsString =
new StringBuilder();
73 for (
int i = 0; i < args.Length; i++)
75 argsString.Append(i == 0 ?
" " :
", ").Append(args[i]);
78 return argsString.ToString();