TransientFaultHandling:缺少ApplicationConfiguration类?

时间:2012-03-17 20:40:27

标签: c# azure

在所有这些链接上:

http://michaelwasham.com/2011/11/14/handy-library-for-dealing-with-transient-connectivity-in-the-cloud/

http://community.adxstudio.com/Default.aspx?DN=56cfea23-199b-4a59-ac68-7eb24de78760

http://convective.wordpress.com/2011/09/28/handling-transient-connection-failures-in-sql-azure/

他们使用:

 // Retrieve the retry policy settings from the application configuration file.
 RetryPolicyConfigurationSettings retryPolicySettings = ApplicationConfiguration.Current.GetConfigurationSection<RetryPolicyConfigurationSettings>(RetryPolicyConfigurationSettings.SectionName);

// Retrieve the required retry policy definition by its friendly name.
 RetryPolicyInfo retryPolicyInfo = retryPolicySettings.Policies.Get(“FixedIntervalDefault”);

// Create an instance of the respective retry policy using the transient error detection strategy for SQL Azure.
 RetryPolicy sqlAzureRetryPolicy = retryPolicyInfo.CreatePolicy<SqlAzureTransientErrorDetectionStrategy>();

我找不到ApplicationConfiguration类,也找不到RetryPolicyInfo类。我错过了什么参考?

谢谢, 斯特沃

0 个答案:

没有答案