简体   繁体   English

SharpSVN.DLL - C#.NET- 在 windows 应用程序中获取 SVN 存储库

[英]SharpSVN.DLL - C#.NET- Get SVN Repository in windows application

How can I access the SVN repository using SharpSVN and allow the user to select the project from a windows form.如何使用 SharpSVN 访问 SVN 存储库并允许用户从 windows 表单中访问 select 项目。

SharpSVN is used by SVNMonitor tool. SharpSVN 由SVNMonitor工具使用。
Now that SVNMonitor is open source, makes sense to take a look at its trunk to see how it's implemented.既然SVNMonitor是开源的,那么看看它的主干以了解它是如何实现的是有意义的。
It's at http://sharpregion.googlecode.com/svn/trunk/svnmonitor/trunk/它位于http://sharpregion.googlecode.com/svn/trunk/svnmonitor/trunk/

Some of the code from SVNMonitor using SharpSVN SVNMonitor 中使用 SharpSVN 的一些代码

using System;
using System.Collections.Generic;
using System.Text;
using SharpSvn;
using System.Net;
using SVNMonitor.Entities;
using System.Collections.ObjectModel;
using System.Windows.Forms;
using SVNMonitor.View.Dialogs;
using SVNMonitor.Helpers;

namespace SVNMonitor.SVN
{
    internal class SharpSVNClient
    {
        #region Fields

        private const string RecommendProperty = "svnmonitor:recommend";

        #endregion Fields

        #region Methods

        private static SvnClient GetSvnClient()
        {
            SvnClient client = new SvnClient();

            return client;
        }

        private static SvnClient GetSvnClient(Source source)
        {
            SvnClient client = GetSvnClient();

            SetAuthentication(client, source);

            return client;
        }

        private static void SetAuthentication(SvnClient client, Source source)
        {
            if (source.Authenticate)
            {
                SetAuthentication(client, source.UserName, source.Password);
            }
            else
            {
                SharpSvn.UI.SvnUI.Bind(client, (IWin32Window)null);
            }
        }

More at http://sharpregion.googlecode.com/svn/trunk/svnmonitor/trunk/SVNMonitor/SVN/SharpSVNClient.cs更多信息请访问http://sharpregion.googlecode.com/svn/trunk/svnmonitor/trunk/SVNMonitor/SVN/SharpSVNClient.cs

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用C#.net中的SharpSVn DLL获取SVN工作文件夹中当前特定文件的先前版本? - How can I get the previous version of a particular file currently in the SVN working folder using SharpSVn DLL in C#.net? System.IO.FileNotFoundException:无法加载文件或程序集。 系统找不到文件SharpSvn.dll - System.IO.FileNotFoundException: Could not load file or assembly. The system cannot find the file SharpSvn.dll 如何使用C#.NET使用Sharpsvn将本地文件导入SVN - How to import local files to SVN with sharpsvn using C#.NET 使用SharpSVN进行SVN存储库身份验证 - 凭据无法正常工作 - SVN Repository Authentication with SharpSVN - Credentials not working 我如何使用 SharpSvn 在 c# 中列出 SVN 存储库的所有现有修订版 - How do i list all existing revisions of a SVN Repository in c# using SharpSvn 使用SharpSVN获得SVN文件夹的权限 - Get permission for an SVN folder using SharpSVN 如何使用SharpSvn获取存储库的所有分支? - How to get all branches of repository with SharpSvn? 替换 C# .NET 应用程序使用的 Windows 共享文件夹上的 DLL - Replacing a DLL on a Windows shared folder that is used by a C# .NET application C#.net- 按钮单击事件时在datagridview控件中显示xml文件的代码 - C#.net- code to display xml file in the datagridview control on button click event C# SVN 预提交挂钩,SharpSvn 错误 - C# SVN Pre Commit Hook, SharpSvn error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM