protected static void InternalPropSet(string propName, SvnString propVal, IAprUnmanaged target, bool recurse, AprPool pool) { Debug.WriteLine(String.Format("svn_client_propset({0},{1},{2},{3},{4})", propName, propVal, target, recurse, pool)); SvnError err = Svn.svn_client_propset(propName, propVal, target.ToIntPtr(), (recurse ? 1 : 0), pool); if (!err.IsNoError) { throw new SvnException(err); } }
protected static void InternalCat(SvnStream stream, IAprUnmanaged pathOrUrl, SvnOptRevision revision, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_cat({0},{1},{2},{3},{4})", stream, pathOrUrl, revision, ctx, pool)); SvnError err = Svn.svn_client_cat(stream, pathOrUrl.ToIntPtr(), revision, ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } }
protected static SvnUrl InternalUrlFromPath(IAprUnmanaged pathOrUrl, AprPool pool) { IntPtr s; Debug.Write(String.Format("svn_client_url_from_path({0},{1})...", pathOrUrl, pool)); SvnError err = Svn.svn_client_url_from_path(out s, pathOrUrl.ToIntPtr(), pool); if (!err.IsNoError) { throw new SvnException(err); } Debug.WriteLine(String.Format("Done({0})", s)); return(s); }
protected static AprHash InternalList(IAprUnmanaged pathOrUrl, SvnOptRevision revision, bool recurse, SvnClientContext ctx, AprPool pool) { IntPtr h; Debug.Write(String.Format("svn_client_list({0},{1},{2},{3},{4})...", pathOrUrl, revision, recurse, ctx, pool)); SvnError err = Svn.svn_client_ls(out h, pathOrUrl.ToIntPtr(), revision, (recurse ? 1 : 0), ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } Debug.WriteLine(String.Format("Done({0})", h)); return(h); }
protected static void InternalBlame(IAprUnmanaged pathOrUrl, SvnOptRevision start, SvnOptRevision end, BlameReceiver receiver, IntPtr baton, SvnClientContext ctx, AprPool pool) { SvnDelegate receiverDelegate = new SvnDelegate(receiver); Debug.WriteLine(String.Format("svn_client_blame({0},{1},{2},{3},{4:X},{5},{6})", pathOrUrl, start, end, receiver.Method.Name, baton.ToInt32(), ctx, pool)); SvnError err = Svn.svn_client_blame(pathOrUrl.ToIntPtr(), start, end, (Svn.svn_client_blame_receiver_t)receiverDelegate.Wrapper, baton, ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } }
protected static int InternalExport(IAprUnmanaged from, SvnPath to, SvnOptRevision revision, bool force, SvnClientContext ctx, AprPool pool) { int rev; Debug.Write(String.Format("svn_client_export({0},{1},{2},{3},{4},{5})...", from, to, revision, force, ctx, pool)); SvnError err = Svn.svn_client_export(out rev, from.ToIntPtr(), to, revision, (force ? 1 :0), ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } Debug.WriteLine(String.Format("Done({0})", rev)); return(rev); }
protected static SvnClientCommitInfo InternalCopy(IAprUnmanaged srcPath, SvnOptRevision srcRevision, IAprUnmanaged dstPath, SvnClientContext ctx, AprPool pool) { IntPtr commitInfo; Debug.Write(String.Format("svn_client_copy({0},{1},{2},{3},{4})...", srcPath, srcRevision, dstPath, ctx, pool)); SvnError err = Svn.svn_client_copy(out commitInfo, srcPath.ToIntPtr(), srcRevision, dstPath.ToIntPtr(), ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } Debug.WriteLine(String.Format("Done({0})", commitInfo)); return(commitInfo); }
protected static AprHash InternalPropGet(string propName, IAprUnmanaged target, SvnOptRevision revision, bool recurse, SvnClientContext ctx, AprPool pool) { IntPtr h; Debug.Write(String.Format("svn_client_propget({0},{1},{2},{3},{4},{5})...", propName, target, revision, recurse, ctx, pool)); SvnError err = Svn.svn_client_propget(out h, propName, target.ToIntPtr(), revision, (recurse ? 1 : 0), ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } Debug.WriteLine(String.Format("Done({0})", h)); return(h); }
protected static void InternalDiff(AprArray diffOptions, IAprUnmanaged path1, SvnOptRevision revision1, IAprUnmanaged path2, SvnOptRevision revision2, bool recurse, bool ignoreAncestry, bool noDiffDeleted, AprFile outFile, AprFile errFile, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_diff({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11})", diffOptions, path1, revision1, path2, revision2, recurse, ignoreAncestry, noDiffDeleted, outFile, errFile, ctx, pool)); SvnError err = Svn.svn_client_diff(diffOptions, path1.ToIntPtr(), revision1, path2.ToIntPtr(), revision2, (recurse ? 1 : 0), (ignoreAncestry ? 1 : 0), (noDiffDeleted ? 1 : 0), outFile, errFile, ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } }
protected static void InternalMerge(IAprUnmanaged source1, SvnOptRevision revision1, IAprUnmanaged source2, SvnOptRevision revision2, SvnPath targetWCPath, bool recurse, bool ignoreAncestry, bool force, bool dryRun, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_merge({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10})", source1, revision1, source2, revision2, targetWCPath, recurse, ignoreAncestry, force, dryRun, ctx, pool)); SvnError err = Svn.svn_client_merge(source1.ToIntPtr(), revision1, source2.ToIntPtr(), revision2, targetWCPath, (recurse ? 1 : 0), (ignoreAncestry ? 1 : 0), (force ? 1 : 0), (dryRun ? 1 : 0), ctx, pool); if (!err.IsNoError) { throw new SvnException(err); } }
protected static void InternalCat(SvnStream stream, IAprUnmanaged pathOrUrl, SvnOptRevision revision, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_cat({0},{1},{2},{3},{4})",stream,pathOrUrl,revision,ctx,pool)); SvnError err = Svn.svn_client_cat(stream, pathOrUrl.ToIntPtr(), revision, ctx, pool); if( !err.IsNoError ) throw new SvnException(err); }
protected static SvnClientCommitInfo InternalCopy(IAprUnmanaged srcPath, SvnOptRevision srcRevision, IAprUnmanaged dstPath, SvnClientContext ctx, AprPool pool) { IntPtr commitInfo; Debug.Write(String.Format("svn_client_copy({0},{1},{2},{3},{4})...",srcPath,srcRevision,dstPath,ctx,pool)); SvnError err = Svn.svn_client_copy(out commitInfo, srcPath.ToIntPtr(), srcRevision, dstPath.ToIntPtr(), ctx, pool); if( !err.IsNoError ) throw new SvnException(err); Debug.WriteLine(String.Format("Done({0})",commitInfo)); return(commitInfo); }
protected static void InternalDiff(AprArray diffOptions, IAprUnmanaged path1, SvnOptRevision revision1, IAprUnmanaged path2, SvnOptRevision revision2, bool recurse, bool ignoreAncestry, bool noDiffDeleted, AprFile outFile, AprFile errFile, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_diff({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11})",diffOptions,path1,revision1,path2,revision2,recurse,ignoreAncestry,noDiffDeleted,outFile,errFile,ctx,pool)); SvnError err = Svn.svn_client_diff(diffOptions, path1.ToIntPtr(), revision1, path2.ToIntPtr(), revision2, (recurse ? 1 : 0), (ignoreAncestry ? 1 : 0), (noDiffDeleted ? 1 : 0), outFile, errFile, ctx, pool); if( !err.IsNoError ) throw new SvnException(err); }
public bool ReferenceEquals(IAprUnmanaged obj) { return(obj.ToIntPtr() == ToIntPtr()); }
protected static void InternalBlame(IAprUnmanaged pathOrUrl, SvnOptRevision start, SvnOptRevision end, BlameReceiver receiver, IntPtr baton, SvnClientContext ctx, AprPool pool) { SvnDelegate receiverDelegate = new SvnDelegate(receiver); Debug.WriteLine(String.Format("svn_client_blame({0},{1},{2},{3},{4:X},{5},{6})",pathOrUrl,start,end,receiver.Method.Name,baton.ToInt32(),ctx,pool)); SvnError err = Svn.svn_client_blame(pathOrUrl.ToIntPtr(), start, end, (Svn.svn_client_blame_receiver_t)receiverDelegate.Wrapper, baton, ctx, pool); if( !err.IsNoError ) throw new SvnException(err); }
protected static SvnUrl InternalUrlFromPath(IAprUnmanaged pathOrUrl, AprPool pool) { IntPtr s; Debug.Write(String.Format("svn_client_url_from_path({0},{1})...",pathOrUrl,pool)); SvnError err = Svn.svn_client_url_from_path(out s, pathOrUrl.ToIntPtr(), pool); if( !err.IsNoError ) throw new SvnException(err); Debug.WriteLine(String.Format("Done({0})",s)); return(s); }
protected static void InternalPropSet(string propName, SvnString propVal, IAprUnmanaged target, bool recurse, AprPool pool) { Debug.WriteLine(String.Format("svn_client_propset({0},{1},{2},{3},{4})",propName,propVal,target,recurse,pool)); SvnError err = Svn.svn_client_propset(propName, propVal, target.ToIntPtr(), (recurse ? 1 : 0), pool); if( !err.IsNoError ) throw new SvnException(err); }
protected static AprHash InternalPropList(IAprUnmanaged target, SvnOptRevision revision, bool recurse, SvnClientContext ctx, AprPool pool) { IntPtr h; Debug.Write(String.Format("svn_client_proplist({0},{1},{2},{3},{4})...",target,revision,recurse,ctx,pool)); SvnError err = Svn.svn_client_proplist(out h, target.ToIntPtr(), revision, (recurse ? 1 : 0), ctx, pool); if( !err.IsNoError ) throw new SvnException(err); Debug.WriteLine(String.Format("Done({0})",h)); return(h); }
protected static void InternalMerge(IAprUnmanaged source1, SvnOptRevision revision1, IAprUnmanaged source2, SvnOptRevision revision2, SvnPath targetWCPath, bool recurse, bool ignoreAncestry, bool force, bool dryRun, SvnClientContext ctx, AprPool pool) { Debug.WriteLine(String.Format("svn_client_merge({0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10})",source1,revision1,source2,revision2,targetWCPath,recurse,ignoreAncestry,force,dryRun,ctx,pool)); SvnError err = Svn.svn_client_merge(source1.ToIntPtr(), revision1, source2.ToIntPtr(), revision2, targetWCPath, (recurse ? 1 : 0), (ignoreAncestry ? 1 : 0), (force ? 1 : 0), (dryRun ? 1 : 0), ctx, pool); if( !err.IsNoError ) throw new SvnException(err); }
protected static int InternalExport(IAprUnmanaged from, SvnPath to, SvnOptRevision revision, bool force, SvnClientContext ctx, AprPool pool) { int rev; Debug.Write(String.Format("svn_client_export({0},{1},{2},{3},{4},{5})...",from,to,revision,force,ctx,pool)); SvnError err = Svn.svn_client_export(out rev, from.ToIntPtr(), to, revision, (force ? 1 :0), ctx, pool); if( !err.IsNoError ) throw new SvnException(err); Debug.WriteLine(String.Format("Done({0})",rev)); return(rev); }
public void Push(object o) { if (mEltsType == typeof(IntPtr)) { Push((IntPtr)o); } else { if (mEltsType.IsPrimitive) { if (mEltsType == typeof(bool)) { Push((bool)o); } else if (mEltsType == typeof(byte)) { Push((byte)o); } else if (mEltsType == typeof(sbyte)) { Push((sbyte)o); } else if (mEltsType == typeof(short)) { Push((short)o); } else if (mEltsType == typeof(ushort)) { Push((ushort)o); } else if (mEltsType == typeof(int)) { Push((int)o); } else if (mEltsType == typeof(uint)) { Push((uint)o); } else if (mEltsType == typeof(long)) { Push((long)o); } else if (mEltsType == typeof(ulong)) { Push((ulong)o); } else { throw new AprInvalidOperationException("Array type not supported."); } } else { object co; if (mEltsType != o.GetType()) { ConstructorInfo ctor = mEltsType.GetConstructor(new Type[] { o.GetType(), typeof(AprPool) }); if (ctor == null) { throw new AprInvalidOperationException("Type is not primitive and cannot be constructed from pushed object."); } co = ctor.Invoke(new Object[] { o, Pool }); } else { co = o; } IAprUnmanaged obj = co as IAprUnmanaged; if (o == null) { throw new AprInvalidOperationException("Array type should implement IAprUnmanaged."); } Push(obj.ToIntPtr()); } } }