/// <summary> /// Create a Resilient Managed Database. /// </summary> /// <param name="database"> /// A <see cref="IManagedBrowsingDatabase" /> to proxy to. The resilient managed database takes ownership /// of <paramref name="database" /> and will dispose it when the resilient managed database itself is /// disposed. If you reference or dispose <paramref name="database" /> after you create the resilient /// managed database, the behavior of the resilient managed database and <paramref name="database" /> is /// undefined. /// </param> /// <returns> /// A resilient managed database. /// </returns> /// <exception cref="System.ArgumentNullException"> /// Thrown if <paramref name="database" /> is a null reference. /// </exception> public static ResilientManagedBrowsingDatabase Create(IManagedBrowsingDatabase database) => ResilientManagedBrowsingDatabase.Create(database, 5);
/// <summary> /// Create a Resilient Managed Database. /// </summary> /// <param name="database"> /// A <see cref="IManagedBrowsingDatabase" /> to proxy to. The resilient managed database takes ownership /// of <paramref name="database" /> and will dispose it when the resilient managed database itself is /// disposed. If you reference or dispose <paramref name="database" /> after you create the resilient /// managed database, the behavior of the resilient managed database and <paramref name="database" /> is /// undefined. /// </param> /// <param name="retryAttempts"> /// The number of attempts a failed operation should be retried. /// </param> /// <returns> /// A resilient managed database. /// </returns> /// <exception cref="System.ArgumentNullException"> /// Thrown if <paramref name="database" /> is a null reference. /// </exception> /// <exception cref="System.ArgumentOutOfRangeException"> /// Thrown if <paramref name="retryAttempts" /> is less than or equal to <c>0</c>. /// </exception> public static ResilientManagedBrowsingDatabase Create(IManagedBrowsingDatabase database, int retryAttempts) => ResilientManagedBrowsingDatabase.Create(database, retryAttempts, true);