/// <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); }
/// <summary>Initializes the <see cref="ExcelObjectLogger" /> class. /// </summary> static ExcelObjectLogger() { sm_OutputUsage = GetOutputUsage(); sm_OutputFolder = GetOutputFolder(); }
/// <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); }