aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Notes/Tango.Notes/Advanced Installer/License.txt
blob: 863b3faac63a5a50bafa56617680195782d9b054 (plain)
1
2
Professional License:
2cbc99e69d2e0602285f5ada3e5d506d
/* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Logging
{
    /// <summary>
    /// Represents a library logger for routing logs to the Visual Studio output window.
    /// </summary>
    public class VSOutputLogger : ILogger
    {
        private String _assembly_name;

        /// <summary>
        /// Initializes a new instance of the <see cref="VSOutputLogger"/> class.
        /// </summary>
        public VSOutputLogger()
        {
            Enabled = true;

            _assembly_name = Assembly.GetEntryAssembly().GetName().Name + ": ";
        }

        /// <summary>
        /// Called when a new library trace is available.
        /// </summary>
        /// <param name="output">The output.</param>
        public void OnLog(LogItemBase output)
        {
            Debug.WriteLine(_assembly_name + output.ToString());
        }

        private bool _isEnabled;
        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ILogger" /> is enabled.
        /// </summary>
        public bool Enabled
        {
            get
            {
                return _isEnabled;
            }
            set
            {
                _isEnabled = value;
            }
        }
    }
}