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