Beispiel #1
0
        /// <summary>Writes the content of specified files or URLs to a stream. (<c>svn cat</c>)</summary>
        public unsafe bool Write(SvnTarget target, Stream output, SvnWriteArgs args, out SvnPropertyCollection properties)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }
            if (args == null)
            {
                throw new ObjectDisposedException(nameof(args));
            }

            using var pool = new AprPool(_pool);
            apr_hash_t.__Internal *props_ptr = null;

            properties = null;

            if (InternalWrite(target, output, args, &props_ptr, pool))
            {
                var props = apr_hash_t.__CreateInstance(new IntPtr(props_ptr));
                properties = CreatePropertyDictionary(props, pool);
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        /// <summary>Writes the content of specified files or URLs to a stream. (<c>svn cat</c>)</summary>
        public bool Write(SvnTarget target, Stream output, out SvnPropertyCollection properties)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            if (output == null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            return(Write(target, output, new SvnWriteArgs(), out properties));
        }