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


C# AprPool.Destroy方法代碼示例

本文整理匯總了C#中Softec.AprSharp.AprPool.Destroy方法的典型用法代碼示例。如果您正苦於以下問題:C# AprPool.Destroy方法的具體用法?C# AprPool.Destroy怎麽用?C# AprPool.Destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Softec.AprSharp.AprPool的用法示例。


在下文中一共展示了AprPool.Destroy方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: 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

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

示例4: CreateDestroySubPoolWithCustomAllocator

        public void CreateDestroySubPoolWithCustomAllocator()
        {
            AprPool p = new AprPool();
            Assert.IsTrue(p.IsNull,"#D01");

            p = AprPool.Create();
            Assert.IsFalse(p.IsNull,"#D02");

            AprAllocator a = AprAllocator.Create();
            Assert.IsFalse(a.IsNull,"#D03");

            AprPool sp = AprPool.Create(p,a);
            Assert.IsFalse(sp.IsNull,"#D04");
            Assert.AreEqual(((IntPtr)p).ToInt32(),((IntPtr)(sp.Parent)).ToInt32(),"#D05");
            Assert.AreEqual(((IntPtr)a).ToInt32(),((IntPtr)(sp.Allocator)).ToInt32(),"#D06");

            a.Owner = p;
            Assert.AreEqual(((IntPtr)p).ToInt32(),((IntPtr)(a.Owner)).ToInt32(),"#D07");

            sp.Destroy();
            Assert.IsTrue(sp.IsNull,"#D08");

            p.Destroy();
            Assert.IsTrue(p.IsNull,"#D09");
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:25,代碼來源:AprPoolTest.cs

示例5: CreateDestroySubPool

        public void CreateDestroySubPool()
        {
            AprPool p = new AprPool();
            Assert.IsTrue(p.IsNull,"#B01");

            p = AprPool.Create();
            Assert.IsFalse(p.IsNull,"#B02");

            AprPool sp = AprPool.Create(p);
            Assert.IsFalse(sp.IsNull,"#B03");
            Assert.AreEqual(((IntPtr)p).ToInt32(),((IntPtr)(sp.Parent)).ToInt32(),"#B04");

            sp.Destroy();
            Assert.IsTrue(sp.IsNull,"#B05");

            p.Destroy();
            Assert.IsTrue(p.IsNull,"#B06");
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:18,代碼來源:AprPoolTest.cs

示例6: CreateDestroy

        public void CreateDestroy()
        {
            AprPool p = new AprPool();
            Assert.IsTrue(p.IsNull,"#A01");

            p = AprPool.Create();
            Assert.IsFalse(p.IsNull,"#A02");

            p.Destroy();
            Assert.IsTrue(p.IsNull,"#A03");
        }
開發者ID:softec,項目名稱:SubversionSharp,代碼行數:11,代碼來源:AprPoolTest.cs

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


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