Skip to content

Instantly share code, notes, and snippets.

@HowardvanRooijen
Last active August 29, 2015 14:16
Show Gist options
  • Save HowardvanRooijen/50ba08cff944b6cad3a6 to your computer and use it in GitHub Desktop.
Save HowardvanRooijen/50ba08cff944b6cad3a6 to your computer and use it in GitHub Desktop.
DoNotRetryOnConflictPolicy Endjin.Retry Extension
#region Using Directives
using System;
using Endjin.Core.Retry.Policies;
using Microsoft.WindowsAzure.Storage;
#endregion
public class DoNotRetryOnConflictPolicy : IRetryPolicy
{
public bool CanRetry(Exception exception)
{
var storageException = exception as StorageException;
if (storageException != null && storageException.RequestInformation.HttpStatusCode == 409)
{
return false;
}
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment