public BulkUploadBaseFilter(JToken node) : base(node) { if (node["uploadedOnGreaterThanOrEqual"] != null) { this._UploadedOnGreaterThanOrEqual = ParseInt(node["uploadedOnGreaterThanOrEqual"].Value <string>()); } if (node["uploadedOnLessThanOrEqual"] != null) { this._UploadedOnLessThanOrEqual = ParseInt(node["uploadedOnLessThanOrEqual"].Value <string>()); } if (node["uploadedOnEqual"] != null) { this._UploadedOnEqual = ParseInt(node["uploadedOnEqual"].Value <string>()); } if (node["statusIn"] != null) { this._StatusIn = node["statusIn"].Value <string>(); } if (node["statusEqual"] != null) { this._StatusEqual = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), node["statusEqual"].Value <string>()); } if (node["bulkUploadObjectTypeEqual"] != null) { this._BulkUploadObjectTypeEqual = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), node["bulkUploadObjectTypeEqual"].Value <string>()); } if (node["bulkUploadObjectTypeIn"] != null) { this._BulkUploadObjectTypeIn = node["bulkUploadObjectTypeIn"].Value <string>(); } }
protected void EmitException(Exception e) { IsBusy = false; CancellationPending = false; Status = BatchJobStatus.Error; if (OnException != null) { if (this._asyncOperation != null) { if (_finishAsyncopertion) { this._asyncOperation.PostOperationCompleted(this._operationException, new BatchJobExceptionEventArgs(e)); } else { this._asyncOperation.Post(this._operationException, new BatchJobExceptionEventArgs(e)); } } else { this._operationException(new BatchJobExceptionEventArgs(e)); } } _finishAsyncopertion = false; }
public void RunSync() { if (!this._isbusy) { try { this.IsBusy = true; this.Status = BatchJobStatus.Busy; //Log.Info("Job {0} started syncronously.", Name); RunThis(); EmitJobCompleted(); } catch (OperationCanceledException) { EmitJobCancelled(); } catch (Exception e) { EmitException(e); } } else { EmitException(new InvalidOperationException("Job is already running!")); } }
private void OperationAborted(object o) { IsBusy = false; CancellationPending = false; Status = BatchJobStatus.Aborted; //Log.Info("Job {0} cancelled by user.", Name); if (OnJobCancelled != null) { OnJobCancelled(this, EventArgs.Empty); } }
public void Cancel() { if (!CanCancel) { throw new InvalidOperationException("Cancelling is not supported for this batch job!"); } if (CanCancel && IsBusy) { CancellationPending = true; Status = BatchJobStatus.CancellationPending; } }
public void RunAsync(System.ComponentModel.AsyncOperation syncContext) { if (!IsBusy) { this._asyncOperation = syncContext; //we pass the worker thread back to this calling thread so we can call abort on it Action action = () => { this._workerThread = Thread.CurrentThread; this.RunThis(); }; this.IsBusy = true; this.Status = BatchJobStatus.Busy; action.BeginInvoke(this.RunJobAsyncCallback, action); } else { EmitException(new InvalidOperationException("Job is already running!")); } }
private void OperationCompleted(object o) { IsBusy = false; CancellationPending = false; //set the status if we forgot to do so in the batch BatchJobStatus status = Status; if (status != BatchJobStatus.Success && status != BatchJobStatus.Success && status != BatchJobStatus.Error) { Status = BatchJobStatus.Success; } //Log.Debug("Job {0} completed.", Name); if (OnJobCompleted != null) { OnJobCompleted(this, EventArgs.Empty); } }
public BulkUploadBaseFilter(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "uploadedOnGreaterThanOrEqual": this._UploadedOnGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "uploadedOnLessThanOrEqual": this._UploadedOnLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "uploadedOnEqual": this._UploadedOnEqual = ParseInt(propertyNode.InnerText); continue; case "statusIn": this._StatusIn = propertyNode.InnerText; continue; case "statusEqual": this._StatusEqual = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), propertyNode.InnerText); continue; case "bulkUploadObjectTypeEqual": this._BulkUploadObjectTypeEqual = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), propertyNode.InnerText); continue; case "bulkUploadObjectTypeIn": this._BulkUploadObjectTypeIn = propertyNode.InnerText; continue; } } }
public BatchJob(JToken node) : base(node) { if (node["id"] != null) { this._Id = ParseLong(node["id"].Value <string>()); } if (node["partnerId"] != null) { this._PartnerId = ParseInt(node["partnerId"].Value <string>()); } if (node["createdAt"] != null) { this._CreatedAt = ParseInt(node["createdAt"].Value <string>()); } if (node["updatedAt"] != null) { this._UpdatedAt = ParseInt(node["updatedAt"].Value <string>()); } if (node["deletedAt"] != null) { this._DeletedAt = ParseInt(node["deletedAt"].Value <string>()); } if (node["lockExpiration"] != null) { this._LockExpiration = ParseInt(node["lockExpiration"].Value <string>()); } if (node["executionAttempts"] != null) { this._ExecutionAttempts = ParseInt(node["executionAttempts"].Value <string>()); } if (node["lockVersion"] != null) { this._LockVersion = ParseInt(node["lockVersion"].Value <string>()); } if (node["entryId"] != null) { this._EntryId = node["entryId"].Value <string>(); } if (node["entryName"] != null) { this._EntryName = node["entryName"].Value <string>(); } if (node["jobType"] != null) { this._JobType = (BatchJobType)StringEnum.Parse(typeof(BatchJobType), node["jobType"].Value <string>()); } if (node["jobSubType"] != null) { this._JobSubType = ParseInt(node["jobSubType"].Value <string>()); } if (node["data"] != null) { this._Data = ObjectFactory.Create <JobData>(node["data"]); } if (node["status"] != null) { this._Status = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), node["status"].Value <string>()); } if (node["abort"] != null) { this._Abort = ParseInt(node["abort"].Value <string>()); } if (node["checkAgainTimeout"] != null) { this._CheckAgainTimeout = ParseInt(node["checkAgainTimeout"].Value <string>()); } if (node["message"] != null) { this._Message = node["message"].Value <string>(); } if (node["description"] != null) { this._Description = node["description"].Value <string>(); } if (node["priority"] != null) { this._Priority = ParseInt(node["priority"].Value <string>()); } if (node["history"] != null) { this._History = new List <BatchHistoryData>(); foreach (var arrayNode in node["history"].Children()) { this._History.Add(ObjectFactory.Create <BatchHistoryData>(arrayNode)); } } if (node["bulkJobId"] != null) { this._BulkJobId = ParseInt(node["bulkJobId"].Value <string>()); } if (node["batchVersion"] != null) { this._BatchVersion = ParseInt(node["batchVersion"].Value <string>()); } if (node["parentJobId"] != null) { this._ParentJobId = ParseInt(node["parentJobId"].Value <string>()); } if (node["rootJobId"] != null) { this._RootJobId = ParseInt(node["rootJobId"].Value <string>()); } if (node["queueTime"] != null) { this._QueueTime = ParseInt(node["queueTime"].Value <string>()); } if (node["finishTime"] != null) { this._FinishTime = ParseInt(node["finishTime"].Value <string>()); } if (node["errType"] != null) { this._ErrType = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), node["errType"].Value <string>()); } if (node["errNumber"] != null) { this._ErrNumber = ParseInt(node["errNumber"].Value <string>()); } if (node["estimatedEffort"] != null) { this._EstimatedEffort = ParseInt(node["estimatedEffort"].Value <string>()); } if (node["urgency"] != null) { this._Urgency = ParseInt(node["urgency"].Value <string>()); } if (node["schedulerId"] != null) { this._SchedulerId = ParseInt(node["schedulerId"].Value <string>()); } if (node["workerId"] != null) { this._WorkerId = ParseInt(node["workerId"].Value <string>()); } if (node["batchIndex"] != null) { this._BatchIndex = ParseInt(node["batchIndex"].Value <string>()); } if (node["lastSchedulerId"] != null) { this._LastSchedulerId = ParseInt(node["lastSchedulerId"].Value <string>()); } if (node["lastWorkerId"] != null) { this._LastWorkerId = ParseInt(node["lastWorkerId"].Value <string>()); } if (node["dc"] != null) { this._Dc = ParseInt(node["dc"].Value <string>()); } if (node["jobObjectId"] != null) { this._JobObjectId = node["jobObjectId"].Value <string>(); } if (node["jobObjectType"] != null) { this._JobObjectType = ParseInt(node["jobObjectType"].Value <string>()); } }
public BulkUpload(JToken node) : base(node) { if (node["id"] != null) { this._Id = ParseLong(node["id"].Value <string>()); } if (node["uploadedBy"] != null) { this._UploadedBy = node["uploadedBy"].Value <string>(); } if (node["uploadedByUserId"] != null) { this._UploadedByUserId = node["uploadedByUserId"].Value <string>(); } if (node["uploadedOn"] != null) { this._UploadedOn = ParseInt(node["uploadedOn"].Value <string>()); } if (node["numOfEntries"] != null) { this._NumOfEntries = ParseInt(node["numOfEntries"].Value <string>()); } if (node["status"] != null) { this._Status = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), node["status"].Value <string>()); } if (node["logFileUrl"] != null) { this._LogFileUrl = node["logFileUrl"].Value <string>(); } if (node["csvFileUrl"] != null) { this._CsvFileUrl = node["csvFileUrl"].Value <string>(); } if (node["bulkFileUrl"] != null) { this._BulkFileUrl = node["bulkFileUrl"].Value <string>(); } if (node["bulkUploadType"] != null) { this._BulkUploadType = (BulkUploadType)StringEnum.Parse(typeof(BulkUploadType), node["bulkUploadType"].Value <string>()); } if (node["results"] != null) { this._Results = new List <BulkUploadResult>(); foreach (var arrayNode in node["results"].Children()) { this._Results.Add(ObjectFactory.Create <BulkUploadResult>(arrayNode)); } } if (node["error"] != null) { this._Error = node["error"].Value <string>(); } if (node["errorType"] != null) { this._ErrorType = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), node["errorType"].Value <string>()); } if (node["errorNumber"] != null) { this._ErrorNumber = ParseInt(node["errorNumber"].Value <string>()); } if (node["fileName"] != null) { this._FileName = node["fileName"].Value <string>(); } if (node["description"] != null) { this._Description = node["description"].Value <string>(); } if (node["numOfObjects"] != null) { this._NumOfObjects = ParseInt(node["numOfObjects"].Value <string>()); } if (node["bulkUploadObjectType"] != null) { this._BulkUploadObjectType = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), node["bulkUploadObjectType"].Value <string>()); } }
public BatchJobBaseFilter(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "idEqual": this._IdEqual = ParseLong(propertyNode.InnerText); continue; case "idGreaterThanOrEqual": this._IdGreaterThanOrEqual = ParseLong(propertyNode.InnerText); continue; case "partnerIdEqual": this._PartnerIdEqual = ParseInt(propertyNode.InnerText); continue; case "partnerIdIn": this._PartnerIdIn = propertyNode.InnerText; continue; case "partnerIdNotIn": this._PartnerIdNotIn = propertyNode.InnerText; continue; case "createdAtGreaterThanOrEqual": this._CreatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "createdAtLessThanOrEqual": this._CreatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "updatedAtGreaterThanOrEqual": this._UpdatedAtGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "updatedAtLessThanOrEqual": this._UpdatedAtLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "executionAttemptsGreaterThanOrEqual": this._ExecutionAttemptsGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "executionAttemptsLessThanOrEqual": this._ExecutionAttemptsLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "lockVersionGreaterThanOrEqual": this._LockVersionGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "lockVersionLessThanOrEqual": this._LockVersionLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "entryIdEqual": this._EntryIdEqual = propertyNode.InnerText; continue; case "jobTypeEqual": this._JobTypeEqual = (BatchJobType)StringEnum.Parse(typeof(BatchJobType), propertyNode.InnerText); continue; case "jobTypeIn": this._JobTypeIn = propertyNode.InnerText; continue; case "jobTypeNotIn": this._JobTypeNotIn = propertyNode.InnerText; continue; case "jobSubTypeEqual": this._JobSubTypeEqual = ParseInt(propertyNode.InnerText); continue; case "jobSubTypeIn": this._JobSubTypeIn = propertyNode.InnerText; continue; case "jobSubTypeNotIn": this._JobSubTypeNotIn = propertyNode.InnerText; continue; case "statusEqual": this._StatusEqual = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), propertyNode.InnerText); continue; case "statusIn": this._StatusIn = propertyNode.InnerText; continue; case "statusNotIn": this._StatusNotIn = propertyNode.InnerText; continue; case "priorityGreaterThanOrEqual": this._PriorityGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "priorityLessThanOrEqual": this._PriorityLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "priorityEqual": this._PriorityEqual = ParseInt(propertyNode.InnerText); continue; case "priorityIn": this._PriorityIn = propertyNode.InnerText; continue; case "priorityNotIn": this._PriorityNotIn = propertyNode.InnerText; continue; case "batchVersionGreaterThanOrEqual": this._BatchVersionGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "batchVersionLessThanOrEqual": this._BatchVersionLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "batchVersionEqual": this._BatchVersionEqual = ParseInt(propertyNode.InnerText); continue; case "queueTimeGreaterThanOrEqual": this._QueueTimeGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "queueTimeLessThanOrEqual": this._QueueTimeLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "finishTimeGreaterThanOrEqual": this._FinishTimeGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "finishTimeLessThanOrEqual": this._FinishTimeLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "errTypeEqual": this._ErrTypeEqual = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), propertyNode.InnerText); continue; case "errTypeIn": this._ErrTypeIn = propertyNode.InnerText; continue; case "errTypeNotIn": this._ErrTypeNotIn = propertyNode.InnerText; continue; case "errNumberEqual": this._ErrNumberEqual = ParseInt(propertyNode.InnerText); continue; case "errNumberIn": this._ErrNumberIn = propertyNode.InnerText; continue; case "errNumberNotIn": this._ErrNumberNotIn = propertyNode.InnerText; continue; case "estimatedEffortLessThan": this._EstimatedEffortLessThan = ParseInt(propertyNode.InnerText); continue; case "estimatedEffortGreaterThan": this._EstimatedEffortGreaterThan = ParseInt(propertyNode.InnerText); continue; case "urgencyLessThanOrEqual": this._UrgencyLessThanOrEqual = ParseInt(propertyNode.InnerText); continue; case "urgencyGreaterThanOrEqual": this._UrgencyGreaterThanOrEqual = ParseInt(propertyNode.InnerText); continue; } } }
public BatchJobBaseFilter(JToken node) : base(node) { if (node["idEqual"] != null) { this._IdEqual = ParseLong(node["idEqual"].Value <string>()); } if (node["idGreaterThanOrEqual"] != null) { this._IdGreaterThanOrEqual = ParseLong(node["idGreaterThanOrEqual"].Value <string>()); } if (node["partnerIdEqual"] != null) { this._PartnerIdEqual = ParseInt(node["partnerIdEqual"].Value <string>()); } if (node["partnerIdIn"] != null) { this._PartnerIdIn = node["partnerIdIn"].Value <string>(); } if (node["partnerIdNotIn"] != null) { this._PartnerIdNotIn = node["partnerIdNotIn"].Value <string>(); } if (node["createdAtGreaterThanOrEqual"] != null) { this._CreatedAtGreaterThanOrEqual = ParseInt(node["createdAtGreaterThanOrEqual"].Value <string>()); } if (node["createdAtLessThanOrEqual"] != null) { this._CreatedAtLessThanOrEqual = ParseInt(node["createdAtLessThanOrEqual"].Value <string>()); } if (node["updatedAtGreaterThanOrEqual"] != null) { this._UpdatedAtGreaterThanOrEqual = ParseInt(node["updatedAtGreaterThanOrEqual"].Value <string>()); } if (node["updatedAtLessThanOrEqual"] != null) { this._UpdatedAtLessThanOrEqual = ParseInt(node["updatedAtLessThanOrEqual"].Value <string>()); } if (node["executionAttemptsGreaterThanOrEqual"] != null) { this._ExecutionAttemptsGreaterThanOrEqual = ParseInt(node["executionAttemptsGreaterThanOrEqual"].Value <string>()); } if (node["executionAttemptsLessThanOrEqual"] != null) { this._ExecutionAttemptsLessThanOrEqual = ParseInt(node["executionAttemptsLessThanOrEqual"].Value <string>()); } if (node["lockVersionGreaterThanOrEqual"] != null) { this._LockVersionGreaterThanOrEqual = ParseInt(node["lockVersionGreaterThanOrEqual"].Value <string>()); } if (node["lockVersionLessThanOrEqual"] != null) { this._LockVersionLessThanOrEqual = ParseInt(node["lockVersionLessThanOrEqual"].Value <string>()); } if (node["entryIdEqual"] != null) { this._EntryIdEqual = node["entryIdEqual"].Value <string>(); } if (node["jobTypeEqual"] != null) { this._JobTypeEqual = (BatchJobType)StringEnum.Parse(typeof(BatchJobType), node["jobTypeEqual"].Value <string>()); } if (node["jobTypeIn"] != null) { this._JobTypeIn = node["jobTypeIn"].Value <string>(); } if (node["jobTypeNotIn"] != null) { this._JobTypeNotIn = node["jobTypeNotIn"].Value <string>(); } if (node["jobSubTypeEqual"] != null) { this._JobSubTypeEqual = ParseInt(node["jobSubTypeEqual"].Value <string>()); } if (node["jobSubTypeIn"] != null) { this._JobSubTypeIn = node["jobSubTypeIn"].Value <string>(); } if (node["jobSubTypeNotIn"] != null) { this._JobSubTypeNotIn = node["jobSubTypeNotIn"].Value <string>(); } if (node["statusEqual"] != null) { this._StatusEqual = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), node["statusEqual"].Value <string>()); } if (node["statusIn"] != null) { this._StatusIn = node["statusIn"].Value <string>(); } if (node["statusNotIn"] != null) { this._StatusNotIn = node["statusNotIn"].Value <string>(); } if (node["priorityGreaterThanOrEqual"] != null) { this._PriorityGreaterThanOrEqual = ParseInt(node["priorityGreaterThanOrEqual"].Value <string>()); } if (node["priorityLessThanOrEqual"] != null) { this._PriorityLessThanOrEqual = ParseInt(node["priorityLessThanOrEqual"].Value <string>()); } if (node["priorityEqual"] != null) { this._PriorityEqual = ParseInt(node["priorityEqual"].Value <string>()); } if (node["priorityIn"] != null) { this._PriorityIn = node["priorityIn"].Value <string>(); } if (node["priorityNotIn"] != null) { this._PriorityNotIn = node["priorityNotIn"].Value <string>(); } if (node["batchVersionGreaterThanOrEqual"] != null) { this._BatchVersionGreaterThanOrEqual = ParseInt(node["batchVersionGreaterThanOrEqual"].Value <string>()); } if (node["batchVersionLessThanOrEqual"] != null) { this._BatchVersionLessThanOrEqual = ParseInt(node["batchVersionLessThanOrEqual"].Value <string>()); } if (node["batchVersionEqual"] != null) { this._BatchVersionEqual = ParseInt(node["batchVersionEqual"].Value <string>()); } if (node["queueTimeGreaterThanOrEqual"] != null) { this._QueueTimeGreaterThanOrEqual = ParseInt(node["queueTimeGreaterThanOrEqual"].Value <string>()); } if (node["queueTimeLessThanOrEqual"] != null) { this._QueueTimeLessThanOrEqual = ParseInt(node["queueTimeLessThanOrEqual"].Value <string>()); } if (node["finishTimeGreaterThanOrEqual"] != null) { this._FinishTimeGreaterThanOrEqual = ParseInt(node["finishTimeGreaterThanOrEqual"].Value <string>()); } if (node["finishTimeLessThanOrEqual"] != null) { this._FinishTimeLessThanOrEqual = ParseInt(node["finishTimeLessThanOrEqual"].Value <string>()); } if (node["errTypeEqual"] != null) { this._ErrTypeEqual = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), node["errTypeEqual"].Value <string>()); } if (node["errTypeIn"] != null) { this._ErrTypeIn = node["errTypeIn"].Value <string>(); } if (node["errTypeNotIn"] != null) { this._ErrTypeNotIn = node["errTypeNotIn"].Value <string>(); } if (node["errNumberEqual"] != null) { this._ErrNumberEqual = ParseInt(node["errNumberEqual"].Value <string>()); } if (node["errNumberIn"] != null) { this._ErrNumberIn = node["errNumberIn"].Value <string>(); } if (node["errNumberNotIn"] != null) { this._ErrNumberNotIn = node["errNumberNotIn"].Value <string>(); } if (node["estimatedEffortLessThan"] != null) { this._EstimatedEffortLessThan = ParseInt(node["estimatedEffortLessThan"].Value <string>()); } if (node["estimatedEffortGreaterThan"] != null) { this._EstimatedEffortGreaterThan = ParseInt(node["estimatedEffortGreaterThan"].Value <string>()); } if (node["urgencyLessThanOrEqual"] != null) { this._UrgencyLessThanOrEqual = ParseInt(node["urgencyLessThanOrEqual"].Value <string>()); } if (node["urgencyGreaterThanOrEqual"] != null) { this._UrgencyGreaterThanOrEqual = ParseInt(node["urgencyGreaterThanOrEqual"].Value <string>()); } }
public BatchJob(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = ParseLong(propertyNode.InnerText); continue; case "partnerId": this._PartnerId = ParseInt(propertyNode.InnerText); continue; case "createdAt": this._CreatedAt = ParseInt(propertyNode.InnerText); continue; case "updatedAt": this._UpdatedAt = ParseInt(propertyNode.InnerText); continue; case "deletedAt": this._DeletedAt = ParseInt(propertyNode.InnerText); continue; case "lockExpiration": this._LockExpiration = ParseInt(propertyNode.InnerText); continue; case "executionAttempts": this._ExecutionAttempts = ParseInt(propertyNode.InnerText); continue; case "lockVersion": this._LockVersion = ParseInt(propertyNode.InnerText); continue; case "entryId": this._EntryId = propertyNode.InnerText; continue; case "entryName": this._EntryName = propertyNode.InnerText; continue; case "jobType": this._JobType = (BatchJobType)StringEnum.Parse(typeof(BatchJobType), propertyNode.InnerText); continue; case "jobSubType": this._JobSubType = ParseInt(propertyNode.InnerText); continue; case "data": this._Data = ObjectFactory.Create <JobData>(propertyNode); continue; case "status": this._Status = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), propertyNode.InnerText); continue; case "abort": this._Abort = ParseInt(propertyNode.InnerText); continue; case "checkAgainTimeout": this._CheckAgainTimeout = ParseInt(propertyNode.InnerText); continue; case "message": this._Message = propertyNode.InnerText; continue; case "description": this._Description = propertyNode.InnerText; continue; case "priority": this._Priority = ParseInt(propertyNode.InnerText); continue; case "history": this._History = new List <BatchHistoryData>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._History.Add(ObjectFactory.Create <BatchHistoryData>(arrayNode)); } continue; case "bulkJobId": this._BulkJobId = ParseInt(propertyNode.InnerText); continue; case "batchVersion": this._BatchVersion = ParseInt(propertyNode.InnerText); continue; case "parentJobId": this._ParentJobId = ParseInt(propertyNode.InnerText); continue; case "rootJobId": this._RootJobId = ParseInt(propertyNode.InnerText); continue; case "queueTime": this._QueueTime = ParseInt(propertyNode.InnerText); continue; case "finishTime": this._FinishTime = ParseInt(propertyNode.InnerText); continue; case "errType": this._ErrType = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), propertyNode.InnerText); continue; case "errNumber": this._ErrNumber = ParseInt(propertyNode.InnerText); continue; case "estimatedEffort": this._EstimatedEffort = ParseInt(propertyNode.InnerText); continue; case "urgency": this._Urgency = ParseInt(propertyNode.InnerText); continue; case "schedulerId": this._SchedulerId = ParseInt(propertyNode.InnerText); continue; case "workerId": this._WorkerId = ParseInt(propertyNode.InnerText); continue; case "batchIndex": this._BatchIndex = ParseInt(propertyNode.InnerText); continue; case "lastSchedulerId": this._LastSchedulerId = ParseInt(propertyNode.InnerText); continue; case "lastWorkerId": this._LastWorkerId = ParseInt(propertyNode.InnerText); continue; case "dc": this._Dc = ParseInt(propertyNode.InnerText); continue; case "jobObjectId": this._JobObjectId = propertyNode.InnerText; continue; case "jobObjectType": this._JobObjectType = ParseInt(propertyNode.InnerText); continue; } } }
public BulkUpload(XmlElement node) : base(node) { foreach (XmlElement propertyNode in node.ChildNodes) { switch (propertyNode.Name) { case "id": this._Id = ParseLong(propertyNode.InnerText); continue; case "uploadedBy": this._UploadedBy = propertyNode.InnerText; continue; case "uploadedByUserId": this._UploadedByUserId = propertyNode.InnerText; continue; case "uploadedOn": this._UploadedOn = ParseInt(propertyNode.InnerText); continue; case "numOfEntries": this._NumOfEntries = ParseInt(propertyNode.InnerText); continue; case "status": this._Status = (BatchJobStatus)ParseEnum(typeof(BatchJobStatus), propertyNode.InnerText); continue; case "logFileUrl": this._LogFileUrl = propertyNode.InnerText; continue; case "csvFileUrl": this._CsvFileUrl = propertyNode.InnerText; continue; case "bulkFileUrl": this._BulkFileUrl = propertyNode.InnerText; continue; case "bulkUploadType": this._BulkUploadType = (BulkUploadType)StringEnum.Parse(typeof(BulkUploadType), propertyNode.InnerText); continue; case "results": this._Results = new List <BulkUploadResult>(); foreach (XmlElement arrayNode in propertyNode.ChildNodes) { this._Results.Add(ObjectFactory.Create <BulkUploadResult>(arrayNode)); } continue; case "error": this._Error = propertyNode.InnerText; continue; case "errorType": this._ErrorType = (BatchJobErrorTypes)ParseEnum(typeof(BatchJobErrorTypes), propertyNode.InnerText); continue; case "errorNumber": this._ErrorNumber = ParseInt(propertyNode.InnerText); continue; case "fileName": this._FileName = propertyNode.InnerText; continue; case "description": this._Description = propertyNode.InnerText; continue; case "numOfObjects": this._NumOfObjects = ParseInt(propertyNode.InnerText); continue; case "bulkUploadObjectType": this._BulkUploadObjectType = (BulkUploadObjectType)StringEnum.Parse(typeof(BulkUploadObjectType), propertyNode.InnerText); continue; } } }