本文整理汇总了C#中notify_baton类的典型用法代码示例。如果您正苦于以下问题:C# notify_baton类的具体用法?C# notify_baton怎么用?C# notify_baton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
notify_baton类属于命名空间,在下文中一共展示了notify_baton类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 ();
}
}
开发者ID:LogosBible,项目名称:monodevelop,代码行数:23,代码来源:SvnClient.cs
示例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);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:15,代码来源:SvnClient.cs
示例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 ();
}
}
开发者ID:LogosBible,项目名称:monodevelop,代码行数:32,代码来源:SvnClient.cs
示例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 ();
}
}
开发者ID:LogosBible,项目名称:monodevelop,代码行数:23,代码来源:SvnClient.cs
示例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);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:20,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:41,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:32,代码来源:SvnClient.cs
示例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);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:20,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:22,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:29,代码来源:SvnClient.cs
示例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 ();
}
}
开发者ID:pjt33,项目名称:monodevelop,代码行数:31,代码来源:SvnClient.cs
示例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 ();
}
}
开发者ID:pjt33,项目名称:monodevelop,代码行数:19,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:34,代码来源:SvnClient.cs
示例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);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:27,代码来源:SvnClient.cs
示例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;
}
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:28,代码来源:SvnClient.cs
示例16: Commit
public override void Commit (FilePath[] paths, string message, ProgressMonitor monitor)
{
if (paths == null || message == null || monitor == null)
throw new ArgumentNullException();
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
IntPtr array = NormalizePaths (localpool, paths);
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;
TryEndOperation (localpool);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:25,代码来源:SvnClient.cs
示例17: Unlock
public override void Unlock (IProgressMonitor monitor, bool breakLock, params FilePath[] paths)
{
lock (sync) {
if (inProgress)
throw new SubversionException ("Another Subversion operation is already in progress.");
inProgress = true;
}
IntPtr localpool = newpool (pool);
IntPtr array = apr.array_make (localpool, 0, IntPtr.Size);
updatemonitor = monitor;
nb = new notify_baton ();
try {
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 ? 1 : 0, ctx, localpool));
if (paths.Length != lockFileList.Count)
throw new SubversionException ("Lock operation failed.");
} finally {
apr.pool_destroy (localpool);
lockFileList = null;
updatemonitor = null;
inProgress = false;
}
}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:32,代码来源:SvnClient.cs
示例18: Delete
public override void Delete (FilePath path, bool force, ProgressMonitor monitor)
{
if (path == FilePath.Null || monitor == null)
throw new ArgumentNullException ();
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
IntPtr array = NormalizePaths (localpool, path);
IntPtr commit_info = IntPtr.Zero;
CheckError (svn.client_delete (ref commit_info, array, force, ctx, localpool));
} finally {
commitmessage = null;
TryEndOperation (localpool);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:17,代码来源:SvnClient.cs
示例19: 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;
nb = new notify_baton ();
var localpool = TryStartOperation (monitor);
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 (IntPtr.Zero, url, npath, ref rev, recurse, ctx, localpool));
} finally {
apr.pool_destroy (localpool);
TryEndOperation ();
}
}
开发者ID:jrhtcg,项目名称:monodevelop,代码行数:21,代码来源:SvnClient.cs
示例20: Unlock
public override void Unlock (ProgressMonitor monitor, bool breakLock, params FilePath[] paths)
{
nb = new notify_baton ();
IntPtr localpool = IntPtr.Zero;
try {
localpool = TryStartOperation (monitor);
IntPtr array = NormalizePaths (localpool, paths);
lockFileList = new ArrayList ();
requiredLockState = LibSvnClient.NotifyLockState.Unlocked;
CheckError (svn.client_unlock (array, breakLock, ctx, localpool));
if (paths.Length != lockFileList.Count)
throw new SubversionException ("Unlock operation failed.");
} finally {
lockFileList = null;
TryEndOperation (localpool);
}
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:18,代码来源:SvnClient.cs
注:本文中的notify_baton类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论