Пример #1
0
        public void SetupTest()
        {
            string solutionDirectoryPath = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory())));

            _PluginMainDirectoryPath        = Path.Combine(solutionDirectoryPath, @"_TestData\InterfaceBooster\ProviderPluginDirectory");
            _LibraryPluginMainDirectoryPath = Path.Combine(solutionDirectoryPath, @"_TestData\InterfaceBooster\LibraryPluginDirectory");
            _DatabaseWorkingDirectoryPath   = Path.Combine(solutionDirectoryPath, @"_TestData\InterfaceBooster\SyneryDB", Guid.NewGuid().ToString());

            if (Directory.Exists(_DatabaseWorkingDirectoryPath))
            {
                Directory.Delete(_DatabaseWorkingDirectoryPath, true);
            }

            Directory.CreateDirectory(_DatabaseWorkingDirectoryPath);

            _Database    = new SyneryDB(_DatabaseWorkingDirectoryPath);
            _Broadcaster = new DefaultBroadcaster();

            _ProviderPluginManager = new ProviderPluginManager(_PluginMainDirectoryPath);
            _LibraryPluginManager  = new LibraryPluginManager(_LibraryPluginMainDirectoryPath);

            _SyneryMemory = new SyneryMemory(_Database, _Broadcaster, _ProviderPluginManager, _LibraryPluginManager);

            _SyneryClient = new InterpretationClient(_SyneryMemory);
        }
 /// <summary>
 /// The memory that is used while interpreting synery code.
 /// </summary>
 /// <param name="database"></param>
 /// <param name="providerPluginManager"></param>
 public SyneryMemory(IDatabase database, IBroadcaster broadcaster, IProviderPluginManager providerPluginManager, ILibraryPluginManager libraryPluginManager)
 {
     IsInitialized         = false;
     Database              = database;
     Broadcaster           = broadcaster;
     ProviderPluginManager = providerPluginManager;
     LibraryPluginManager  = libraryPluginManager;
 }
 public ProviderPluginManagerException(IProviderPluginManager instance, string message, Exception inner)
     : base(message, inner)
 {
     ProviderPluginManager = instance;
 }