Hidistro.Core/Jobs/Job.cs

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Hidistro.Core.Jobs
{
    using System;
    using System.Globalization;
    using System.Threading;
    using System.Xml;
    using System.Xml.Serialization;

    [Serializable, XmlRoot("job")]
    public class Job : IDisposable
    {
        private bool _enabled = true;
        private bool _enableShutDown = false;
        private IJob _ijob;
        private bool _isRunning;
        private Type _jobType;
        private DateTime _lastEnd;
        private DateTime _lastStart;
        private DateTime _lastSucess;
        private int _minutes = 15;
        private string _name;
        [NonSerialized]
        private XmlNode _node = null;
        private int _seconds = -1;
        private bool _singleThread = true;
        [NonSerialized]
        private Timer _timer = null;
        private bool disposed = false;

        public Job(Type ijob, XmlNode node)
        {
            if (node != null)
            {
                this._node = node;
                this._jobType = ijob;
                XmlAttribute attribute = node.Attributes["enabled"];
                if (attribute != null)
                {
                    this._enabled = bool.Parse(attribute.Value);
                }
                attribute = node.Attributes["enableShutDown"];
                if (attribute != null)
                {
                    this._enableShutDown = bool.Parse(attribute.Value);
                }
                attribute = node.Attributes["name"];
                if (attribute != null)
                {
                    this._name = attribute.Value;
                }
                attribute = node.Attributes["seconds"];
                if (attribute != null)
                {
                    this._seconds = int.Parse(attribute.Value, CultureInfo.InvariantCulture);
                }
                attribute = node.Attributes["minutes"];
                if (attribute != null)
                {
                    try
                    {
后面还有 189 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。