Amazon.CognitoSync.SyncManager.Internal.Sqlite3Exception.New C# (CSharp) Метод

New() публичный статический Метод

public static New ( System.Result r, string message ) : Sqlite3Exception
r System.Result
message string
Результат Sqlite3Exception
        public static Sqlite3Exception New(Result r, string message)
        {
            return new Sqlite3Exception(r, message);
        }
    }

Usage Example

        private void Execute(string query, params object[] parameters)
        {
            Sqlite3Statement statement = null;

            try
            {
                Result r = (Result)Enum.Parse(typeof(Result), Sqlite3.sqlite3_prepare_v2(Handle, query, out statement).ToString());
                if (r != Result.OK && r != Result.Done && r != Result.Row)
                {
                    throw Sqlite3Exception.New(r, string.Format("Error executing statement {0}", r));
                }
                BindData(statement, parameters);
                r = (Result)Enum.Parse(typeof(Result), Sqlite3.sqlite3_step(statement).ToString());
                if (r != Result.OK && r != Result.Done && r != Result.Row)
                {
                    throw Sqlite3Exception.New(r, string.Format("Error executing statement {0}", r));
                }
            }
            finally
            {
                if (statement != null)
                {
                    Sqlite3.sqlite3_finalize(statement);
                }
            }
        }
All Usage Examples Of Amazon.CognitoSync.SyncManager.Internal.Sqlite3Exception::New
Sqlite3Exception