예제 #1
0
        private static void FindAndRegisterValidIndexFilterManagerExtensionPoints(ExtensionPointsConfiguration extensionPointsConfiguration, ILog logger)
        {
            logger.Info("Reading index filter manager extension point configuration started");
            BaseExtensionPointConfiguration indexFilterManagerConfiguration = extensionPointsConfiguration.IndexFilterManagerConfiguration;

            if (indexFilterManagerConfiguration != null)
            {
                try
                {
                    logger.Info(String.Format("Index filter manager found: {0}, from assembly: {1}", indexFilterManagerConfiguration.FullClassName, indexFilterManagerConfiguration.LibraryFileRelativePath));
                    IIndexFilterManager indexFilterManager = CreateInstance <IIndexFilterManager>(extensionPointsConfiguration.PluginDirectoryPath, indexFilterManagerConfiguration.LibraryFileRelativePath, indexFilterManagerConfiguration.FullClassName);
                    ExtensionPointsRepository.Instance.RegisterIndexFilterManagerImplementation(indexFilterManager);
                    logger.Info(String.Format("Index filter manager {0} successfully registered.", indexFilterManagerConfiguration.FullClassName));
                }
                catch (Exception ex)
                {
                    logger.Error(String.Format("Index filter manager {0} cannot be registered: {1}", indexFilterManagerConfiguration.FullClassName, ex.Message));
                }
            }
            logger.Info("Reading index filter manager extension point configuration finished");
        }
예제 #2
0
 private static bool IsConfigurationInvalid(BaseExtensionPointConfiguration configuration)
 {
     return(String.IsNullOrWhiteSpace(configuration.FullClassName) || String.IsNullOrWhiteSpace(configuration.LibraryFileRelativePath));
 }