System.Data.SqlClient.SqlExceptionExtensions.IsDatabaseAvailabilityError C# (CSharp) 메소드

IsDatabaseAvailabilityError() 공개 정적인 메소드

Determines whether the specified exception represents a database availability error.
public static IsDatabaseAvailabilityError ( this exception ) : bool
exception this The exception.
리턴 bool
        public static bool IsDatabaseAvailabilityError(this SqlException exception)
        {
            Contract.Requires(exception != null);
            // TODO: determine the error numbers that represent the database if offline
            return exception.Class == 20;
        }