PolicyBuilder
Builder class that holds the list of current exception predicates.
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace Polly
{
public sealed class PolicyBuilder
{
private readonly IList<ExceptionPredicate> _exceptionPredicates;
internal IList<ExceptionPredicate> ExceptionPredicates => _exceptionPredicates;
internal PolicyBuilder(ExceptionPredicate exceptionPredicate)
{
_exceptionPredicates = new List<ExceptionPredicate> {
exceptionPredicate
};
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override string ToString()
{
return base.ToString();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object obj)
{
return base.Equals(obj);
}
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode()
{
return base.GetHashCode();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public new Type GetType()
{
return base.GetType();
}
}
}