Skip to content

Instantly share code, notes, and snippets.

@fnbk
Created September 2, 2022 21:19
Show Gist options
  • Save fnbk/4dc1c392c090be4298ade372597aecf8 to your computer and use it in GitHub Desktop.
Save fnbk/4dc1c392c090be4298ade372597aecf8 to your computer and use it in GitHub Desktop.
clean
private async Task<Job> CreateJob(Order order)
{
var computer = GetComputer(order.ComputerName, order.CustomerId);
computer.CustomerId = GetCustomerId(order.CustomerId, computer.CustomerId);
var serverAddress = GetServerAddress(order.ComputerName, computer.CustomerId);
var deploymentType = GetDeploymentType(order.MaterialNumber, computer.CustomerId);
var jobActions = CreateJobActions(deploymentType, order, serverAddress, computer);
var status = "created";
Job job = new Job()
{
ActivationTime = order.ClientLocalStartTime,
ComputerName = order.ComputerName,
OrderId = order.Id,
JobActions = jobActions,
Status = status,
};
return job;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment