Пример #1
0
 private void SetCategories(MsgCallHandler handler)
 {
     handler.Categories.Clear();
     handler.Categories.AddRange(categories);
 }
Пример #2
0
        /// <summary>
        /// Creates the log handler for the target using the configured values.
        /// </summary>
        /// <returns>the created <see cref="MsgCallHandler"/>.</returns>
        public override ICallHandler CreateHandler(IUnityContainer container)
        {
            MsgCallHandler handler = new MsgCallHandler(container.Resolve<MsgWriter>());

            SetCategories(handler);
            handler.EventId = eventId;
            handler.LogAfterCall = logAfterCall;
            handler.LogBeforeCall = logBeforeCall;
            handler.BeforeMessage = beforeMessage;
            handler.AfterMessage = afterMessage;
            handler.IncludeParameters = includeParameters;
            handler.IncludeCallStack = includeCallStack;
            handler.IncludeCallTime = includeCallTime;
            handler.Priority = priority;
            handler.Severity = severity;
            handler.Order = Order;

            return handler;
        }