示例#1
0
        public void Execute()
        {
            WeavingLog.SetLogger(this);

            var parser = FodyConfigParser.Parse(Config);

            if (parser.IsErroneous)
            {
                LogError(parser.Error);
            }
            else
            {
                ModuleLevelWeaver.Execute(parser.Result, ModuleDefinition);
            }
        }
示例#2
0
        /// <summary>
        /// Weaves the tracer to a the module specified in <see cref="ModuleDefinition"/> property. It adds a trace enter and trace leave call to all methods defined by the filter.
        /// It also replaces static Log calls to logger instance calls and extends the call parameters with method name information.
        /// It uses the configuration to identify the exact weaver behavior.
        /// </summary>
        public override void Execute()
        {
            WeavingLog.SetLogger(this);

            var parser = FodyConfigParser.Parse(Config, GetDefaultConfig());

            if (parser.IsErroneous)
            {
                LogError(parser.Error);
            }
            else
            {
                parser.Result.Filter.LogFilterInfo(this);
                ModuleLevelWeaver.Execute(parser.Result, ModuleDefinition);
            }
        }