コード例 #1
0
        private static void LogTaskParam(Common.ILogger log, string direction, string name, params string[] values)
        {
            var stringValues = values?.Select(s => s) ?? Enumerable.Empty <string>();

            log.Log(Common.LogLevel.Debug, $"({direction}) {name} '{string.Join(";", stringValues)}'");
        }
コード例 #2
0
 public void Debug(string msg)
 {
     _logger.Log(msg, LogLevel.Info);
 }
コード例 #3
0
 public void Log(ILogMessage message)
 {
     _logger.Log(message);
 }
コード例 #4
0
        public async Task <bool> LoadTargetModule(string targetModulePath)
        {
            if (!File.Exists(targetModulePath))
            {
                await _logger.Log("Could not locate target module", LogLevel.Error);

                return(await Task.FromResult(false));
            }

            if (_targetModule != null)
            {
                _targetModule.Dispose();
            }

            _targetModule = ModuleDefMD.Load(targetModulePath);

            if (_targetModule == null)
            {
                await _logger.Log("Could not load target module", LogLevel.Error);

                return(await Task.FromResult(false));
            }

            _targetModulePath = _targetModule.Location;

            return(await Task.FromResult(true));
        }