本文整理汇总了C#中Softec.AprSharp.AprPool类的典型用法代码示例。如果您正苦于以下问题:C# AprPool类的具体用法?C# AprPool怎么用?C# AprPool使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AprPool类属于Softec.AprSharp命名空间,在下文中一共展示了AprPool类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SvnClient
public SvnClient(SvnClientContext ctx, AprPool pool)
{
mGlobalPool = pool;
mPool = Svn.PoolCreate(mGlobalPool);
mContext = ctx;
mAuthObjs = null;
}
示例2: SvnStream
public SvnStream(IntPtr baton, AprPool pool)
{
mStream = Svn.svn_stream_create(baton, pool);
mReadDelegate = null;
mWriteDelegate = null;
mCloseDelegate = null;
}
示例3: SvnData
public SvnData(string str, AprPool pool)
{
byte[] utf8str = Encoder.GetBytes(str);
mString = pool.Alloc(utf8str.Length+1);
Marshal.Copy(utf8str,0,mString,utf8str.Length);
Marshal.WriteByte(mString,utf8str.Length,0);
}
示例4: Blame
public static void Blame(SvnUrl pathOrUrl,
SvnOptRevision start, SvnOptRevision end,
BlameReceiver receiver, IntPtr baton,
SvnClientContext ctx, AprPool pool)
{
InternalBlame(pathOrUrl, start, end, receiver, baton, ctx, pool);
}
示例5: SvnPath
public SvnPath(SvnString str, AprPool pool)
{
IntPtr svnStr;
SvnError err = Svn.svn_utf_string_to_utf8(out svnStr, str, pool);
if(!err.IsNoError)
throw new SvnException(err);
mPath = ((SvnString)svnStr).Data;
}
示例6: Add
public static void Add(SvnPath path,
bool recurse,
SvnClientContext ctx, AprPool pool)
{
Debug.WriteLine(String.Format("svn_client_add({0},{1},{2},{3})",path,recurse,ctx,pool));
SvnError err = Svn.svn_client_add(path,
(recurse ? 1 :0), ctx, pool);
if( !err.IsNoError )
throw new SvnException(err);
}
示例7: First
public static AprHashIndex First(AprPool pool, AprHash h)
{
IntPtr ptr;
Debug.Write(String.Format("apr_hash_first({0},{1})...",pool,h));
ptr = Apr.apr_hash_first(pool,h);
Debug.WriteLine(String.Format("Done({0:X})",((Int32)ptr)));
return(ptr);
}
示例8: SvnUrl
public SvnUrl(string str, AprPool pool)
{
Uri uri;
try {
uri = new Uri(str);
}
catch(System.UriFormatException e) {
throw new SvnException("Invalid URL",e);
}
mUrl = new AprString(uri.AbsoluteUri, pool);
}
示例9: SvnAuthBaton
private SvnAuthBaton(ArrayList authProviders, AprPool pool)
{
AprArray authArray = AprArray.Make(pool,authProviders.Count,Marshal.SizeOf(typeof(IntPtr)));
mAuthProviders = new ArrayList();
foreach(SvnAuthProviderObject authObj in authProviders) {
Marshal.WriteIntPtr(authArray.Push(),authObj);
mAuthProviders.Add(authObj.mAuthProvider);
}
Debug.Write(String.Format("svn_auth_open({0},{1})...",authArray,pool));
Svn.svn_auth_open(out mAuthBaton, authArray, pool);
Debug.WriteLine(String.Format("Done({0:X})",mAuthBaton.ToInt32()));
mParamName = null;
mPool = pool;
}
示例10: AllocLoop
public void AllocLoop()
{
AprPool p = new AprPool();
Assert.IsTrue(p.IsNull,"#G000001");
p = AprPool.Create();
Assert.IsFalse(p.IsNull,"#G000002");
for(int i=24;i<4096;i+=24)
{
Assert.IsTrue(p.Alloc(i).ToInt32() != 0,String.Format("#G{0,6}",i));
}
p.Destroy();
Assert.IsTrue(p.IsNull,"#G000004");
}
示例11: Alloc
public void Alloc()
{
AprPool p = new AprPool();
Assert.IsTrue(p.IsNull,"#E01");
p = AprPool.Create();
Assert.IsFalse(p.IsNull,"#E02");
Assert.IsTrue(p.Alloc(128).ToInt32() != 0,"#E03");
Assert.IsTrue(p.Alloc(256).ToInt32() != 0,"#E04");
Assert.IsTrue(p.Alloc(512).ToInt32() != 0,"#E05");
Assert.IsTrue(p.Alloc(1024).ToInt32() != 0,"#E06");
Assert.IsTrue(p.Alloc(2048).ToInt32() != 0,"#E07");
Assert.IsTrue(p.Alloc(4096).ToInt32() != 0,"#E08");
Assert.IsTrue(p.Alloc(6148).ToInt32() != 0,"#E09");
Assert.IsTrue(p.Alloc(9216).ToInt32() != 0,"#E10");
Assert.IsTrue(p.Alloc(12265).ToInt32() != 0,"#E11");
Assert.IsTrue(p.Alloc(16384).ToInt32() != 0,"#E12");
p.Destroy();
Assert.IsTrue(p.IsNull,"#E13");
}
示例12: GetCommitLogCallback
public SvnError GetCommitLogCallback(out AprString logMessage, out SvnPath tmpFile,
AprArray commitItems, IntPtr baton,
AprPool pool)
{
if (!commitItems.IsNull)
{
foreach (SvnClientCommitItem item in commitItems)
{
Console.WriteLine("C1: {1} ({2}) r{3}",
item.Path, item.Kind, item.Revision);
Console.WriteLine("C2: {1} -> {2}",
item.Url,
item.CopyFromUrl);
}
Console.WriteLine();
}
Console.Write("Enter log message: ");
logMessage = new AprString(Console.ReadLine(), pool);
tmpFile = new SvnPath(pool);
return(SvnError.NoError);
}
示例13: Cat
public static void Cat(SvnStream stream, SvnUrl pathOrUrl,
SvnOptRevision revision,
SvnClientContext ctx, AprPool pool)
{
InternalCat(stream, pathOrUrl, revision, ctx, pool);
}
示例14: Duplicate
public static SvnData Duplicate(AprPool pool, SvnStringBuf str)
{
return(new SvnData(str, pool));
}
示例15: Create
public static AprThreadMutex Create(AprPool pool)
{
return(Create(AprThreadMutexFlags.Default, pool));
}