public PluginProvider(Common.IServiceProvider serviceProvider, IOutputManager errorReporter) { _serviceProvider = serviceProvider; _factory = _serviceProvider.Get <IPluginFactory>(); _plugins = new Dictionary <Guid, Plugin>(); }
/// <summary> /// Reinitializes static state. /// </summary> /// <remarks>This is non-private only to facilitate unit testing. /// This should not be called by product code.</remarks> /// <param name="reader">An environment variable reader.</param> /// <param name="pluginDiscoverer">A lazy plugin discoverer.</param> /// <param name="pluginFactory">A plugin factory.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="reader" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="pluginDiscoverer" /> /// is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="pluginFactory" /> /// is <c>null</c>.</exception> public void Reinitialize(IEnvironmentVariableReader reader, Lazy<IPluginDiscoverer> pluginDiscoverer, IPluginFactory pluginFactory) { if (reader == null) { throw new ArgumentNullException(nameof(reader)); } if (pluginDiscoverer == null) { throw new ArgumentNullException(nameof(pluginDiscoverer)); } if (pluginFactory == null) { throw new ArgumentNullException(nameof(pluginFactory)); } EnvironmentVariableReader = reader; _rawPluginPaths = reader.GetEnvironmentVariable(_pluginPathsEnvironmentVariable); var requestTimeoutInSeconds = reader.GetEnvironmentVariable(_pluginRequestTimeoutEnvironmentVariable); _requestTimeout = GetRequestTimeout(requestTimeoutInSeconds); _discoverer = pluginDiscoverer; _pluginFactory = pluginFactory; _pluginOperationClaims = new ConcurrentDictionary<PluginPackageSourceKey, Lazy<Task<IReadOnlyList<OperationClaim>>>>(); _pluginUtilities = new ConcurrentDictionary<string, Lazy<IPluginMulticlientUtilities>>( StringComparer.OrdinalIgnoreCase); }
public ClaimController(ApplicationUserManager userManager, IProjectRepository projectRepository, IProjectService projectService, IClaimService claimService, IPlotRepository plotRepository, IClaimsRepository claimsRepository, IFinanceService financeService, IExportDataService exportDataService, IPluginFactory pluginFactory, ICharacterRepository characterRepository, IUriService uriService, IAccommodationRequestRepository accommodationRequestRepository, IAccommodationRepository accommodationRepository, IAccommodationService accommodationService, IAccommodationInviteService accommodationInviteService, IAccommodationInviteRepository accommodationInviteRepository) : base(userManager, projectRepository, projectService, exportDataService) { _claimService = claimService; _plotRepository = plotRepository; _claimsRepository = claimsRepository; _accommodationRequestRepository = accommodationRequestRepository; _accommodationRepository = accommodationRepository; AccommodationService = accommodationService; AccommodationInviteService = accommodationInviteService; AccommodationInviteRepository = accommodationInviteRepository; FinanceService = financeService; PluginFactory = pluginFactory; CharacterRepository = characterRepository; UriService = uriService; }
/// <summary> /// Reinitializes static state. /// </summary> /// <remarks>This is non-private only to facilitate unit testing. /// This should not be called by product code.</remarks> /// <param name="reader">An environment variable reader.</param> /// <param name="pluginDiscoverer">A lazy plugin discoverer.</param> /// <param name="pluginFactoryCreator">A plugin factory creator.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="reader" /> is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="pluginDiscoverer" /> /// is <c>null</c>.</exception> /// <exception cref="ArgumentNullException">Thrown if <paramref name="pluginFactoryCreator" /> /// is <c>null</c>.</exception> public void Reinitialize(IEnvironmentVariableReader reader, Lazy <IPluginDiscoverer> pluginDiscoverer, Func <TimeSpan, IPluginFactory> pluginFactoryCreator) { if (reader == null) { throw new ArgumentNullException(nameof(reader)); } if (pluginDiscoverer == null) { throw new ArgumentNullException(nameof(pluginDiscoverer)); } if (pluginFactoryCreator == null) { throw new ArgumentNullException(nameof(pluginFactoryCreator)); } EnvironmentVariableReader = reader; _rawPluginPaths = reader.GetEnvironmentVariable(_pluginPathsEnvironmentVariable); _connectionOptions = ConnectionOptions.CreateDefault(reader); var idleTimeoutInSeconds = EnvironmentVariableReader.GetEnvironmentVariable(_idleTimeoutEnvironmentVariable); var idleTimeout = TimeoutUtilities.GetTimeout(idleTimeoutInSeconds, PluginConstants.IdleTimeout); _discoverer = pluginDiscoverer; _pluginFactory = pluginFactoryCreator(idleTimeout); _pluginOperationClaims = new ConcurrentDictionary <PluginPackageSourceKey, Lazy <Task <IReadOnlyList <OperationClaim> > > >(); _pluginUtilities = new ConcurrentDictionary <string, Lazy <IPluginMulticlientUtilities> >( StringComparer.OrdinalIgnoreCase); }
/// <summary> /// Initializes a new instance of the <see cref="PluginsViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="visualStudioService">The visual studio service.</param> /// <param name="pluginFactory">The plugin factory.</param> public PluginsViewModel( ISettingsService settingsService, IVisualStudioService visualStudioService, IPluginFactory pluginFactory) : base(settingsService) { TraceService.WriteLine("PluginsViewModel::Constructor Start"); this.settingsService = settingsService; this.visualStudioService = visualStudioService; Plugins allPlugins = pluginFactory.GetPlugins(this.settingsService.MvvmCrossPluginsUri); this.corePlugins = this.GetPlugins(allPlugins, false); this.communityPlugins = this.GetPlugins(allPlugins, true); if (this.corePlugins.Any() == false && this.communityPlugins.Any()) { this.CommunityPluginsSelected = true; } else { this.CorePluginsSelected = true; } TraceService.WriteLine("PluginsViewModel::Constructor End"); }
/// <summary> /// Loads the attribute defined plugins on the assembly. /// </summary> /// <param name="assembly">The assembly that contains the attributes.</param> /// <param name="repository">The repository to add the plugins to.</param> /// <exception cref="T:System.ArgumentNullException"> /// <para><paramref name="assembly" /> is <see langword="null" />.</para> /// <para>-or-</para> /// <para><paramref name="repository" /> is <see langword="null" />.</para> /// </exception> private void LoadPlugins(Assembly assembly, ILoggerRepository repository) { if ((object)assembly == null) { throw new ArgumentNullException("assembly"); } if (repository == null) { throw new ArgumentNullException("repository"); } object[] array = assembly.GetCustomAttributes(typeof(PluginAttribute)).ToArray(); if (array != null && array.Length != 0) { object[] array2 = array; for (int i = 0; i < array2.Length; i++) { IPluginFactory pluginFactory = (IPluginFactory)array2[i]; try { repository.PluginMap.Add(pluginFactory.CreatePlugin()); } catch (Exception exception) { LogLog.Error(declaringType, "Failed to create plugin. Attribute [" + pluginFactory.ToString() + "]", exception); } } } }
public PrintController(ApplicationUserManager userManager, IProjectRepository projectRepository, IProjectService projectService, IExportDataService exportDataService, IPlotRepository plotRepository, IPluginFactory pluginFactory) : base(userManager, projectRepository, projectService, exportDataService) { PlotRepository = plotRepository; PluginFactory = pluginFactory; }
/// <summary> /// Initializes a new instance of the <see cref="PluginsViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="visualStudioService">The visual studio service.</param> /// <param name="pluginFactory">The plugin factory.</param> public PluginsViewModel( ISettingsService settingsService, IVisualStudioService visualStudioService, IPluginFactory pluginFactory) : base(settingsService) { TraceService.WriteLine("PluginsViewModel::Constructor Start"); this.settingsService = settingsService; this.visualStudioService = visualStudioService; Plugins allPlugins = pluginFactory.GetPlugins(this.settingsService.MvvmCrossPluginsUri); this.corePlugins = this.GetPlugins(allPlugins, false); this.communityPlugins = this.GetPlugins(allPlugins, true); if (this.corePlugins.Any() == false && this.communityPlugins.Any()) { this.CommunityPluginsSelected = true; } else { this.CorePluginsSelected = true; } TraceService.WriteLine("PluginsViewModel::Constructor End"); }
/// <summary> /// Initializes a new instance of the <see cref="SqlExportBuilder"/> class. /// </summary> /// <param name="settingsRepository">The current repository.</param> /// <param name="pluginFactory">The plugin factory.</param> /// <exception cref="System.ArgumentNullException"> /// repository /// or /// pluginFactory are null. /// </exception> public SqlExportBuilder(ISettingsRepository settingsRepository, IUserRepository userRepository, IPageRepository pageRepository, IPluginFactory pluginFactory) { if (settingsRepository == null) { throw new ArgumentNullException(nameof(settingsRepository)); } if (userRepository == null) { throw new ArgumentNullException(nameof(userRepository)); } if (pageRepository == null) { throw new ArgumentNullException(nameof(pageRepository)); } if (pluginFactory == null) { throw new ArgumentNullException(nameof(pluginFactory)); } _settingsRepository = settingsRepository; _userRepository = userRepository; _pageRepository = pageRepository; _pluginFactory = pluginFactory; IncludePages = true; IncludeConfiguration = true; }
/// <summary> /// Creates a new markdown parser which handles the image and link parsing by the various different /// markdown format parsers. /// </summary> /// <returns>An <see cref="IMarkupParser"/> for Creole,Markdown or Media wiki formats.</returns> public MarkupConverter(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, IPluginFactory pluginFactory) { _externalLinkPrefixes = new List<string>() { "http://", "https://", "www.", "mailto:", "#", "tag:" }; _pluginFactory = pluginFactory; _settingsRepository = settingsRepository; _pageRepository = pageRepository; _applicationSettings = settings; // Create the UrlResolver for all wiki urls HttpContextBase httpContext = null; if (HttpContext.Current != null) httpContext = new HttpContextWrapper(HttpContext.Current); UrlResolver = new UrlResolver(httpContext); if (!_applicationSettings.Installed) { // Skip the chain of creation, as the markup converter isn't needed but is created by // StructureMap - this is required for installation return; } CreateParserForMarkupType(); }
public InjectionConfigurationViewModelFactory( DomainActionBuilder actionBuilder, ComponentViewModelFactory componentViewModelFactory, IFindFirstLaunchTimeQuery findFirstLaunchTimeQuery, IFindGamePackageByIdQuery findGamePackageByIdQuery, IFindGamesQuery findGamesQuery, IFindLastEditedGamePackageQuery findLastEditedGamePackageQuery, IDirectoryPicker directoryPicker, IEqualityComparer <ProxySettings> stateEqualityComparer, IEventPublisher eventPublisher, IFilePicker filePicker, IPluginFactory pluginFactory, INavigationService navigationService, ITaskRunner runner) { _actionBuilder = actionBuilder; _componentViewModelFactory = componentViewModelFactory; _findFirstLaunchTimeQuery = findFirstLaunchTimeQuery; _findGamePackageByIdQuery = findGamePackageByIdQuery; _findGamesQuery = findGamesQuery; _findLastEditedGamePackageQuery = findLastEditedGamePackageQuery; _directoryPicker = directoryPicker; _stateEqualityComparer = stateEqualityComparer; _eventPublisher = eventPublisher; _filePicker = filePicker; _pluginFactory = pluginFactory; _navigationService = navigationService; _runner = runner; }
public WikiExporter(ApplicationSettings applicationSettings, PageService pageService, ISettingsRepository settingsRepository, IPageRepository pageRepository, IUserRepository userRepository, IPluginFactory pluginFactory) { if (applicationSettings == null) throw new ArgumentNullException(nameof(applicationSettings)); if (pageService == null) throw new ArgumentNullException(nameof(pageService)); if (settingsRepository == null) throw new ArgumentNullException(nameof(settingsRepository)); if (pageRepository == null) throw new ArgumentNullException(nameof(pageRepository)); if (userRepository == null) throw new ArgumentNullException(nameof(userRepository)); if (pluginFactory == null) throw new ArgumentNullException(nameof(pluginFactory)); _applicationSettings = applicationSettings; _pageService = pageService; _sqlExportBuilder = new SqlExportBuilder(settingsRepository, userRepository, pageRepository, pluginFactory); ExportFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Export"); }
private void Initialize(IEnvironmentVariableReader reader, Lazy <IPluginDiscoverer> pluginDiscoverer, Func <TimeSpan, IPluginFactory> pluginFactoryCreator, Lazy <string> pluginsCacheDirectoryPath) { EnvironmentVariableReader = reader ?? throw new ArgumentNullException(nameof(reader)); _discoverer = pluginDiscoverer ?? throw new ArgumentNullException(nameof(pluginDiscoverer)); _pluginsCacheDirectoryPath = pluginsCacheDirectoryPath ?? throw new ArgumentNullException(nameof(pluginsCacheDirectoryPath)); if (pluginFactoryCreator == null) { throw new ArgumentNullException(nameof(pluginFactoryCreator)); } #if IS_DESKTOP _rawPluginPaths = reader.GetEnvironmentVariable(EnvironmentVariableConstants.DesktopPluginPaths); #else _rawPluginPaths = reader.GetEnvironmentVariable(EnvironmentVariableConstants.CorePluginPaths); #endif if (string.IsNullOrEmpty(_rawPluginPaths)) { _rawPluginPaths = reader.GetEnvironmentVariable(EnvironmentVariableConstants.PluginPaths); } _connectionOptions = ConnectionOptions.CreateDefault(reader); var idleTimeoutInSeconds = EnvironmentVariableReader.GetEnvironmentVariable(EnvironmentVariableConstants.IdleTimeout); var idleTimeout = TimeoutUtilities.GetTimeout(idleTimeoutInSeconds, PluginConstants.IdleTimeout); _pluginFactory = pluginFactoryCreator(idleTimeout); _pluginOperationClaims = new ConcurrentDictionary <PluginRequestKey, Lazy <Task <IReadOnlyList <OperationClaim> > > >(); _pluginUtilities = new ConcurrentDictionary <string, Lazy <IPluginMulticlientUtilities> >( StringComparer.OrdinalIgnoreCase); }
public ClaimController( IProjectRepository projectRepository, IProjectService projectService, IClaimService claimService, IPlotRepository plotRepository, IClaimsRepository claimsRepository, IFinanceService financeService, IPluginFactory pluginFactory, ICharacterRepository characterRepository, IUriService uriService, IAccommodationRequestRepository accommodationRequestRepository, IAccommodationRepository accommodationRepository, IAccommodationInviteService accommodationInviteService, IAccommodationInviteRepository accommodationInviteRepository, IUserRepository userRepository) : base(projectRepository, projectService, userRepository) { _claimService = claimService; _plotRepository = plotRepository; _claimsRepository = claimsRepository; _accommodationRequestRepository = accommodationRequestRepository; _accommodationRepository = accommodationRepository; AccommodationInviteService = accommodationInviteService; AccommodationInviteRepository = accommodationInviteRepository; FinanceService = financeService; PluginFactory = pluginFactory; CharacterRepository = characterRepository; UriService = uriService; }
public ExecuteResultAction([NotNull] IPluginFactory pluginFactory) { if (pluginFactory == null) { throw new ArgumentNullException(nameof(pluginFactory)); } _pluginFactory = pluginFactory; }
public CommandInvoker(IPluginFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } this.PluginFactory = factory; }
public PageHistoryService(ApplicationSettings settings, IRepository repository, IUserContext context, PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory) : base(settings, repository) { _markupConverter = new MarkupConverter(settings, repository, pluginFactory); _context = context; _pageViewModelCache = pageViewModelCache; }
public PageHistoryService(ApplicationSettings settings, IRepository repository, IUserContext context, PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory) : base(settings, repository) { _markupConverter = new MarkupConverter(settings, repository, pluginFactory); _context = context; _pageViewModelCache = pageViewModelCache; }
public TextPluginRunner(IPluginFactory pluginFactory) { if (pluginFactory == null) throw new ArgumentNullException("pluginFactory"); _pluginFactory = pluginFactory; _plugins = GetPlugins(); }
public ExecuteResultAction([NotNull] IPluginFactory pluginFactory) { if (pluginFactory == null) { throw new ArgumentNullException(nameof(pluginFactory)); } _pluginFactory = pluginFactory; }
/// <summary> /// Initializes a new instance of the /// <see cref="PluginPipelineFactory"/> class. /// </summary> /// <param name="factory">The <see cref="IPluginFactory"/> used /// to convert individual algorithms into plugins.</param> /// <exception cref="ArgumentNullException">factory is null</exception> public PluginPipelineFactory(IPluginFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } _factory = factory; }
/// <summary> /// Initializes a new instance of the <see cref="ProcessBuilder"/> /// class. /// </summary> /// <param name="factory">The <see cref="IPluginFactory"/> used to /// resolve plugins.</param> /// <exception cref="ArgumentNullException">factory is null.</exception> public ProcessBuilder(IPluginFactory factory) { if (factory == null) { throw new ArgumentNullException("factory"); } _factory = factory; }
public DatacardStorage(IDatacardPath datacardPath, IDatacardWriter writer, IDatacardExtractor extractor, IPluginFactory pluginFactory, IFileSystem fileSystem, ISerializer serializer) { _datacardPath = datacardPath; _writer = writer; _extractor = extractor; _pluginFactory = pluginFactory; _fileSystem = fileSystem; _serializer = serializer; }
public PluginSetupController( IPluginFactory pluginFactory, IProjectRepository projectRepository, IProjectService projectService, IUserRepository userRepository) : base(projectRepository, projectService, userRepository) { PluginFactory = pluginFactory; }
public static PluginOperationData <T> GetOperationInstance <T>([NotNull] this IPluginFactory self, Project project, string plugin) where T : IPluginOperation { if (self == null) { throw new ArgumentNullException(nameof(self)); } return(self.GetProjectOperations <T>(project).SingleOrDefault(p => p.OperationName == plugin)); }
public PluginSetupController(ApplicationUserManager userManager, IPluginFactory pluginFactory, IProjectRepository projectRepository, IProjectService projectService, IExportDataService exportDataService, IUserRepository userRepository) : base(userManager, projectRepository, projectService, exportDataService, userRepository) { PluginFactory = pluginFactory; }
public PageHistoryService(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, IUserContext context, PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory) { _markupConverter = new MarkupConverter(settings, settingsRepository, pageRepository, pluginFactory); _context = context; _pageViewModelCache = pageViewModelCache; SettingsRepository = settingsRepository; PageRepository = pageRepository; }
public TextPluginRunner(IPluginFactory pluginFactory) { if (pluginFactory == null) { throw new ArgumentNullException("pluginFactory"); } _pluginFactory = pluginFactory; _plugins = GetPlugins(); }
public PageHistoryService(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, IUserContext context, PageViewModelCache pageViewModelCache, IPluginFactory pluginFactory) { _markupConverter = new MarkupConverter(settings, settingsRepository, pageRepository, pluginFactory); _context = context; _pageViewModelCache = pageViewModelCache; SettingsRepository = settingsRepository; PageRepository = pageRepository; }
public override Instance ReadChildInstance(string name, IPluginFactory graph, Type childType) { ITypeReader<XmlNode> reader = TypeReaderFactory.GetReader(childType); if (reader == null) { return base.ReadChildInstance(name, graph, childType); } XmlElement element = _element[name]; return element == null ? null : reader.Read(element, childType); }
/// <summary> /// Initializes a new instance of the <see cref="NugetPackagesBaseViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="projectFactory">The project factory.</param> /// <param name="pluginFactory">The plugin factory.</param> protected NugetPackagesBaseViewModel( ISettingsService settingsService, IPluginsService pluginsService, IProjectFactory projectFactory, IPluginFactory pluginFactory) { this.settingsService = settingsService; this.pluginsService = pluginsService; this.projectFactory = projectFactory; this.pluginFactory = pluginFactory; }
public PrintController(ApplicationUserManager userManager, IProjectRepository projectRepository, IProjectService projectService, IExportDataService exportDataService, IPlotRepository plotRepository, IPluginFactory pluginFactory, ICharacterRepository characterRepository, IUriService uriService) : base(userManager, projectRepository, projectService, exportDataService) { PlotRepository = plotRepository; PluginFactory = pluginFactory; CharacterRepository = characterRepository; UriService = uriService; }
public PluginSettingsController(ApplicationSettings settings, UserServiceBase userService, IUserContext context, SettingsService settingsService, IPluginFactory pluginFactory, IRepository repository, SiteCache siteCache, PageViewModelCache viewModelCache, ListCache listCache) : base (settings, userService, context, settingsService) { _pluginFactory = pluginFactory; _repository = repository; _siteCache = siteCache; _viewModelCache = viewModelCache; _listCache = listCache; }
/// <summary> /// Initializes a new instance of the <see cref="NugetPackagesBaseViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="projectFactory">The project factory.</param> /// <param name="pluginFactory">The plugin factory.</param> protected NugetPackagesBaseViewModel( ISettingsService settingsService, IPluginsService pluginsService, IProjectFactory projectFactory, IPluginFactory pluginFactory) { this.settingsService = settingsService; this.pluginsService = pluginsService; this.projectFactory = projectFactory; this.pluginFactory = pluginFactory; }
public PluginSettingsController(ApplicationSettings settings, UserServiceBase userService, IUserContext context, SettingsService settingsService, IPluginFactory pluginFactory, ISettingsRepository settingsRepository, SiteCache siteCache, PageViewModelCache viewModelCache, ListCache listCache) : base(settings, userService, context, settingsService) { _pluginFactory = pluginFactory; _settingsRepository = settingsRepository; _siteCache = siteCache; _viewModelCache = viewModelCache; _listCache = listCache; }
public static void RegisterPluginFactory(string name, IPluginFactory factory, bool loadOnInit) { if (!_pluginFactories.ContainsKey(name)) { _pluginFactories[name] = factory; if (loadOnInit) { _loadOnInitialization.Add(name); } } }
public SearchService(ApplicationSettings settings, IRepository repository, IPluginFactory pluginFactory, IUserContext context , Security.UserServiceBase UserService ) : base(settings, repository) { _context = context; _markupConverter = new MarkupConverter(settings, repository, pluginFactory); IndexPath = settings.SearchIndexPath; _UserService = UserService; }
public LogController(IPluginFactory outputFactory, ILogger <LogController> logger, IConfiguration configuration) { _logger = logger; _logger.SLT00003_Debug_LogController_Start(); _outputFactory = outputFactory; _config = new TransportConfiguration(); configuration?.GetSection("Transport")?.Bind(_config); _logger.SLT00002_Debug_LogController_End(); }
public ClaimController(ApplicationUserManager userManager, IProjectRepository projectRepository, IProjectService projectService, IClaimService claimService, IPlotRepository plotRepository, IClaimsRepository claimsRepository, IFinanceService financeService, IExportDataService exportDataService, IPluginFactory pluginFactory) : base(userManager, projectRepository, projectService, exportDataService) { _claimService = claimService; _plotRepository = plotRepository; _claimsRepository = claimsRepository; FinanceService = financeService; PluginFactory = pluginFactory; }
public DataFlow(IProgress <DataFlowStatus> progress, IDataFlowFacade <IBaseTable, IPlugin, ILink> dataFlowFacade, IPluginFactory pluginExecutableFactory) { this.progress = progress; this.dataFlowFacade = dataFlowFacade; this.pluginFactory = pluginExecutableFactory; this.dataFlowStatus = new DataFlowStatus(); this.nodeProgress = new NodeStateChangeProgress(); this.nodeProgress.ProgressChanged += NodeProgress_ProgressChanged; }
/// <summary> /// Initializes a new instance of the <see cref="PluginsViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="projectFactory">The project factory.</param> /// <param name="pluginFactory">The plugin factory.</param> public PluginsViewModel( ISettingsService settingsService, IPluginsService pluginsService, IProjectFactory projectFactory, IPluginFactory pluginFactory) : base(settingsService, pluginsService, projectFactory, pluginFactory) { this.settingsService = settingsService; }
public ToolsController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, PageService pageService, SearchService searchService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, IWikiImporter wikiImporter, IPluginFactory pluginFactory, WikiExporter wikiExporter) : base(settings, userManager, context, settingsService) { _pageService = pageService; _searchService = searchService; _listCache = listCache; _pageViewModelCache = pageViewModelCache; _wikiImporter = wikiImporter; _wikiExporter = wikiExporter; }
/// <summary> /// Initializes a new instance of the <see cref="XamarinFormsLabsViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="pluginFactory">The plugin factory.</param> public XamarinFormsLabsViewModel( ISettingsService settingsService, IPluginsService pluginsService, IPluginFactory pluginFactory) { TraceService.WriteLine("XamarinFormsLabsViewModel::Constructor Start"); this.settingsService = settingsService; this.pluginsService = pluginsService; this.pluginFactory = pluginFactory; TraceService.WriteLine("XamarinFormsLabsViewModel::Constructor End"); }
public WikiExporter(ApplicationSettings applicationSettings, PageService pageService, IRepository repository, IPluginFactory pluginFactory) { if (applicationSettings == null) throw new ArgumentNullException("applicationSettings"); if (pageService == null) throw new ArgumentNullException("pageService"); _applicationSettings = applicationSettings; _pageService = pageService; _sqlExportBuilder = new SqlExportBuilder(repository, pluginFactory); ExportFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "Export"); }
public RelService(ApplicationSettings settings, IRepository repository, SearchService searchService, PageHistoryService historyService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, SiteCache sitecache, IPluginFactory pluginFactory) : base(settings, repository) { _searchService = searchService; _markupConverter = new MarkupConverter(settings, repository, pluginFactory); _historyService = historyService; _context = context; _listCache = listCache; _pageViewModelCache = pageViewModelCache; _siteCache = sitecache; _pluginFactory = pluginFactory; }
/// <summary> /// Initializes a new instance of the <see cref="ApplicationSamplesOptionsViewModel" /> class. /// </summary> /// <param name="settingsService">The settings service.</param> /// <param name="cachingService">The caching service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="projectFactory">The project factory.</param> /// <param name="pluginFactory">The plugin factory.</param> public ApplicationSamplesOptionsViewModel( ISettingsService settingsService, ICachingService cachingService, IPluginsService pluginsService, IProjectFactory projectFactory, IPluginFactory pluginFactory) : base(settingsService, pluginsService, projectFactory, pluginFactory) { this.settingsService = settingsService; this.cachingService = cachingService; }
/// <summary> /// Initializes a new instance of the <see cref="NugetPackagesViewModel" /> class. /// </summary> /// <param name="applicationService">The application service.</param> /// <param name="settingsService">The settings service.</param> /// <param name="pluginsService">The plugins service.</param> /// <param name="pluginFactory">The plugin factory.</param> public NugetPackagesViewModel( IApplicationService applicationService, ISettingsService settingsService, IPluginsService pluginsService, IPluginFactory pluginFactory) { TraceService.WriteLine("NugetServicesViewModel::Constructor Start"); this.applicationService = applicationService; this.settingsService = settingsService; this.pluginsService = pluginsService; this.pluginFactory = pluginFactory; TraceService.WriteLine("NugetServicesViewModel::Constructor End"); }
public MainCommandsFactory( [NotNull] IPluginFactory pluginFactory, [NotNull] PluginCompilationEngine compilationEngine) { if (pluginFactory == null) { throw new ArgumentNullException(nameof(pluginFactory)); } if (compilationEngine == null) { throw new ArgumentNullException(nameof(compilationEngine)); } _pluginFactory = pluginFactory; _compilationEngine = compilationEngine; }
public UserManagementController(ApplicationSettings settings, UserServiceBase userManager, SettingsService settingsService, PageService pageService, SearchService searchService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, SiteCache siteCache, IWikiImporter wikiImporter, IRepository repository, IPluginFactory pluginFactory) : base(settings, userManager, context, settingsService) { _settingsService = settingsService; _pageService = pageService; _searchService = searchService; _listCache = listCache; _pageViewModelCache = pageViewModelCache; _siteCache = siteCache; _wikiImporter = wikiImporter; _repository = repository; _pluginFactory = pluginFactory; }
public PageService(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, SearchService searchService, PageHistoryService historyService, IUserContext context, ListCache listCache, PageViewModelCache pageViewModelCache, SiteCache sitecache, IPluginFactory pluginFactory) { _searchService = searchService; _markupConverter = new MarkupConverter(settings, settingsRepository, pageRepository, pluginFactory); _historyService = historyService; _context = context; _listCache = listCache; _pageViewModelCache = pageViewModelCache; _siteCache = sitecache; _pluginFactory = pluginFactory; _markupLinkUpdater = new MarkupLinkUpdater(_markupConverter.Parser); ApplicationSettings = settings; SettingsRepository = settingsRepository; PageRepository = pageRepository; }
/// <summary> /// Searches for plugins in the specified path, and loads /// any plugins that are found into a registry. /// </summary> /// <param name="p_pftFactory">The factory to use to create <see cref="Plugin"/>s.</param> /// <param name="p_pdvDiscoverer">The discoverer to use to search for plugins.</param> /// <returns>A registry containing all of the discovered plugin formats.</returns> public static PluginRegistry DiscoverManagedPlugins(IPluginFactory p_pftFactory, IPluginDiscoverer p_pdvDiscoverer) { Trace.TraceInformation("Discovering Managed Plugins..."); Trace.Indent(); PluginRegistry pgrRegistry = new PluginRegistry(p_pftFactory); if (p_pdvDiscoverer != null) foreach (string strPlugin in p_pdvDiscoverer.FindPlugins()) { Trace.TraceInformation("Found: {0}", strPlugin); if (pgrRegistry.RegisterPlugin(strPlugin)) { Trace.Indent(); Trace.TraceInformation("Registered."); Trace.Unindent(); } } Trace.Unindent(); return pgrRegistry; }
public SearchService(ApplicationSettings settings, ISettingsRepository settingsRepository, IPageRepository pageRepository, IPluginFactory pluginFactory) { if (settings == null) throw new ArgumentNullException(nameof(settings)); if (settingsRepository == null) throw new ArgumentNullException(nameof(settingsRepository)); if (pageRepository == null) throw new ArgumentNullException(nameof(pageRepository)); if (pluginFactory == null) throw new ArgumentNullException(nameof(pluginFactory)); _markupConverter = new MarkupConverter(settings, settingsRepository, pageRepository, pluginFactory); IndexPath = settings.SearchIndexPath; ApplicationSettings = settings; SettingsRepository = settingsRepository; PageRepository = pageRepository; }
/// <summary> /// Creates a new markdown parser which handles the image and link parsing by the various different /// markdown format parsers. /// </summary> /// <returns>An <see cref="IMarkupParser"/> for Creole,Markdown or Media wiki formats.</returns> public MarkupConverter(ApplicationSettings settings, IRepository repository, IPluginFactory pluginFactory) { _externalLinkPrefixes = new List<string>() { "http://", "https://", "www.", "mailto:", "#", "tag:" }; _pluginFactory = pluginFactory; _repository = repository; _applicationSettings = settings; // Create the UrlResolver for all wiki urls HttpContextBase httpContext = null; if (HttpContext.Current != null) httpContext = new HttpContextWrapper(HttpContext.Current); UrlResolver = new UrlResolver(httpContext); if (!_applicationSettings.Installed || _applicationSettings.UpgradeRequired) { string warnMessage = "Roadkill is not installed, or an upgrade is pending (ApplicationSettings.UpgradeRequired = false)." + "Skipping initialization of MarkupConverter (MarkupConverter.Parser will now be null)"; Log.Warn(warnMessage); // Skip the chain of creation, as the markup converter isn't needed return; } CreateParserForMarkupType(); }
/// <summary> /// A simple constructor that initializes the object with its dependencies. /// </summary> /// <param name="p_pgfPluginFactory">The factory to use to create plugins.</param> public PluginRegistry(IPluginFactory p_pgfPluginFactory) { PluginFactory = p_pgfPluginFactory; RegisteredPlugins = new ReadOnlyObservableList<Plugin>(m_ostRegisteredPlugins); }
public SpecialPagesController(ApplicationSettings settings, UserServiceBase userManager, IUserContext context, SettingsService settingsService, IPluginFactory pluginFactory) : base(settings, userManager, context, settingsService) { _pluginFactory = pluginFactory; }
public ConstructorInstance ToInstance(IPluginFactory factory, Type pluginType) { var plugin = factory.PluginFor(PluggedType()); var instance = new ConstructorInstance(plugin); if (InstanceKey.IsNotEmpty()) { instance.Name = InstanceKey; } var reader = new InstanceMementoPropertyReader(instance, this, factory); plugin.VisitArguments(reader); return instance; }
protected virtual Instance readInstance(IPluginFactory pluginFactory, Type pluginType) { if (IsDefault) { return new DefaultInstance(); } if (IsReference) { return new ReferencedInstance(ReferenceKey); } return ToInstance(pluginFactory, pluginType); }
/// <summary> /// Initializes a new instance of the <see cref="ServicesService" /> class. /// </summary> /// <param name="codeConfigFactory">The code config factory.</param> /// <param name="codeSnippetFactory">The code snippet factory.</param> /// <param name="settingsService">The settings service.</param> /// <param name="messageBoxService">The message box service.</param> /// <param name="nugetService">The nuget service.</param> /// <param name="pluginFactory">The plugin factory.</param> public ServicesService( ICodeConfigFactory codeConfigFactory, ICodeSnippetFactory codeSnippetFactory, ISettingsService settingsService, IMessageBoxService messageBoxService, INugetService nugetService, IPluginFactory pluginFactory) { TraceService.WriteLine("ServicesService::Constructor"); this.codeConfigFactory = codeConfigFactory; this.settingsService = settingsService; this.messageBoxService = messageBoxService; this.nugetService = nugetService; this.pluginFactory = pluginFactory; this.codeSnippetFactory = codeSnippetFactory; this.Init(); }
public SearchServiceMock(ApplicationSettings settings, IRepository repository, IPluginFactory pluginFactory) : base(settings, repository, pluginFactory) { Pages = new List<Page>(); PageContents = new List<PageContent>(); }
public DiscoveryWorker(IPluginFactory pluginFactory) { PluginFactory = pluginFactory; }