Click here to Skip to main content
15,898,036 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Never use pure built in types Pin
jschell12-Dec-14 12:26
jschell12-Dec-14 12:26 
GeneralRe: Never use pure built in types Pin
D4rkTrick21-Dec-14 8:17
professionalD4rkTrick21-Dec-14 8:17 
QuestionHow to avoid backend stored procedures Pin
nstk8-Dec-14 21:24
nstk8-Dec-14 21:24 
JokeRe: How to avoid backend stored procedures Pin
Brady Kelly12-Dec-14 5:52
Brady Kelly12-Dec-14 5:52 
AnswerRe: How to avoid backend stored procedures Pin
Eddy Vluggen12-Dec-14 7:27
professionalEddy Vluggen12-Dec-14 7:27 
AnswerRe: How to avoid backend stored procedures Pin
Dominic Burford23-Dec-14 1:35
professionalDominic Burford23-Dec-14 1:35 
QuestionRearchitecting BackgroundWorker based to Task based? Pin
Matt T Heffron17-Nov-14 12:49
professionalMatt T Heffron17-Nov-14 12:49 
AnswerRe: Rearchitecting BackgroundWorker based to Task based? Pin
Richard Deeming18-Nov-14 2:45
mveRichard Deeming18-Nov-14 2:45 
Not sure how much this will help, but you can convert a WaitHandle to a Task with an extension method[^]:
C#
public static class WaitHandleExtensions
{
    private static void WaitHandleCallback(object state, bool timedOut)
    {
        var taskCompletionSource = (TaskCompletionSource<bool>)state;
        if (timedOut)
        {
            taskCompletionSource.TrySetCanceled();
        }
        else
        {
            taskCompletionSource.TrySetResult(true);
        }
    }
    
    public static Task WaitOneAsync(this WaitHandle waitHandle)
    {
        if (waitHandle == null) throw new ArgumentNullException("waitHandle");

        var taskCompletionSource = new TaskCompletionSource<bool>();

        var registeredWaitHandle = ThreadPool.RegisterWaitForSingleObject(waitHandle,
            WaitHandleCallback, taskCompletionSource, Timeout.Infinite, true);

        var result = taskCompletionSource.Task;
        result.ContinueWith(_ => registeredWaitHandle.Unregister(null), TaskContinuationOptions.ExecuteSynchronously);
        return result;
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


AnswerRe: Rearchitecting BackgroundWorker based to Task based? Pin
Gerry Schmitz18-Nov-14 7:00
mveGerry Schmitz18-Nov-14 7:00 
QuestionRemote Desktop Connection Pin
Non Sequitur11-Nov-14 3:43
Non Sequitur11-Nov-14 3:43 
SuggestionRe: Remote Desktop Connection Pin
ZurdoDev11-Nov-14 5:27
professionalZurdoDev11-Nov-14 5:27 
AnswerRe: Remote Desktop Connection Pin
Pete O'Hanlon11-Nov-14 5:57
mvePete O'Hanlon11-Nov-14 5:57 
QuestionWhat is an architect for? Pin
Member 448708318-Oct-14 10:19
Member 448708318-Oct-14 10:19 
JokeRe: What is an architect for? Pin
Vivi Chellappa18-Oct-14 18:43
professionalVivi Chellappa18-Oct-14 18:43 
AnswerRe: What is an architect for? Pin
kimpetwangi25-Oct-14 17:12
kimpetwangi25-Oct-14 17:12 
AnswerRe: What is an architect for? Pin
Richard MacCutchan18-Oct-14 21:22
mveRichard MacCutchan18-Oct-14 21:22 
GeneralRe: What is an architect for? Pin
Member 448708318-Oct-14 21:59
Member 448708318-Oct-14 21:59 
GeneralRe: What is an architect for? Pin
Richard MacCutchan18-Oct-14 22:08
mveRichard MacCutchan18-Oct-14 22:08 
AnswerRe: What is an architect for? Pin
Eddy Vluggen19-Oct-14 3:50
professionalEddy Vluggen19-Oct-14 3:50 
GeneralRe: What is an architect for? Pin
Member 448708319-Oct-14 11:26
Member 448708319-Oct-14 11:26 
GeneralRe: What is an architect for? Pin
Eddy Vluggen20-Oct-14 1:44
professionalEddy Vluggen20-Oct-14 1:44 
AnswerRe: What is an architect for? Pin
Mycroft Holmes19-Oct-14 12:48
professionalMycroft Holmes19-Oct-14 12:48 
AnswerRe: What is an architect for? Pin
Dominic Burford20-Oct-14 6:30
professionalDominic Burford20-Oct-14 6:30 
QuestionArchietecture design Pin
ibnipun109-Oct-14 21:10
ibnipun109-Oct-14 21:10 
QuestionSPA and WCF Pin
Mycroft Holmes30-Sep-14 22:47
professionalMycroft Holmes30-Sep-14 22:47 

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.