This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int[] BubbleSort(List<int> listInput) | |
{ | |
for (int i = 0; i < listInput.Count; i++) | |
{ | |
for (int j = 0; j < listInput.Count; j++) | |
{ | |
if (listInput[i] < listInput[j]) | |
{ | |
var temp = listInput[i]; | |
listInput[i] = listInput[j]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private 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 job = NewJob(order, computer, serverAddress, deploymentType, jobActions); | |
return job; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create Job | |
return ValidateComputer(order).Resolve( | |
fail: () => { | |
new Job() | |
{ | |
ActivationTime = order.ClientLocalStartTime, | |
ComputerName = order.ComputerName, | |
orderId = order.Id, | |
Status = invalidComputerErrorMessage, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Job CreateJob(order order) | |
{ | |
var job = ValidateComputer(order.ComputerName, onSuccess, onFailure); | |
return job; | |
Job onSuccess(Order order) | |
{ | |
var computer = GetComputer(order.ComputerName, order.CustomerId); | |
computer.CustomerId = GetCustomerId(order.CustomerId, computer.CustomerId); | |
var siteServerAddress = GetServerAddress(order.ComputerName, computer.CustomerId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Job CreateJob(order order) | |
{ | |
var errorMessage = ValidateComputer(order.ComputerName); | |
if (errorMessage != "") | |
{ | |
return new Job() | |
{ | |
ActivationTime = order.ClientLocalStartTime, | |
ComputerName = order.ComputerName, | |
orderId = order.Id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task<Job> CreateJob(order order) | |
{ | |
Job job = new Job() | |
{ | |
ActivationTime = order.ClientLocalStartTime, | |
ComputerName = order.ComputerName, | |
orderId = order.Id, | |
}; | |
try // happy path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async Task<Job> CreateJob(order order) | |
{ | |
Job job = new Job | |
{ | |
ActivationTime = order.ClientLocalStartTime, | |
ComputerName = order.ComputerName, | |
orderId = order.Id, | |
Status = "created" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy file from VM to your host system | |
scp -i ~\.ssh\my-key.pem [email protected]:/home/azureuser/export.json export.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# copy file from VM to your host system | |
scp -i ~\.ssh\my-key.pem [email protected]:/home/azureuser/export.json export.json |
NewerOlder