Batman.MVC.Assets.AssetManager.DetermineType C# (CSharp) Метод

DetermineType() публичный Метод

Determines the asset type
public DetermineType ( string Path ) : AssetType
Path string Path to the asset
Результат AssetType
        public AssetType DetermineType(string Path)
        {
            AssetType Type = Translators.FirstOrDefault(x => Path.EndsWith(x.FileTypeAccepts, StringComparison.Ordinal))
                              .Chain(x => x.TranslatesTo, AssetType.Unknown);
            if (Type == AssetType.Unknown && Path.EndsWith("css", StringComparison.Ordinal))
                return AssetType.CSS;
            else if (Type == AssetType.Unknown && Path.EndsWith("js", StringComparison.Ordinal))
                return AssetType.Javascript;
            return Type;
        }