private string GetDirectoryListing(string path, IEnumerable <string> patterns)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                var lastMediaFile = Player.Config.Settings.GeneralSettings.LastSelectedMediaFileName;
                if (string.IsNullOrWhiteSpace(lastMediaFile) || IsValidUrl(lastMediaFile))
                {
                    path = Directory.GetCurrentDirectory();
                }
                else
                {
                    var lastMediaPath = MpdnPath.GetDirectoryName(lastMediaFile);
                    path = !lastMediaPath.StartsWith(@"\\") && Directory.Exists(lastMediaPath)
                        ? lastMediaPath
                        : Directory.GetCurrentDirectory();
                }
            }

            path = Path.GetFullPath(path);
            if (!Directory.Exists(path))
            {
                return(string.Empty);
            }

            var sb = new StringBuilder();

            sb.Append(path);
            var directoryInfo = (new DirectoryInfo(path));

            foreach (var d in directoryInfo.GetDirectories())
            {
                sb.Append("]]D>>" + d.Name);
            }
            var files = patterns.SelectMany(s => directoryInfo.EnumerateFiles(s));

            foreach (var f in files)
            {
                sb.Append("]]F>>" + f.Name + ">>" + f.Length.ToString(CultureInfo.InvariantCulture));
            }

            return(sb.ToString());
        }
 public CudafyCustomAsmResolver()
 {
     RegisterAssemblies(MpdnPath.GetDirectoryName(Assembly.GetAssembly(typeof(IAudioScript)).Location));
 }