public RazorLightService(IComponentSettings componentSettings, IWebHostEnvironment host) { _componentSettings = componentSettings; _componentSettings.SetUrl(host.ContentRootPath); Engine = new RazorLightEngineBuilder() .UseFileSystemProject(componentSettings.BaseComponentFullDir) .UseMemoryCachingProvider() .Build(); //Engine = engine; }
/// <summary> /// Monitors a directory for files that match a specified file filter, passed via /// properties. /// </summary> public FileWatcherComponent(IComponentSettings settings, IMessagePublisher eventPublisher, ILogger <FileWatcherComponent> logger) { Settings = settings; _logger = logger; _existingFileChecker = new ExistingFileChecker(this, _logger); _messagePublisher = eventPublisher; ConfigureDirectoryAndFilter(); ConfigureBufferSize(); }
public MaComponentRenderer( IIMaComponent imaComponent, RazorLightService viewRenderService, IServiceProvider serviceProvider, IWebHostEnvironment hostingEnvironment, IComponentSettings componentSettings) { _imaComponent = imaComponent; _componentSettings = componentSettings; viewRenderer = viewRenderService; _serviceProvider = serviceProvider; _hostingEnvironment = hostingEnvironment; }
public NodeManagerComponent(IComponentSettings settings, ILogger <NodeManagerComponent> logger) { Settings = settings; _masterConfiguration = new ConfigurationBuilder() .SetBasePath(Environment.CurrentDirectory) .AddJsonFile(Settings.Properties["masterConfigurationFile"], optional: false, reloadOnChange: true) .AddEnvironmentVariables() .Build(); _logger = logger; _nodeSynchronizer = new NodeSynchronizer(); _distributedLockFactory = new DistributedLockFactory(_masterConfiguration); _masterWebApi = new Program(_masterConfiguration); }
// attempt to load all assemblies passed through configuration private void LoadRequestedAssemblies() { // this is when the validity of the configuration will be important // if paths or namespaces are incorrect we won't be able to load // the requested resources, resulting in an error state ComponentType = GetTypeFromAssembly(ComponentConfiguration.AssemblyPath, ComponentConfiguration.FullyQualifiedClassName); // component is required, while message publisher is optional // since not all components will use a message publisher if (ComponentType is null) { HostState = HostState.Errored; } else if (!(MessagePublisherConfiguration is null)) { ConfigureMessagePublisher(); } _componentSettings = ComponentConfiguration.ToComponentSettings(); _messagePublisherSettings = MessagePublisherConfiguration.ToMessagePublisherSettings(); }
public ReplicationComponent(IComponentSettings settings, ILogger <ReplicationComponent> logger) { Settings = settings; _logger = logger; }
public IMaComponent(IWebHostEnvironment hostingEnvironment, IComponentSettings componentSettings) { _hostingEnvironment = hostingEnvironment; _componentSettings = componentSettings; _componentSettings.SetUrl(_hostingEnvironment.ContentRootPath); }