当前位置: 首页>>代码示例>>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;未经允许,请勿转载。