Exemplo n.º 1
0
        public virtual object Clone(Dictionary <object, object> clonedObjects, bool includePrimaryKey)
        {
            BackstageJob cloned = new BackstageJob();

            clonedObjects.Add(this, cloned);
            if (includePrimaryKey)
            {
                cloned._backstageJobPK = this._backstageJobPK;
            }
            cloned._runAs           = this._runAs;
            cloned._timeToRun       = this._timeToRun;
            cloned._status          = this._status;
            cloned._service         = this._service;
            cloned._action          = this._action;
            cloned._serializedArgs  = this._serializedArgs;
            cloned._removeIfSuccess = this._removeIfSuccess;
            cloned._retryCount      = this._retryCount;
            cloned._priority        = this._priority;
            cloned._uniqueCode      = this._uniqueCode;
            cloned._dependency      = this._dependency;
            cloned._queue           = this._queue;
            cloned._server          = this._server;
            cloned._tags            = this._tags;
            cloned._debug           = this._debug;
            cloned._error           = this._error;
            cloned._duration        = this._duration;
            cloned._runDt           = this._runDt;
            cloned._executionLog    = this._executionLog;
            cloned._maxCpu          = this._maxCpu;
            cloned._maxMemory       = this._maxMemory;
            cloned._midCpu          = this._midCpu;
            cloned._midMemory       = this._midMemory;


            return(cloned);
        }
Exemplo n.º 2
0
        public virtual bool Equals(object other, List <object> checked_objects)
        {
            if (checked_objects.Contains(this))
            {
                return(true);
            }

            checked_objects.Add(this);

            BackstageJob casted_other = other as BackstageJob;

            if (casted_other == null)
            {
                checked_objects.Remove(this);
                return(false);
            }

            if (!Typing.IsEquals(this.BackstageJobPK, casted_other.BackstageJobPK))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.RunAs, casted_other.RunAs))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.TimeToRun, casted_other.TimeToRun))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Status, casted_other.Status))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Service, casted_other.Service))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Action, casted_other.Action))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.SerializedArgs, casted_other.SerializedArgs))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.RemoveIfSuccess, casted_other.RemoveIfSuccess))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.RetryCount, casted_other.RetryCount))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Priority, casted_other.Priority))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.UniqueCode, casted_other.UniqueCode))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Dependency, casted_other.Dependency))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Queue, casted_other.Queue))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Server, casted_other.Server))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Tags, casted_other.Tags))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Debug, casted_other.Debug))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Error, casted_other.Error))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.Duration, casted_other.Duration))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.RunDt, casted_other.RunDt))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.ExecutionLog, casted_other.ExecutionLog))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.MaxCpu, casted_other.MaxCpu))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.MaxMemory, casted_other.MaxMemory))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.MidCpu, casted_other.MidCpu))
            {
                checked_objects.Remove(this);
                return(false);
            }
            if (!Typing.IsEquals(this.MidMemory, casted_other.MidMemory))
            {
                checked_objects.Remove(this);
                return(false);
            }
            checked_objects.Remove(this);

            return(true);
        }