Ampere.DirectoryCache.GetPath C# (CSharp) Метод

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

public GetPath ( string name ) : string
name string
Результат string
        public string GetPath(string name)
        {
            var set = files[name];
            int count = set.Count();

            if (count > 1)
                context.Log.Error("More than one content file matches name '{0}' when using a flatten resolve (files: {1})", name, string.Join(", ", set));
            if (count != 1)
                return null;

            return set.First();
        }

Usage Example

Пример #1
0
 public static Func<string, string> Flatten(DirectoryCache cache)
 {
     return new Func<string, string>(input =>
     {
         return cache.GetPath(input);
     });
 }