Search Results for

    Show / Hide Table of Contents
    View Source

    Class ConnectionStringTimeoutExtensions

    Extension methods for expressing a configured timeout in a database connection string.

    Inheritance
    object
    Namespace: Umbraco.Cms.Infrastructure.Persistence
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public static class ConnectionStringTimeoutExtensions

    Methods

    View Source

    ToConnectionStringTimeoutSeconds(TimeSpan)

    Converts a configured timeout to the whole number of seconds that a connection string timeout keyword takes.

    Declaration
    public static int ToConnectionStringTimeoutSeconds(this TimeSpan timeout)
    Parameters
    Type Name Description
    TimeSpan timeout

    The configured timeout.

    Returns
    Type Description
    int

    The timeout in whole seconds.

    Remarks

    Rounds up, so that a sub-second timeout cannot become zero seconds - which providers read as no limit at all, the opposite of what was configured.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX