ShellMe.CommandLine.CommandHandling.CommandFactory.LoadCommands C# (CSharp) Method

LoadCommands() private method

private LoadCommands ( string path ) : void
path string
return void
        private void LoadCommands(string path)
        {
            var pluginDirectory = string.IsNullOrEmpty(path) ?
                new DirectoryInfo(Path.Combine(Directory.GetParent(Assembly.GetCallingAssembly().Location).FullName, "plugins")) :
                new DirectoryInfo(path);

            _commandMetaDataList.AddRange(
                pluginDirectory
                    .EnumerateDirectories("*", SearchOption.TopDirectoryOnly)
                    .SelectMany(LoadCommandsFromDirectory));
        }