Source/NFX/CodeAnalysis/Language.cs
/// <summary>
/// Tries to find a language by file extension or returns UnspecifiedLanguage
/// </summary>
Tries to find a language by file extension or returns UnspecifiedLanguage
Tries to find a language by file extension or returns UnspecifiedLanguage
public static Language TryFindLanguageByFileExtension(string fileExtension)
            {
                return All.FirstOrDefault(
                            lng => lng.FileExtensions.Contains( fileExtension, StringComparer.InvariantCultureIgnoreCase)
                           ) ?? UnspecifiedLanguage.Instance;
            }
public static Language TryFindLanguageByFileExtension ( string fileExtension ) { return All . FirstOrDefault ( lng => lng . FileExtensions . Contains ( fileExtension , StringComparer . InvariantCultureIgnoreCase ) ) ?? UnspecifiedLanguage . Instance ; }
Tries to find a language by file extension or returns UnspecifiedLanguage
Tries to find a language by file extension or returns UnspecifiedLanguage
fileExtension
string