本文整理匯總了C#中Softec.AprSharp.AprPool.CAlloc方法的典型用法代碼示例。如果您正苦於以下問題:C# AprPool.CAlloc方法的具體用法?C# AprPool.CAlloc怎麽用?C# AprPool.CAlloc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Softec.AprSharp.AprPool
的用法示例。
在下文中一共展示了AprPool.CAlloc方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Alloc
public static AprTimeExp Alloc(AprPool pool)
{
return(new AprTimeExp((apr_time_exp_t *)pool.CAlloc(sizeof(apr_time_exp_t))));
}
示例2: CAllocLoop
public void CAllocLoop()
{
AprPool p = new AprPool();
Assert.IsTrue(p.IsNull,"#H000001");
p = AprPool.Create();
Assert.IsFalse(p.IsNull,"#H000002");
for(int i=24;i<4096;i+=24)
{
IntPtr m = p.CAlloc(i);
Assert.IsTrue(m.ToInt32() != 0,String.Format("#H{0,6}a",i));
Assert.IsTrue(Marshal.ReadInt32(m) == 0,String.Format("#H{0,6}b",i));
Assert.IsTrue(p.Alloc(i).ToInt32() != 0,String.Format("#H{0,6}c",i));
}
p.Destroy();
Assert.IsTrue(p.IsNull,"#H000004");
}
示例3: CAlloc
public void CAlloc()
{
AprPool p = new AprPool();
Assert.IsTrue(p.IsNull,"#F01");
p = AprPool.Create();
Assert.IsFalse(p.IsNull,"#F02");
IntPtr m = p.CAlloc(256);
Assert.IsTrue(m.ToInt32() != 0,"#F03");
Assert.IsTrue(Marshal.ReadInt32(m) == 0,"#F04");
p.Destroy();
Assert.IsTrue(p.IsNull,"#F04");
}
示例4: Alloc
public static SvnAuthCredSslServerTrust Alloc(AprPool pool)
{
return(new SvnAuthCredSslServerTrust((svn_auth_cred_ssl_server_trust_t *)
pool.CAlloc(sizeof(svn_auth_cred_ssl_server_trust_t))));
}
示例5: SvnOptRevision
public SvnOptRevision(SvnRevision rev, AprPool pool)
{
mOptRevision = (svn_opt_revision_t *) pool.CAlloc(sizeof(svn_opt_revision_t));
Revision = rev;
}