當前位置: 首頁>>代碼示例>>C#>>正文


C# AprSharp.AprPool類代碼示例

本文整理匯總了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;
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:7,代碼來源:SvnClient.cs

示例2: SvnStream

 public SvnStream(IntPtr baton, AprPool pool)
 {
     mStream = Svn.svn_stream_create(baton, pool);
     mReadDelegate = null;
     mWriteDelegate = null;
     mCloseDelegate = null;
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:7,代碼來源:SvnStream.cs

示例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);
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:7,代碼來源:SvnData.cs

示例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);
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:7,代碼來源:SvnClientBase.cs

示例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;
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:8,代碼來源:SvnPath.cs

示例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);
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:10,代碼來源:SvnClientBase.cs

示例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);
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:10,代碼來源:AprHashIndex.cs

示例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);
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:11,代碼來源:SvnUrl.cs

示例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;
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:14,代碼來源:SvnAuthBaton.cs

示例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");
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:16,代碼來源:AprPoolTest.cs

示例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");
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:22,代碼來源:AprPoolTest.cs

示例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);
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:23,代碼來源:CmdBase.cs

示例13: Cat

        public static void Cat(SvnStream stream, SvnUrl pathOrUrl,
							   SvnOptRevision revision, 
							   SvnClientContext ctx, AprPool pool)
        {
            InternalCat(stream, pathOrUrl, revision, ctx, pool);
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:6,代碼來源:SvnClientBase.cs

示例14: Duplicate

 public static SvnData Duplicate(AprPool pool, SvnStringBuf str)
 {
     return(new SvnData(str, pool));
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:4,代碼來源:SvnData.cs

示例15: Create

 public static AprThreadMutex Create(AprPool pool)
 {
     return(Create(AprThreadMutexFlags.Default, pool));
 }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:4,代碼來源:AprThreadMutex.cs


注:本文中的Softec.AprSharp.AprPool類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。