示例#1
0
        /// <summary>Gets a flag from the configuration file indicating which kind of output to apply.
        /// </summary>
        /// <returns>The value of the flag in the configuration file or a spcific standard value.</returns>
        internal static ExcelLogger.OutputUsage GetOutputUsage()
        {
            ExcelLogger.OutputUsage result = ExcelLogger.OutputUsage.None;

            string stringRepresentation;

            if (ExcelAddIn.Configuration.GeneralSettings.TryGetValue(m_OutputUsageConfigKey, out stringRepresentation, defaultValue: "") == true)
            {
                if (Enum.TryParse <ExcelLogger.OutputUsage>(stringRepresentation, out result) == false)
                {
                    return(ExcelLogger.OutputUsage.None);
                }
            }
            return(result);
        }
示例#2
0
 /// <summary>Initializes the <see cref="ExcelObjectLogger" /> class.
 /// </summary>
 static ExcelObjectLogger()
 {
     sm_OutputUsage  = GetOutputUsage();
     sm_OutputFolder = GetOutputFolder();
 }
示例#3
0
 /// <summary>Stores a flag in the config file indicating which kind of output to apply.
 /// </summary>
 /// <param name="outputUsage">The output usage.</param>
 internal static void SetOutputUsage(ExcelLogger.OutputUsage outputUsage)
 {
     ExcelAddIn.Configuration.GeneralSettings.SetValue(m_OutputUsageConfigKey, outputUsage);
 }