public ExecuteReplCommand( string scriptName, string[] scriptArgs, IFileSystem fileSystem, IScriptPackResolver scriptPackResolver, IRepl repl, ILogProvider logProvider, IConsole console, IAssemblyResolver assemblyResolver, IFileSystemMigrator fileSystemMigrator, IScriptLibraryComposer composer) { Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgument("scriptPackResolver", scriptPackResolver); Guard.AgainstNullArgument("repl", repl); Guard.AgainstNullArgument("logProvider", logProvider); Guard.AgainstNullArgument("console", console); Guard.AgainstNullArgument("assemblyResolver", assemblyResolver); Guard.AgainstNullArgument("fileSystemMigrator", fileSystemMigrator); Guard.AgainstNullArgument("composer", composer); _scriptName = scriptName; _scriptArgs = scriptArgs; _fileSystem = fileSystem; _scriptPackResolver = scriptPackResolver; _repl = repl; _logger = logProvider.ForCurrentType(); _console = console; _assemblyResolver = assemblyResolver; _fileSystemMigrator = fileSystemMigrator; _composer = composer; }
protected CommonScriptEngine(IScriptHostFactory scriptHostFactory, ILogProvider logProvider) { Guard.AgainstNullArgument("logProvider", logProvider); ScriptOptions = new ScriptOptions().WithReferences(typeof(Object).Assembly); _scriptHostFactory = scriptHostFactory; _log = logProvider.ForCurrentType(); }
public static Boolean IsValidBsonId(String itemId, String type, String serviceName, String tenantKey, ILogProvider logProvider, bool throwException = true) { if (itemId.IsValidBsonId()) return true; if (!throwException) return false; logProvider.LogError($"{serviceName} : {type} is null or invalid", new { id = itemId, tenantkey = tenantKey }); throw new ArgumentException($"{type} is null or invalid"); }
public ApplicationInitialization( ILogProvider logProvider, IPluginsContainer<IServerInitializer> initializersContainer) { _deployPackagesLogger = logProvider.GetLogger("DeployPackages"); _initializersContainer = initializersContainer; }
public FileSystemMigrator(IFileSystem fileSystem, ILogProvider logProvider) { Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgument("logProvider", logProvider); _fileSystem = fileSystem; _logger = logProvider.ForCurrentType(); _fileCopies = new Dictionary<string, string> { { "packages.config", _fileSystem.PackagesFile }, { "nuget.config", _fileSystem.NugetFile }, }; _directoryMoves = new Dictionary<string, string> { { ".cache", _fileSystem.DllCacheFolder }, }; _directoryCopies = new Dictionary<string, string> { { "bin", _fileSystem.BinFolder }, { "packages", _fileSystem.PackagesFolder }, }; }
public ProcessingEngine( IPluginsContainer<ICommandImplementation> commandRepository, IPluginsContainer<ICommandObserver> commandObservers, ILogProvider logProvider, IPersistenceTransaction persistenceTransaction, IAuthorizationManager authorizationManager, XmlUtility xmlUtility, IUserInfo userInfo, ISqlUtility sqlUtility, ILocalizer localizer) { _commandRepository = commandRepository; _commandObservers = commandObservers; _logger = logProvider.GetLogger("ProcessingEngine"); _performanceLogger = logProvider.GetLogger("Performance"); _requestLogger = logProvider.GetLogger("ProcessingEngine Request"); _commandsLogger = logProvider.GetLogger("ProcessingEngine Commands"); _commandsResultLogger = logProvider.GetLogger("ProcessingEngine CommandsResult"); _persistenceTransaction = persistenceTransaction; _authorizationManager = authorizationManager; _xmlUtility = xmlUtility; _userInfo = userInfo; _sqlUtility = sqlUtility; _localizer = localizer; }
public DataMigration(ISqlExecuter sqlExecuter, ILogProvider logProvider, IInstalledPackages installedPackages) { _sqlExecuter = sqlExecuter; _logger = logProvider.GetLogger("DataMigration"); _deployPackagesLogger = logProvider.GetLogger("DeployPackages"); _installedPackages = installedPackages; }
public AuthenticationService( ILogProvider logProvider, Lazy<IAuthorizationManager> authorizationManager, Lazy<IQueryableRepository<IPasswordStrength>> passwordStrengthRules, Lazy<IQueryableRepository<IPasswordAttemptsLimit>> passwordAttemptsLimitRepository, Lazy<ISqlExecuter> sqlExecuter, Lazy<IEnumerable<ISendPasswordResetToken>> sendPasswordResetTokenPlugins) { _logger = logProvider.GetLogger("AspNetFormsAuth.AuthenticationService"); _authorizationManager = authorizationManager; _sqlExecuter = sqlExecuter; _sendPasswordResetTokenPlugin = new Lazy<ISendPasswordResetToken>(() => SinglePlugin(sendPasswordResetTokenPlugins)); _passwordStrengthRules = passwordStrengthRules; _passwordAttemptsLimits = new Lazy<IList<PasswordAttemptsLimit>>( () => { var limits = passwordAttemptsLimitRepository.Value.Query() .Select(l => new PasswordAttemptsLimit { MaxInvalidPasswordAttempts = l.MaxInvalidPasswordAttempts, TimeoutInSeconds = l.TimeoutInSeconds }) .ToList(); foreach (var limit in limits) if (limit.TimeoutInSeconds == null || limit.TimeoutInSeconds <= 0) limit.TimeoutInSeconds = int.MaxValue; return limits; }); }
public ScriptExecutor( IFileSystem fileSystem, IFilePreProcessor filePreProcessor, IScriptEngine scriptEngine, ILogProvider logProvider, IScriptLibraryComposer composer) { Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgumentProperty("fileSystem", "BinFolder", fileSystem.BinFolder); Guard.AgainstNullArgumentProperty("fileSystem", "DllCacheFolder", fileSystem.DllCacheFolder); Guard.AgainstNullArgument("filePreProcessor", filePreProcessor); Guard.AgainstNullArgument("scriptEngine", scriptEngine); Guard.AgainstNullArgument("logProvider", logProvider); Guard.AgainstNullArgument("composer", composer); References = new AssemblyReferences(DefaultReferences); Namespaces = new Collection<string>(); ImportNamespaces(DefaultNamespaces); FileSystem = fileSystem; FilePreProcessor = filePreProcessor; ScriptEngine = scriptEngine; _log = logProvider.ForCurrentType(); #pragma warning disable 618 Logger = new ScriptCsLogger(_log); #pragma warning restore 618 ScriptLibraryComposer = composer; }
public ExecuteScriptCommand( string script, string[] scriptArgs, IFileSystem fileSystem, IScriptExecutor scriptExecutor, IScriptPackResolver scriptPackResolver, ILogProvider logProvider, IAssemblyResolver assemblyResolver, IFileSystemMigrator fileSystemMigrator, IScriptLibraryComposer composer ) { Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgument("scriptExecutor", scriptExecutor); Guard.AgainstNullArgument("scriptPackResolver", scriptPackResolver); Guard.AgainstNullArgument("logProvider", logProvider); Guard.AgainstNullArgument("assemblyResolver", assemblyResolver); Guard.AgainstNullArgument("fileSystemMigrator", fileSystemMigrator); Guard.AgainstNullArgument("composer", composer); _script = script; ScriptArgs = scriptArgs; _fileSystem = fileSystem; _scriptExecutor = scriptExecutor; _scriptPackResolver = scriptPackResolver; _logger = logProvider.ForCurrentType(); _assemblyResolver = assemblyResolver; _fileSystemMigrator = fileSystemMigrator; _composer = composer; }
public LogActionAttribute() { if (Log == null) { Log = Container.Get<ILogProvider>(); } }
public DslModel(IDslParser dslParser, ILogProvider logProvider) { _dslParser = dslParser; _performanceLogger = logProvider.GetLogger("Performance"); _logger = logProvider.GetLogger("DslModel"); _dslContainer = new DslContainer(logProvider); }
public ModuleLoader(IAssemblyResolver resolver, ILogProvider logProvider, Action<Assembly, AggregateCatalog> addToCatalog, Func<CompositionContainer, IEnumerable<Lazy<IModule, IModuleMetadata>>> getLazyModules, IFileSystem fileSystem, IAssemblyUtility assemblyUtility) { Guard.AgainstNullArgument("logProvider", logProvider); _resolver = resolver; _logger = logProvider.ForCurrentType(); if (addToCatalog == null) { addToCatalog = (assembly, catalog) => { try { var assemblyCatalog = new AssemblyCatalog(assembly); catalog.Catalogs.Add(assemblyCatalog); } catch (Exception exception) { _logger.DebugFormat("Module Loader exception: {0}", exception.Message); } }; } _addToCatalog = addToCatalog; if (getLazyModules == null) { getLazyModules = container => container.GetExports<IModule, IModuleMetadata>(); } _getLazyModules = getLazyModules; _fileSystem = fileSystem; _assemblyUtility = assemblyUtility; }
public ConceptApplicationRepository( ISqlExecuter sqlExecuter, ILogProvider logProvider) { _sqlExecuter = sqlExecuter; _logger = logProvider.GetLogger("ConceptApplicationRepository"); }
public Proxy(ILogProvider logProvider, ProxySettings settings) { LogProvider = logProvider; Settings = settings; LocalReader = new PacketReader(PacketContext.ClientToServer); RemoteReader = new PacketReader(PacketContext.ServerToClient); }
public CSharpPersistentEngine(IScriptHostFactory scriptHostFactory, ILogProvider logProvider, IFileSystem fileSystem) : base(scriptHostFactory, logProvider) { Guard.AgainstNullArgument("logProvider", logProvider); _log = logProvider.ForCurrentType(); _fileSystem = fileSystem; }
public MsSqlExecuter(ConnectionString connectionString, ILogProvider logProvider, IUserInfo userInfo) { _connectionString = connectionString; _userInfo = userInfo; _logger = logProvider.GetLogger("MsSqlExecuter"); _performanceLogger = logProvider.GetLogger("Performance"); }
/// <summary> /// Initializes a new instance of the <see cref="LogScope"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="logProvider">The log provider.</param> public LogScope(string name, ILogProvider logProvider) { _name = name; _logProvider = logProvider; _dispose = level => { }; _log = _logProvider.Get(name); }
internal LogScope(string name, ILogProvider provider, Action<RuleLevel> dispose) { _name = name; _dispose = dispose; _logProvider = provider; _log = _logProvider.Get(name); }
private void RunTest(string queueName, int messageCount, int queueCount, ILogProvider logProvider, Guid id, int runTime, LinqMethodTypes linqMethodTypes) { var tasks = new List<Task>(queueCount); for (var i = 0; i < queueCount; i++) { var producer = new ProducerMethodShared(); switch (linqMethodTypes) { case LinqMethodTypes.Dynamic: tasks.Add( new Task( () => producer.RunTestDynamic<PostgreSqlMessageQueueInit>(queueName, ConnectionInfo.ConnectionString, false, messageCount, logProvider, Helpers.GenerateData, Helpers.NoVerification, true, false, id, GenerateMethod.CreateDynamic, runTime))); break; case LinqMethodTypes.Compiled: tasks.Add( new Task( () => producer.RunTestCompiled<PostgreSqlMessageQueueInit>(queueName, ConnectionInfo.ConnectionString, false, messageCount, logProvider, Helpers.GenerateData, Helpers.NoVerification, true, false, id, GenerateMethod.CreateCompiled, runTime))); break; } } tasks.AsParallel().ForAll(x => x.Start()); Task.WaitAll(tasks.ToArray()); }
public Log4NetLogProviderLoggingTests() { _memoryAppender = new MemoryAppender(); BasicConfigurator.Configure(_memoryAppender); _logProvider = new Log4NetLogProvider(); _sut = new LoggerExecutionWrapper(new Log4NetLogProvider().GetLogger("Test")); }
public HealthNancyModule(ILogProvider log, IApplicationHealthChecker checker) : base("/health") { // Make a module secure by using the below functions //this.RequiresHttps(); //this.RequiresAuthentication(); //this.RequireClaimOnUrl(); // To authorized make sure "^GET:http(s)?:\/\/.*\/health(\/)?$" is a claim. this.log = log; this.healthChecker = checker; Get["/"] = parameters => { using (log.PushContextInfo("healthcheck")) { bool isHealthy = false; try { isHealthy = this.healthChecker.IsHealthy(); } catch (Exception e) { isHealthy = false; log.WithLogLevel(LogLevel.Error).WriteGeneralException(e); } HttpStatusCode statusCode = isHealthy ? HttpStatusCode.OK : HttpStatusCode.ServiceUnavailable; return Response.AsText(statusCode.ToString()) .WithStatusCode(statusCode) .WithContentType("text/plain") .WithHeader("Content-Disposition", "inline") .WithHeader("Cache-Control", "no-cache"); } }; }
public DslParser(IDslSource dslSource, IConceptInfo[] conceptInfoPlugins, ILogProvider logProvider) { _dslSource = dslSource; _conceptInfoPlugins = conceptInfoPlugins; _performanceLogger = logProvider.GetLogger("Performance"); _logger = logProvider.GetLogger("DslParser"); }
public RoslynScriptInMemoryEngine(IScriptHostFactory scriptHostFactory, ILogProvider logProvider) : base(scriptHostFactory, logProvider) { Guard.AgainstNullArgument("logProvider", logProvider); _log = logProvider.ForCurrentType(); }
public WatchScriptCommand( Config config, string[] scriptArgs, IConsole console, IFileSystem fileSystem, ILogProvider logProvider, IFileSystemMigrator fileSystemMigrator) { Guard.AgainstNullArgument("config", config); Guard.AgainstNullArgument("scriptArgs", scriptArgs); Guard.AgainstNullArgument("console", console); Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgument("logProvider", logProvider); Guard.AgainstNullArgument("fileSystemMigrator", fileSystemMigrator); _config = config; _scriptArgs = scriptArgs; _console = console; _fileSystem = fileSystem; _logger = logProvider.ForCurrentType(); _fileSystemMigrator = fileSystemMigrator; _executeScriptCommand = new CrossAppDomainExecuteScriptCommand { Config = _config, ScriptArgs = _scriptArgs, }; }
public AppDomainAssemblyResolver( ILogProvider logProvider, IFileSystem fileSystem, IAssemblyResolver resolver, IAssemblyUtility assemblyUtility, IDictionary<string, AssemblyInfo> assemblyInfoMap = null, Func<object, ResolveEventArgs, Assembly> resolveHandler = null) { Guard.AgainstNullArgument("logProvider", logProvider); Guard.AgainstNullArgument("fileSystem", fileSystem); Guard.AgainstNullArgument("resolver", resolver); Guard.AgainstNullArgument("assemblyUtility", assemblyUtility); _assemblyInfoMap = assemblyInfoMap ?? new Dictionary<string, AssemblyInfo>(); _assemblyUtility = assemblyUtility; _logger = logProvider.ForCurrentType(); _fileSystem = fileSystem; _resolver = resolver; if (resolveHandler == null) { resolveHandler = AssemblyResolve; } AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(resolveHandler); }
//private readonly ILog _log; public StoreController(IGenreRepository genres, IAlbumsRepository albums, ILogProvider log) { _genres = genres; _albums = albums; _log = log; //_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); }
public CompileOnlyOptionFilePreProcessor( IFileSystem fileSystem, ILogProvider logProvider, IEnumerable<ILineProcessor> lineProcessors) : base(fileSystem, logProvider, lineProcessors) { }
public WatchedDirectory(IEntityProvider entityLocator, ILogProvider logProvider, IDirectoryScanner directoryScanner) { _entityLocator = entityLocator; _log = logProvider.GetLogger(GetType()); _acceptableExtensions = new List<string>(); _directoryScanner = directoryScanner; }
protected DesktopMonitorBaseViewModel(ILogProvider logProvider) { if (!IsInDesignMode) { Log = logProvider.GetLogger(GetType()); } }
public NotificationManager(ILogProvider logmanager) { _logmanager = logmanager; _gService = new GoogleService(); }
public GlobalErrorHandler(ILogProvider logProvider) { this.Logger = logProvider.GetLogger("GlobalErrorHandler"); }
public DirectoryIterator(ILogProvider logProvider = null) { _logProvider = logProvider; }
public AzureRetriever(ILogProvider logProvider, IStatusProvider statusProvider) { _LogProvider = logProvider; _StatusProvider = statusProvider; }
/// <summary> /// 初始化日志操作 /// </summary> /// <param name="provider">日志提供程序</param> /// <param name="context">日志上下文</param> /// <param name="session">用户会话</param> protected LogBase(ILogProvider provider, ILogContext context, IUserContext session) { Provider = provider; Context = context; Session = session; }
public IConfiguration SetLogProvider(ILogProvider value) { LogProvider = value; return(this); }
public EntityFrameworkGenerateMetadataFiles(ILogProvider logProvider, IDomainObjectModel dom, ConnectionString connectionString) { _performanceLogger = logProvider.GetLogger("Performance"); _dom = dom; _connectionString = connectionString; }
/// <summary> /// 初始化日志操作 /// </summary> /// <param name="provider">日志提供程序</param> /// <param name="context">日志上下文</param> /// <param name="session">用户会话</param> /// <param name="class">类名</param> private Log(ILogProvider provider, ILogContext context, ISession session, string @class) : base(provider, context, session) { _class = @class; }
public SourceWriter(RhetosBuildEnvironment buildEnvironment, ILogProvider logProvider, FilesUtility filesUtility) { _logger = logProvider.GetLogger(GetType().Name); _buildEnvironment = buildEnvironment; _filesUtility = filesUtility; }
public MacroOrderRepository(ISqlExecuter sqlExecuter, ILogProvider logProvider) { _sqlExecuter = sqlExecuter; _loadOrderLogger = logProvider.GetLogger("MacroRepositoryLoad"); _saveOrderLogger = logProvider.GetLogger("MacroRepositorySave"); }
protected CSharpScriptCompilerEngine(IScriptHostFactory scriptHostFactory, ILogProvider logProvider) : base(scriptHostFactory, logProvider) { Guard.AgainstNullArgument("logProvider", logProvider); _log = logProvider.ForCurrentType(); }
public FilesUtility(ILogProvider logProvider) { _logger = logProvider.GetLogger(GetType().Name); }
/// <summary> /// Initializes a new instance of the <see cref="SkipEventDialog"/> class. /// </summary> /// <param name="connectorClient">Connector client</param> /// <param name="eventDataProvider">Event data provider instance</param> /// <param name="logProvider">Logging component</param> public SkipEventDialog(IConnectorClient connectorClient, IEventDataProvider eventDataProvider, ILogProvider logProvider) { this.connectorClient = connectorClient; this.eventDataProvider = eventDataProvider; this.logProvider = logProvider; }
public RequestProxy(ILogProvider logProvider, IAuthenticationProvider authenticationProvider) { _authenticationProvider = authenticationProvider; _logProvider = logProvider; }
public ConfigurationProvider(IDictionary <string, ConfigurationValue> configurationValues, ILogProvider logProvider) { _configurationValues = configurationValues .ToDictionary(pair => pair.Key, pair => pair.Value, new ConfigurationKeyComparer()); _configurationProviderOptions = GetOptions <ConfigurationProviderOptions>(); _logger = logProvider.GetLogger(GetType().Name); if (_configurationProviderOptions.LegacyKeysSupport == LegacyKeysSupport.Error) { var legacyKeysReport = ReportLegacyKeys(); foreach (var message in legacyKeysReport) { _logger.Error(message); } if (legacyKeysReport.Any()) { throw new FrameworkException(legacyKeysReport.First()); } } else if (_configurationProviderOptions.LegacyKeysWarning) { foreach (var message in ReportLegacyKeys()) { _logger.Warning(message); } } }
public void AddLogProvider(ILogProvider provider) { LogProviders.Add(provider); }
public IssuesController(ICacheProvider Cache, ILogProvider Log) : base(Cache, Log) { BaseAPI = new Issues(Cache, Log); }
public SamlRequestParser(ILogProvider logProvider) { this.LogProvider = logProvider; }
public InstalledPackages(ILogProvider logProvider) { _logger = logProvider.GetLogger(GetType().Name); _packages = new Lazy <IEnumerable <InstalledPackage> >(Load); }
public Repository(ICacheProvider CacheProvider, ILogProvider LogProvider) : base(CacheProvider, LogProvider) { }
/// <summary> /// Send the log entry to the log provider. /// </summary> /// <param name="logProvider">The log provider to send the log entry to.</param> /// <param name="logEntry">The log entry that is being processed.</param> /// <param name="errorHandler"> /// The object that handles errors that occur during log processing. /// </param> /// <param name="failureCount">The number of times this log entry has failed to send.</param> protected abstract void SendToLogProvider( ILogProvider logProvider, LogEntry logEntry, IErrorHandler errorHandler, int failureCount);
public LogController(ILogProvider logProvider) { _logProvider = logProvider; }
internal Url(ICacheProvider Cache, ILogProvider Log) { CacheProvider = Cache; LogProvider = Log; }
internal PerformanceSessionManager(ILogProvider logProvider, CancellationToken token) { this.logger = logProvider.CreateLoggerInstance("PerformanceSessionManager"); this.sessionLoggerTask = this.CreateSessionLoggerTask(token); }
/// <summary> /// This constructor is typically used in deployment time, when persistence transaction does not exist. /// </summary> public MsSqlExecuter(ConnectionString connectionString, ILogProvider logProvider, IUserInfo userInfo) : this(connectionString, logProvider, userInfo, null) { }
/// <summary> /// Initializes a new instance of the <see cref="IgnoreEventShareDialog"/> class. /// </summary> /// <param name="connectorClient">Connector client </param> /// <param name="logProvider">Logging component</param> public IgnoreEventShareDialog(IConnectorClient connectorClient, ILogProvider logProvider) { this.connectorClient = connectorClient; this.logProvider = logProvider; }
public PluginScannerCache(string cacheFolder, ILogProvider logProvider, FilesUtility filesUtility) { _cacheFilePath = Path.Combine(cacheFolder, _pluginScannerCacheFilename); _logger = logProvider.GetLogger(GetType().Name); _filesUtility = filesUtility; }
/// <summary> /// Enables the logs. /// </summary> /// <param name="provider">The provider.</param> /// <exception cref="NotImplementedException"></exception> public void EnableLogs(ILogProvider provider) { this.ThrowIfNull(); this.LogProvider = provider; }
/// <summary> /// Sets the current log provider. /// </summary> /// <param name="logProvider">The log provider.</param> public static void SetCurrentLogProvider(ILogProvider logProvider) { s_currentLogProvider = logProvider; RaiseOnCurrentLogProviderSet(); }
/// <summary> /// Initializes a new instance of the <see cref="DirectLineSpeechDialogBackend"/> class. /// </summary> public DirectLineSpeechDialogBackend() { this.logger = LogRouter.GetClassLogger(); }