Click here to Skip to main content
15,895,667 members
Home / Discussions / C#
   

C#

 
AnswerRe: Trying to use a string to adb command line Pin
Bernhard Hiller4-Oct-17 23:31
Bernhard Hiller4-Oct-17 23:31 
GeneralRe: Trying to use a string to adb command line Pin
Cláudio Hideki4-Oct-17 23:45
Cláudio Hideki4-Oct-17 23:45 
GeneralRe: Trying to use a string to adb command line Pin
Bernhard Hiller5-Oct-17 21:14
Bernhard Hiller5-Oct-17 21:14 
Questioncreate a simple editor with intellisense Pin
Member 121289494-Oct-17 0:08
Member 121289494-Oct-17 0:08 
AnswerRe: create a simple editor with intellisense Pin
Eddy Vluggen4-Oct-17 0:17
professionalEddy Vluggen4-Oct-17 0:17 
QuestionRun List Of Tasks, Then Get All Results Pin
Kevin Marois2-Oct-17 12:51
professionalKevin Marois2-Oct-17 12:51 
AnswerRe: Run List Of Tasks, Then Get All Results Pin
Pete O'Hanlon2-Oct-17 20:09
mvePete O'Hanlon2-Oct-17 20:09 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Kevin Marois3-Oct-17 3:52
professionalKevin Marois3-Oct-17 3:52 
OK, that fixed the Task.Factory problem..

Now, how do I get the results from all the tasks. here's what I have so far
qualificationResult.TestResults.Clear();

IEnumerable<IBayQualificationTest> tests = GetQualificationTests().OrderBy(x => x.Priority).ToList();

// List of tasks to complete
List<Task> tasks = new List<Task>();
Task<QualificationTestResult> thermalTask = null;
Task<QualificationTestResult> eSensingTask = null;

// Launch the Thermal test in it's own task
var thermal = tests.Where(t => t.Name.ToLower().Contains("therm")).FirstOrDefault();
if (thermal != null)
{
    thermalTask = Task.Factory.StartNew(() =>
                    RunTest(bay, thermal, token, baySerialNumber));

    tasks.Add(thermalTask);
};

// Launch other tests here, just like the Theram, test above

// Wait for all tasks to complete
Task completionTask = Task.WhenAll(tasks);

// Put all results into the list of results
foreach (var t in tasks)
{
    qualificationResult.TestResults.Add(t.Result);  // HOW DO I GET THE RESULT FROM EACH TASK 
}

The last part won't compile. Tells me there is no "Result" on the task.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

GeneralRe: Run List Of Tasks, Then Get All Results Pin
Richard Deeming3-Oct-17 4:31
mveRichard Deeming3-Oct-17 4:31 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Kevin Marois3-Oct-17 5:33
professionalKevin Marois3-Oct-17 5:33 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Richard Deeming3-Oct-17 6:21
mveRichard Deeming3-Oct-17 6:21 
GeneralRe: Run List Of Tasks, Then Get All Results Pin
Nathan Minier4-Oct-17 1:54
professionalNathan Minier4-Oct-17 1:54 
QuestionFind Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 6:54
professionalKevin Marois2-Oct-17 6:54 
AnswerRe: Find Insert Position In An ObservableCollection Pin
Dave Kreskowiak2-Oct-17 7:14
mveDave Kreskowiak2-Oct-17 7:14 
GeneralRe: Find Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 7:21
professionalKevin Marois2-Oct-17 7:21 
GeneralRe: Find Insert Position In An ObservableCollection Pin
Dave Kreskowiak2-Oct-17 7:45
mveDave Kreskowiak2-Oct-17 7:45 
GeneralRe: Find Insert Position In An ObservableCollection Pin
Kevin Marois2-Oct-17 7:52
professionalKevin Marois2-Oct-17 7:52 
GeneralOT: bad link in your sig. Pin
OriginalGriff2-Oct-17 21:56
mveOriginalGriff2-Oct-17 21:56 
GeneralRe: OT: bad link in your sig. Pin
Dave Kreskowiak3-Oct-17 1:52
mveDave Kreskowiak3-Oct-17 1:52 
GeneralRe: OT: bad link in your sig. Pin
OriginalGriff3-Oct-17 2:20
mveOriginalGriff3-Oct-17 2:20 
AnswerRe: Find Insert Position In An ObservableCollection Pin
Alaa Ben Fatma3-Oct-17 10:27
professionalAlaa Ben Fatma3-Oct-17 10:27 
SuggestionUse design patterns in the 15 puzzle game and ensure a rollback Pin
Member 1276922230-Sep-17 5:22
Member 1276922230-Sep-17 5:22 
GeneralRe: Use design patterns in the 15 puzzle game and ensure a rollback Pin
OriginalGriff30-Sep-17 5:40
mveOriginalGriff30-Sep-17 5:40 
GeneralRe: Use design patterns in the 15 puzzle game and ensure a rollback Pin
Nathan Minier2-Oct-17 1:35
professionalNathan Minier2-Oct-17 1:35 
Answeruse of design patterns in 15 puzzle Pin
Member 1276922230-Sep-17 0:23
Member 1276922230-Sep-17 0:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.