private void GetOperationsFromWay(WayToGetOperation wayToGetOperation)
        {
            switch (wayToGetOperation)
            {
            case WayToGetOperation.Internal:
                operations = GetAllOperations();
                break;

            case WayToGetOperation.External:
                if (pluginReader != null)
                {
                    operations = pluginReader
                                 .ReadPluginsFrom(Environment.CurrentDirectory + "\\Plugins");
                }
                else
                {
                    throw new ArgumentNullException("PluginReader instance is null");
                }
                break;
            }
        }
Exemplo n.º 2
0
        public void PluginReader_FindsAllOperationsInDLLFiles()
        {
            var result = pluginReader.ReadPluginsFrom(pluginPath);

            Assert.Equal(4, result.Count);
        }