Ejemplo n.º 1
0
 /// <summary>
 /// For printing boost only if not 1.0.
 /// </summary>
 public static string Boost(float boost)
 {
     if (boost != 1.0f)
     {
         // .NET compatibility fix
         return("^" + Float.ToString(boost, CultureInfo.InvariantCulture));
     }
     else
     {
         return("");
     }
 }
Ejemplo n.º 2
0
            public virtual string ToString(IFormatProvider provider)
            {
                StringBuilder sb = new StringBuilder();

                // LUCENENET: allow passing culture
                sb.Append(GetText()).Append('(').Append(Float.ToString(boost, provider)).Append(")(");
                foreach (Toffs to in termsOffsets)
                {
                    sb.Append(to);
                }
                sb.Append(')');
                return(sb.ToString());
            }