MultilineTextDiff/VerySimpleRtfBuilder.cs
/// <summary>
/// Get ID of font for given font name.
/// </summary>
/// <param name="name">Font name to be found in the list of fonts.</param>
/// <returns>
/// ID of the font in the list.
/// </returns>
Get ID of font for given font name.
Get ID of font for given font name .
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Internal function")]
    private int GetFontId(string name)
    {
      if (string.IsNullOrWhiteSpace(name))
      {
        return (0);
      }
      string fixedName = name.Trim();
      int position = this.fontList.IndexOf(fixedName);
      if (position >= 0)
      {
        return (position + 1);
      }
      this.fontList.Add(fixedName);
      return (this.fontList.Count);
    }
[ SuppressMessage ( " " , " " , Justification = " " ) ] private int GetFontId ( string name ) { if ( string . IsNullOrWhiteSpace ( name ) ) { return ( 0 ) ; } string fixedName = name . Trim ( ) ; int position = this . fontList . IndexOf ( fixedName ) ; if ( position >= 0 ) { return ( position + 1 ) ; } this . fontList . Add ( fixedName ) ; return ( this . fontList . Count ) ; }
Get ID of font for given font name.
Get ID of font for given font name .
ID of the font in the list.
ID of the font in the list .
name
string
Font name to be found in the list of fonts.
Font name to be found in the list of fonts .