< Summary

Information
Class: Morpho25.Settings.TThread
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\TThread.cs
Line coverage
95%
Covered lines: 21
Uncovered lines: 1
Coverable lines: 22
Total lines: 68
Line coverage: 95.4%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_UseTreading()100%1100%
get_TThreadpriority()100%1100%
set_TThreadpriority(...)100%2100%
.ctor()100%1100%
get_Title()100%1100%
get_Values()100%1100%
get_Tags()100%1100%
ToString()100%10%

File(s)

D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\TThread.cs

#LineLine coverage
 1namespace Morpho25.Settings
 2{
 3    /// <summary>
 4    /// TThread class.
 5    /// </summary>
 6    public class TThread
 7    {
 8        private uint _tThreadpriority;
 9
 10        /// <summary>
 11        /// Is active?
 12        /// </summary>
 413        public Active UseTreading { get; set; }
 14
 15        /// <summary>
 16        /// Thread priority on Windows
 17        /// </summary>
 18        public uint TThreadpriority
 19        {
 1220            get { return _tThreadpriority; }
 21            set
 422            {
 423                if (value > 31)
 124                    value = 31;
 25
 426                _tThreadpriority = value;
 427            }
 28        }
 29
 30        /// <summary>
 31        /// Create a new tthread object.
 32        /// </summary>
 33        /// <param name="useTreading">Active.</param>
 234        public TThread()
 235        {
 236            UseTreading = Active.NO;
 237            TThreadpriority = 4;
 238        }
 39
 40        /// <summary>
 41        /// Title of the XML section
 42        /// </summary>
 143        public string Title => "TThread";
 44
 45        /// <summary>
 46        /// Values of the XML section
 47        /// </summary>
 148        public string[] Values => new[] {
 149            ((int) UseTreading).ToString(),
 150            TThreadpriority.ToString()
 151        };
 52
 53        /// <summary>
 54        /// Tags of the XML section
 55        /// </summary>
 156        public string[] Tags => new[] {
 157            "UseTThread_CallMain",
 158            "TThreadPRIO",
 159        };
 60
 61        /// <summary>
 62        /// String representation of tthread object.
 63        /// </summary>
 64        /// <returns>String representation.</returns>
 065        public override string ToString() => $"Config::Treading {UseTreading}";
 66    }
 67
 68}