本文整理汇总了C#中notify_baton类的典型用法代码示例。如果您正苦于以下问题:C# notify_baton类的具体用法?C# notify_baton怎么用?C# notify_baton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
notify_baton类属于命名空间,在下文中一共展示了notify_baton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Unlock
public override void Unlock (IProgressMonitor monitor, bool breakLock, params FilePath[] paths)
{
nb = new notify_baton ();
var localpool = TryStartOperation (monitor);
try {
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
foreach (string path in paths) {
string npath = NormalizePath (path, localpool);
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
}
lockFileList = new ArrayList ();
requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
CheckError (svn.client_unlock (array, breakLock, ctx, localpool));
if (paths.Length != lockFileList.Count)
throw new SubversionException ("Lock operation failed.");
} finally {
apr.pool_destroy (localpool);
lockFileList = null;
TryEndOperation ();
}
}
示例2: Add
public override void Add (FilePath path, bool recurse, ProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
string pathorurl = NormalizePath (path, localpool);
CheckError (svn.client_add3 (pathorurl, recurse, true, false, ctx, localpool));
} finally {
TryEndOperation (localpool);
}
}
示例3: Commit
public override void Commit (FilePath[] paths, string message, IProgressMonitor monitor)
{
if (paths == null || message == null || monitor == null)
throw new ArgumentNullException();
nb = new notify_baton ();
var localpool = TryStartOperation (monitor);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
foreach (string path in paths) {
string npath = NormalizePath (path, localpool);
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
}
IntPtr commit_info = IntPtr.Zero;
commitmessage = message;
CheckError (svn.client_commit (ref commit_info, array, false, ctx, localpool));
unsafe {
if (commit_info != IntPtr.Zero) {
monitor.Log.WriteLine ();
monitor.Log.WriteLine (GettextCatalog.GetString ("Revision: {0}", ((LibSvnClient.svn_client_commit_info_t *) commit_info.ToPointer())->revision));
}
}
} finally {
commitmessage = null;
apr.pool_destroy (localpool);
TryEndOperation ();
}
}
示例4: Delete
public override void Delete (FilePath path, bool force, IProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
nb = new notify_baton ();
var localpool = TryStartOperation (monitor);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
//foreach (string path in paths) {
string npath = NormalizePath (path, localpool);
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
//}
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_delete (ref commit_info, array, force, ctx, localpool));
} finally {
commitmessage = null;
apr.pool_destroy (localpool);
TryEndOperation ();
}
}
示例5: Move
public override void Move (FilePath srcPath, FilePath destPath, SvnRevision rev, bool force, ProgressMonitor monitor)
{
if (srcPath == FilePath.Null || destPath == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
LibSvnClient.Rev revision = (LibSvnClient.Rev) rev;
nb = new notify_baton ();
IntPtr commit_info = IntPtr.Zero;
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
string nsrcPath = NormalizePath (srcPath, localpool);
string ndestPath = NormalizePath (destPath, localpool);
CheckError (svn.client_move (ref commit_info, nsrcPath, ref revision,
ndestPath, force, ctx, localpool));
} finally {
TryEndOperation (localpool);
}
}
示例6: Commit
public override void Commit (FilePath[] paths, string message, IProgressMonitor monitor)
{
if (paths == null || message == null || monitor == null)
throw new ArgumentNullException();
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool (pool);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
foreach (string path in paths) {
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, path));
}
IntPtr commit_info = IntPtr.Zero;
commitmessage = message;
CheckError (svn.client_commit (ref commit_info, array, 0, ctx, localpool));
unsafe {
if (commit_info != IntPtr.Zero) {
monitor.Log.WriteLine ();
monitor.Log.WriteLine (GettextCatalog.GetString ("Revision: {0}", ((LibSvnClient.svn_client_commit_info_t *) commit_info.ToPointer())->revision));
}
}
} finally {
commitmessage = null;
updatemonitor = null;
apr.pool_destroy (localpool);
inProgress = false;
}
}
示例7: Delete
public override void Delete (FilePath path, bool force, IProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool (pool);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
//foreach (string path in paths) {
string npath = NormalizePath (path, localpool);
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
//}
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_delete (ref commit_info, array, (force ? 1 : 0), ctx, localpool));
} finally {
commitmessage = null;
updatemonitor = null;
apr.pool_destroy (localpool);
inProgress = false;
}
}
示例8: Mkdir
public override void Mkdir (string[] paths, string message, ProgressMonitor monitor)
{
if (paths == null || monitor == null)
throw new ArgumentNullException ();
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
IntPtr array = NormalizePaths (localpool, paths.Select (p => (FilePath)p).ToArray ());
commitmessage = message;
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_mkdir2 (ref commit_info, array, ctx, localpool));
} finally {
commitmessage = null;
TryEndOperation (localpool);
}
}
示例9: Add
public override void Add (FilePath path, bool recurse, IProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool (pool);
try {
string pathorurl = NormalizePath (path, localpool);
CheckError (svn.client_add3 (pathorurl, (recurse ? 1 : 0), 1, 0, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
inProgress = false;
}
}
示例10: Checkout
public override void Checkout (string url, FilePath path, Revision revision, bool recurse, IProgressMonitor monitor)
{
if (url == null || monitor == null)
throw new ArgumentNullException ();
if (revision == null)
revision = SvnRevision.Head;
LibSvnClient.Rev rev = (LibSvnClient.Rev) revision;
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr result_rev = IntPtr.Zero;
IntPtr localpool = newpool (pool);
try {
// Using Uri here because the normalization method doesn't remove the redundant port number when using https
url = NormalizePath (new Uri(url).ToString(), localpool);
string npath = NormalizePath (path, localpool);
CheckError (svn.client_checkout (result_rev, url, npath, ref rev, (recurse ? 1 :0), ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
inProgress = false;
}
}
示例11: Mkdir
public override void Mkdir (string[] paths, string message, IProgressMonitor monitor)
{
if (paths == null || monitor == null)
throw new ArgumentNullException ();
TryStartOperation ();
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool(pool);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, paths.Length, IntPtr.Size);
foreach (string path in paths) {
string npath = NormalizePath (path, localpool);
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, npath));
}
commitmessage = message;
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_mkdir2 (ref commit_info, array, ctx, localpool));
} finally {
commitmessage = null;
updatemonitor = null;
apr.pool_destroy (localpool);
TryEndOperation ();
}
}
示例12: Add
public override void Add (FilePath path, bool recurse, IProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
TryStartOperation ();
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool (pool);
try {
string pathorurl = NormalizePath (path, localpool);
CheckError (svn.client_add3 (pathorurl, recurse, true, false, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
TryEndOperation ();
}
}
示例13: Mkdir
public override void Mkdir (string[] paths, string message, IProgressMonitor monitor)
{
if (paths == null || monitor == null)
throw new ArgumentNullException ();
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr localpool = newpool(pool);
try {
// Put each item into an APR array.
IntPtr array = apr.array_make (localpool, paths.Length, IntPtr.Size);
foreach (string path in paths) {
IntPtr item = apr.array_push (array);
Marshal.WriteIntPtr (item, apr.pstrdup (localpool, path));
}
commitmessage = message;
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_mkdir2 (ref commit_info, array, ctx, localpool));
} finally {
commitmessage = null;
updatemonitor = null;
apr.pool_destroy (localpool);
inProgress = false;
}
}
示例14: Checkout
public override void Checkout (string url, FilePath path, Revision revision, bool recurse, ProgressMonitor monitor)
{
if (url == null || monitor == null)
throw new ArgumentNullException ();
if (revision == null)
revision = SvnRevision.Head;
var rev = (LibSvnClient.Rev) revision;
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
// Using Uri here because the normalization method doesn't remove the redundant port number when using https
url = NormalizePath (new Uri(url).ToString(), localpool);
string npath = NormalizePath (path, localpool);
CheckError (svn.client_checkout (IntPtr.Zero, url, npath, ref rev, recurse, ctx, localpool));
} catch (SubversionException e) {
if (e.ErrorCode != 200015)
throw;
if (Directory.Exists (path.ParentDirectory))
FileService.DeleteDirectory (path.ParentDirectory);
} finally {
TryEndOperation (localpool);
}
}
示例15: Move
public override void Move (FilePath srcPath, FilePath destPath, SvnRevision rev, bool force, IProgressMonitor monitor)
{
if (srcPath == FilePath.Null || destPath == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
LibSvnClient.Rev revision = (LibSvnClient.Rev) rev;
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
nb = new notify_baton ();
updatemonitor = monitor;
IntPtr commit_info = IntPtr.Zero;
IntPtr localpool = newpool (pool);
try {
string nsrcPath = NormalizePath (srcPath, localpool);
string ndestPath = NormalizePath (destPath, localpool);
CheckError (svn.client_move (ref commit_info, nsrcPath, ref revision,
ndestPath, (force ? 1 : 0), ctx, localpool));
} finally {
apr.pool_destroy (localpool);
updatemonitor = null;
inProgress = false;
}
}