static unsafe /*svn_error_t*/ IntPtr _svn_auth_simple_prompt_func(
            /*out svn_auth_cred_simple_t*/ void **credPtr, IntPtr baton, sbyte *realm, sbyte *username, int maySave, /*apr_pool_t*/ IntPtr pool)
        {
            var wrapper = AprBaton <SvnAuthWrapper <SvnUserNamePasswordEventArgs> > .Get(baton);

            var args = new SvnUserNamePasswordEventArgs(SvnBase.Utf8_PtrToString(username), SvnBase.Utf8_PtrToString(realm), maySave != 0);

            var cred = (svn_auth_cred_simple_t.__Internal * *)credPtr;

            using (var tmpPool = new AprPool(pool, false))
            {
                *cred = null;
                try
                {
                    wrapper.Raise(args);
                }
                catch (Exception e)
                {
                    return(SvnException.CreateExceptionSvnError("Authorization handler", e).__Instance);
                }

                if (args.Cancel)
                {
                    return(svn_error.svn_error_create((int)SvnErrorCode.SVN_ERR_CANCELLED, null, "Authorization canceled operation").__Instance);
                }
                if (args.Break)
                {
                    return(IntPtr.Zero);
                }

                *cred = (svn_auth_cred_simple_t.__Internal *)tmpPool.AllocCleared(sizeof(svn_auth_cred_simple_t.__Internal));

                (*cred)->username = new IntPtr(tmpPool.AllocString(args.UserName));
                (*cred)->password = new IntPtr(tmpPool.AllocString(args.Password));
                (*cred)->may_save = args.Save ? 1 : 0;
            }

            return(IntPtr.Zero);
        }
 static void ImpSubversionWindowsFileUserNamePasswordHandler(object sender, SvnUserNamePasswordEventArgs e) => e.Break = true;