示例#1
0
 /// <summary>
 ///     Create a Resilient Unmanaged Database.
 /// </summary>
 /// <param name="database">
 ///     An <see cref="IUnmanagedBrowsingDatabase" /> to proxy to. The resilient unmanaged database takes
 ///     ownership of <paramref name="database" /> and will dispose it when the resilient unmanaged database
 ///     itself is disposed. If you reference or dispose <paramref name="database" /> after you create the
 ///     resilient unmanaged database, the behavior of the resilient unmanaged database and
 ///     <paramref name="database" /> is undefined.
 /// </param>
 /// <returns>
 ///     A resilient unmanaged database.
 /// </returns>
 /// <exception cref="System.ArgumentNullException">
 ///     Thrown if <paramref name="database" /> is a null reference.
 /// </exception>
 public static ResilientUnmanagedBrowsingDatabase Create(IUnmanagedBrowsingDatabase database) => ResilientUnmanagedBrowsingDatabase.Create(database, 5);
示例#2
0
 /// <summary>
 ///     Create a Resilient Unmanaged Database.
 /// </summary>
 /// <param name="database">
 ///     An <see cref="IUnmanagedBrowsingDatabase" /> to proxy to. The resilient unmanaged database takes
 ///     ownership of <paramref name="database" /> and will dispose it when the resilient unmanaged database
 ///     itself is disposed. If you reference or dispose <paramref name="database" /> after you create the
 ///     resilient unmanaged database, the behavior of the resilient unmanaged 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 unmanaged 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 ResilientUnmanagedBrowsingDatabase Create(IUnmanagedBrowsingDatabase database, int retryAttempts) => ResilientUnmanagedBrowsingDatabase.Create(database, retryAttempts, true);