public IReadOnlyList <string> GetAllRuntimePlugins()
        {
            var allRuntimePlugins = new List <string>();

            var currentDirectory = Environment.CurrentDirectory;

            allRuntimePlugins.AddRange(SearchPluginsInFolder(currentDirectory));

            // Check to not search the same directory twice
            var specFlowAssemblyDirectory = Path.GetDirectoryName(Path.GetFullPath(_specFlowPath.GetPathToSpecFlowDll()));

            if (currentDirectory != specFlowAssemblyDirectory)
            {
                allRuntimePlugins.AddRange(SearchPluginsInFolder(specFlowAssemblyDirectory));
            }

            var assemblyLocation = _testAssembly != null && !_testAssembly.IsDynamic ? _testAssembly.Location : null;

            if (assemblyLocation.IsNotNullOrWhiteSpace() && !allRuntimePlugins.Contains(assemblyLocation))
            {
                allRuntimePlugins.Add(assemblyLocation);

                // Check to not search the same directory twice
                var assemblyDirectory = Path.GetDirectoryName(assemblyLocation);
                if (currentDirectory != assemblyDirectory && specFlowAssemblyDirectory != assemblyDirectory)
                {
                    allRuntimePlugins.AddRange(SearchPluginsInFolder(assemblyDirectory));
                }
            }

            return(_runtimePluginLocationMerger.Merge(allRuntimePlugins));
        }
        public IReadOnlyList <string> GetAllRuntimePlugins()
        {
            var allRuntimePlugins = new List <string>();

            allRuntimePlugins.AddRange(SearchPluginsInFolder(Environment.CurrentDirectory));
            allRuntimePlugins.AddRange(SearchPluginsInFolder(_pathToFolderWithSpecFlowAssembly));



            return(_runtimePluginLocationMerger.Merge(allRuntimePlugins.Distinct().ToList()));
        }
        public IReadOnlyList<string> GetAllRuntimePlugins(string testAssemblyLocation)
        {
            var allRuntimePlugins = new List<string>();

            allRuntimePlugins.AddRange(SearchPluginsInFolder(Environment.CurrentDirectory));
            allRuntimePlugins.AddRange(SearchPluginsInFolder(_pathToFolderWithSpecFlowAssembly));

            if (testAssemblyLocation.IsNotNullOrWhiteSpace())
            {
                allRuntimePlugins.AddRange(SearchPluginsInFolder(testAssemblyLocation));
            }

            return _runtimePluginLocationMerger.Merge(allRuntimePlugins.Distinct().ToList());
        }
        public IReadOnlyList <string> GetAllRuntimePlugins(string testAssemblyLocation)
        {
            var allRuntimePlugins = new List <string>();

            allRuntimePlugins.AddRange(SearchPluginsInFolder(Environment.CurrentDirectory));
            string specFlowAssemblyFolder = Path.GetDirectoryName(_specFlowPath.GetPathToSpecFlowDll());

            allRuntimePlugins.AddRange(SearchPluginsInFolder(specFlowAssemblyFolder));

            if (testAssemblyLocation.IsNotNullOrWhiteSpace())
            {
                allRuntimePlugins.AddRange(SearchPluginsInFolder(testAssemblyLocation));
            }

            return(_runtimePluginLocationMerger.Merge(allRuntimePlugins.Distinct().ToList()));
        }