Blog Stats
  • Posts - 59
  • Articles - 0
  • Comments - 31
  • Trackbacks - 0

 

Friday, November 04, 2011

.Net: Action type


This type is a delegate and is pretty cool. It can contain a method with one parameter and no  return value. You can read a bit more here: http://msdn.microsoft.com/en-us/library/018hxwa8.aspx

This type is used Transient Fault Tolerance Framework in some of the ExecuteAction methods. For instance, the following signature allows you to call ExecuteAction and pass in 3 anonymous methods:

public abstract void ExecuteAction(Action<AsyncCallback> action, Action<IAsyncResult> callback, Action<Exception> faultHandler);

You can see an example of calling this method in this article: http://msdn.microsoft.com/en-us/library/hh545245(v=VS.103).aspx

Azure: Fault Tolerance for apps


Check out the Fault Tolerance Framework:

http://windowsazurecat.com/2011/02/transient-fault-handling-framework/

This is really sweet. You can download the source code, then open it in VS and build it. Then plug into your app to get fault tolerance for SQL Azure, Windows Azure storage, Service Bus and Caching Service.

Once you have it built and referenced in your project, it only takes a few minutes to plumb your application to use it.

Next week (hopefully) I will post a new WPF app that uses ServiceBus and shows hot so use the features with best practices such as async operations and using the fault tolerance framework.

 

 

Copyright © xamlnotes