Click here to Skip to main content
15,925,528 members
Home / Discussions / C#
   

C#

 
GeneralRe: windows service suspend and continue option Pin
PIEBALDconsult14-Oct-10 3:17
mvePIEBALDconsult14-Oct-10 3:17 
GeneralRe: windows service suspend and continue option Pin
Electron Shepherd14-Oct-10 3:42
Electron Shepherd14-Oct-10 3:42 
GeneralRe: windows service suspend and continue option Pin
jschell15-Oct-10 8:29
jschell15-Oct-10 8:29 
GeneralRe: windows service suspend and continue option Pin
Electron Shepherd15-Oct-10 8:38
Electron Shepherd15-Oct-10 8:38 
AnswerRe: windows service suspend and continue option Pin
Calla13-Oct-10 21:37
Calla13-Oct-10 21:37 
GeneralRe: windows service suspend and continue option Pin
fracalifa13-Oct-10 22:36
fracalifa13-Oct-10 22:36 
GeneralRe: windows service suspend and continue option Pin
Calla13-Oct-10 22:50
Calla13-Oct-10 22:50 
NewsAsynchronous composition using LINQ/Extension methods Pin
Alex Shtof13-Oct-10 5:40
Alex Shtof13-Oct-10 5:40 
Hi all developers.

Lately I started working on a library that allows to compose complex asynchronous operations from simple ones using LINQ syntax and extension methods. It can be found here. The idea itself was taken from F# asynchronous workflows, so I don't take any credit for the idea, just for the implementation.

The need occurred when I was working for a company that had an existing server that provided a known set of operations and we needed to write a UI client that the operations it wanted to perform were composition (sequential or parallel) of the server's operations. So instead of writing the ugly code with callbacks and exception handling we came up with this idea.

Here is a simple example for the library's usage:
// compose an operation that runs two async operations sequentially. Note that the parameters of 
// the second operation depend on the result from the first operation, and so does the final result.
Async<DataItem[]> operation = 
    from dataItems1 in provider1.AsyncGetDataItems("data items id") 
    from dataItems2 in provider2.AsyncGetDataItems(dataItems1) 
    select dataItems1.Concat(dataItems2).ToArray();

// execute the above composed operation. The callback will receive the result.
operation.Execute(CompletionCallback); 


I would like you to try and and send me any feedback about the design/implementation and of course bug reports.

Thanks!
Alex.


P.S. I Googled it and found out that something already blogged about it. So other people came up with this idea too. I just didn't find a ready-to-use library that people can download and start using, so I decided to write one.
Questioncheckbox in a data grid view.... Pin
jainiraj13-Oct-10 2:45
jainiraj13-Oct-10 2:45 
AnswerRe: checkbox in a data grid view.... [modified] Pin
fjdiewornncalwe13-Oct-10 8:43
professionalfjdiewornncalwe13-Oct-10 8:43 
AnswerRe: checkbox in a data grid view.... Pin
ekba8913-Oct-10 8:59
ekba8913-Oct-10 8:59 
QuestionAdding Controls of user control ot the parent Form. Pin
Said Ali Jalali12-Oct-10 22:45
Said Ali Jalali12-Oct-10 22:45 
AnswerRe: Adding Controls of user control ot the parent Form. Pin
fjdiewornncalwe13-Oct-10 1:30
professionalfjdiewornncalwe13-Oct-10 1:30 
Questiondata transfers between two forms Pin
Erdinc2712-Oct-10 22:26
Erdinc2712-Oct-10 22:26 
AnswerRe: data transfers between two forms Pin
Blue_Boy12-Oct-10 22:39
Blue_Boy12-Oct-10 22:39 
GeneralRe: data transfers between two forms PinPopular
OriginalGriff12-Oct-10 22:44
mveOriginalGriff12-Oct-10 22:44 
GeneralRe: data transfers between two forms Pin
Blue_Boy12-Oct-10 22:48
Blue_Boy12-Oct-10 22:48 
AnswerRe: data transfers between two forms Pin
OriginalGriff12-Oct-10 22:41
mveOriginalGriff12-Oct-10 22:41 
GeneralRe: data transfers between two forms Pin
Erdinc2712-Oct-10 22:46
Erdinc2712-Oct-10 22:46 
GeneralRe: data transfers between two forms Pin
OriginalGriff12-Oct-10 23:00
mveOriginalGriff12-Oct-10 23:00 
GeneralRe: data transfers between two forms Pin
Erdinc2712-Oct-10 23:23
Erdinc2712-Oct-10 23:23 
AnswerRe: data transfers between two forms PinPopular
Pete O'Hanlon12-Oct-10 23:06
mvePete O'Hanlon12-Oct-10 23:06 
GeneralRe: data transfers between two forms Pin
Erdinc2712-Oct-10 23:24
Erdinc2712-Oct-10 23:24 
GeneralRe: data transfers between two forms Pin
Pete O'Hanlon12-Oct-10 23:29
mvePete O'Hanlon12-Oct-10 23:29 
GeneralRe: data transfers between two forms Pin
fjdiewornncalwe13-Oct-10 1:35
professionalfjdiewornncalwe13-Oct-10 1:35 

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.