System.Data.ProviderBase.AbstractTransaction.convertIsolationLevel C# (CSharp) Méthode

convertIsolationLevel() private méthode

private convertIsolationLevel ( IsolationLevel isolationLevel ) : int
isolationLevel IsolationLevel
Résultat int
        private int convertIsolationLevel(IsolationLevel isolationLevel)
        {
            if (isolationLevel == IsolationLevel.Unspecified)
                return [email protected]__Finals.TRANSACTION_NONE;
            if (isolationLevel == IsolationLevel.ReadCommitted)
                return [email protected]__Finals.TRANSACTION_READ_COMMITTED;
            if (isolationLevel == IsolationLevel.ReadUncommitted)
                return [email protected]__Finals.TRANSACTION_READ_UNCOMMITTED;
            if (isolationLevel == IsolationLevel.RepeatableRead)
                return [email protected]__Finals.TRANSACTION_REPEATABLE_READ;
            if (isolationLevel == IsolationLevel.Serializable)
                return [email protected]__Finals.TRANSACTION_SERIALIZABLE;

            throw new NotSupportedException("The Isolation level '" + isolationLevel + "' is not supported");
        }
    }