public IISSiteTests() { log = new Mock.Services.LogService(); iis = new Mock.Clients.MockIISClient(); helper = new IISSiteHelper(log, iis); plugins = new PluginService(log); }
public FileSystemOptionsFactory( IIISClient iisClient, ILogService log, IArgumentsService arguments) : base(arguments) { _log = log; _iisClient = iisClient; }
public ScriptPluginTests() { log = new Mock.Services.LogService(true); iis = new Mock.Clients.MockIISClient(); cs = new Mock.Services.CertificateService(); var tempPath = new DirectoryInfo(Environment.ExpandEnvironmentVariables("%TEMP%\\wacs")); if (!tempPath.Exists) { tempPath.Create(); } batchPath = new FileInfo(tempPath.FullName + "\\create.bat"); File.WriteAllText(batchPath.FullName, "echo hello %1"); psPath = new FileInfo(tempPath.FullName + "\\create.ps1"); File.WriteAllText(psPath.FullName, $"$arg = $($args[0])\n" + $"if ($arg -ne $null -and $arg -ne \"world\") {{ Write-Error \"Wrong\" }}\n" + $"Write-Host \"Hello $arg\"" ); psNamedPath = new FileInfo(tempPath.FullName + "\\createnamed.ps1"); File.WriteAllText(psNamedPath.FullName, $"param([Parameter(Mandatory)][string]$What)\n" + $"if ($What -ne \"world\") {{ Write-Error \"Wrong\" }} else {{\n" + $"Write-Host \"Hello $arg\" + " + $"}}" ); }
public IISSite(ILogService logService, IIISClient iisClient, IISSiteHelper helper, IISSiteOptions options) { _log = logService; _iisClient = iisClient; _helper = helper; _options = options; }
public IISBindingTests() { log = new Mock.Services.LogService(false); iis = new Mock.Clients.MockIISClient(); helper = new IISBindingHelper(log, iis); plugins = new PluginService(log); }
public IISFtp(IISFtpOptions options, IIISClient iisClient, ILogService log, UserRoleService userRoleService) { _iisClient = iisClient; _options = options; _log = log; _userRoleService = userRoleService; }
/// <summary> /// Constructore /// </summary> /// <param name="client"></param> public IISHttpBindingUpdater( IIISClient <TSite, TBinding> client, ILogService log) { _client = client; _log = log; }
public IISWeb(Target target, IISWebOptions options, IIISClient iisClient, ILogService log) { _iisClient = iisClient; _log = log; _options = options; _target = target; }
public IISBinding(ILogService logService, IIISClient iisClient, IISBindingHelper helper, IISBindingOptions options) { _iisClient = iisClient; _log = logService; _options = options; _helper = helper; }
public IISHelper(ILogService log, IIISClient iisClient, DomainParseService domainParser) { _log = log; _iisClient = iisClient; _idnMapping = new IdnMapping(); DomainParser = domainParser; }
public ScriptPluginTests() { log = new Mock.Services.LogService(true); iis = new Mock.Clients.MockIISClient(); cs = new Mock.Services.CertificateService(); var tempPath = Infrastructure.Directory.Temp(); batchPath = new FileInfo(tempPath.FullName + "\\create.bat"); File.WriteAllText(batchPath.FullName, "echo hello %1"); psPath = new FileInfo(tempPath.FullName + "\\create.ps1"); File.WriteAllText(psPath.FullName, $"$arg = $($args[0])\n" + $"if ($arg -ne $null -and $arg -ne \"world\") " + $"{{ " + $" Write-Error \"Wrong: $arg\" " + $"}} else {{" + $" Write-Host \"Hello $arg\" " + $"}}" ); psNamedPath = new FileInfo(tempPath.FullName + "\\createnamed.ps1"); File.WriteAllText(psNamedPath.FullName, $"param([Parameter(Mandatory)][string]$What)\n" + $"if ($What -ne \"world\") " + $"{{ " + $" Write-Error \"Wrong: $What\" " + $"}} else {{ " + $" Write-Host \"Hello $What\"" + $"}}" ); }
/// <summary> /// Determine the default certificate store /// </summary> /// <param name="settings"></param> /// <param name="client"></param> /// <returns></returns> public static string DefaultStore(ISettingsService settings, IIISClient client) { // First priority: specified in settings.json string?storeName; try { storeName = settings.Store.CertificateStore?.DefaultStore; if (string.IsNullOrWhiteSpace(storeName)) { storeName = settings.Store.DefaultCertificateStore; } // Second priority: defaults if (string.IsNullOrWhiteSpace(storeName)) { // Default store should be WebHosting on IIS8+, and My (Personal) for IIS7.x storeName = client.Version.Major < 8 ? nameof(StoreName.My) : "WebHosting"; } } catch { storeName = DefaultStoreName; } return(storeName); }
public ManualTests() { log = new Mock.Services.LogService(false); iis = new Mock.Clients.MockIISClient(log); version = new VersionService(log); plugins = new MockPluginService(log, version); }
public CertificateStore(ILogService log, IIISClient iisClient, CertificateStoreOptions options) { _log = log; _iisClient = iisClient; _options = options; ParseCertificateStore(); _store = new X509Store(_storeName, StoreLocation.LocalMachine); }
public IISWeb(Target target, IISWebOptions options, IIISClient iisClient, ILogService log, UserRoleService userRoleService) { _iisClient = iisClient; _log = log; _options = options; _target = target; _userRoleService = userRoleService; }
public IISSiteTests() { log = new Mock.Services.LogService(false); iis = new Mock.Clients.MockIISClient(log); helper = new IISSiteHelper(log, iis); plugins = new MockPluginService(log); userRoleService = new UserRoleService(iis); }
public IISBindingTests() { log = new Mock.Services.LogService(false); iis = new Mock.Clients.MockIISClient(log); helper = new IISHelper(log, iis); version = new VersionService(log); plugins = new MockPluginService(log, version); userRoleService = new Mock.Services.UserRoleService(); }
public IISSitesTests() { log = new mock.LogService(false); iis = new Mock.Clients.MockIISClient(log); helper = new IISHelper(log, iis); version = new VersionService(log); plugins = new mock.MockPluginService(log, version); userRoleService = new UserRoleService(iis); }
public CertificateStoreOptionsFactory( IUserRoleService userRoleService, IArgumentsService arguments, ISettingsService settings, IIISClient iisClient) { _arguments = arguments; _iisClient = iisClient; _settingsService = settings; Disabled = CertificateStore.Disabled(userRoleService); }
public IISBindingOptionsFactory( ILogService log, IIISClient iisClient, IISBindingHelper helper, IArgumentsService arguments, UserRoleService userRoleService) { _helper = helper; _log = log; _arguments = arguments; Hidden = !(iisClient.Version.Major > 6); Disabled = IISBinding.Disabled(userRoleService); }
internal static bool Disabled(UserRoleService userRoleService, IIISClient iisClient) { if (!userRoleService.AllowIIS) { return(true); } if (!iisClient.HasFtpSites) { return(true); } return(false); }
public IISSitesTests() { log = new mock.LogService(false); iis = new Mock.Clients.MockIISClient(log); var settings = new mock.MockSettingsService(); var proxy = new mock.ProxyService(); domainParse = new DomainParseService(log, proxy, settings); helper = new IISHelper(log, iis, domainParse); plugins = new mock.MockPluginService(log); userRoleService = new UserRoleService(iis); }
public IISSitesOptionsFactory(ILogService log, IIISClient iisClient, IISSiteHelper helper, IArgumentsService arguments, UserRoleService userRoleService) { _iisClient = iisClient; _siteHelper = helper; _log = log; _arguments = arguments; _optionsHelper = new IISSiteOptionsHelper(log); Hidden = !(iisClient.Version.Major > 6); Disabled = IISSites.Disabled(userRoleService); }
public CertificateStore( ILogService log, IIISClient iisClient, ISettingsService settings, UserRoleService userRoleService, CertificateStoreOptions options) { _log = log; _iisClient = iisClient; _options = options; _settings = settings; _userRoleService = userRoleService; ParseCertificateStore(); _store = new X509Store(_storeName, StoreLocation.LocalMachine); }
public IISOptionsFactory( ILogService log, IIISClient iisClient, IISHelper iisHelper, IArgumentsService arguments, IUserRoleService userRoleService) { _iisHelper = iisHelper; _log = log; _arguments = arguments; Hidden = !(iisClient.Version.Major > 6); Disabled = IIS.Disabled(userRoleService); }
public CertificateStore( ILogService log, IIISClient iisClient, ISettingsService settings, IUserRoleService userRoleService, FindPrivateKey keyFinder, CertificateStoreOptions options) { _log = log; _iisClient = iisClient; _options = options; _settings = settings; _userRoleService = userRoleService; _keyFinder = keyFinder; _storeName = options.StoreName ?? DefaultStore(settings, iisClient); if (string.Equals(_storeName, "Personal", StringComparison.InvariantCultureIgnoreCase) || string.Equals(_storeName, "Computer", StringComparison.InvariantCultureIgnoreCase)) { // Users trying to use the "My" store might have set "Personal" in their // config files, because that's what the store is called in mmc _storeName = nameof(StoreName.My); } _log.Debug("Certificate store: {_certificateStore}", _storeName); _store = new X509Store(_storeName !, StoreLocation.LocalMachine); }
public IISWebOptionsFactory(IIISClient iisClient, IArgumentsService arguments, UserRoleService userRoleService) { _iisClient = iisClient; _arguments = arguments; Disabled = IISWeb.Disabled(userRoleService, iisClient); }
public FileSystem(FileSystemOptions options, IIISClient iisClient, RunLevel runLevel, HttpValidationParameters pars) : base(options, runLevel, pars) => _iisClient = iisClient;
public IISWebOptionsFactory(ILogService log, IIISClient iisClient) : base(log) { _iisClient = iisClient; }
public FileSystemOptionsFactory(IIISClient iisClient, ILogService log) : base(log) { _iisClient = iisClient; }