本文整理汇总了C#中SvnClient.LoadConfiguration方法的典型用法代码示例。如果您正苦于以下问题:C# SvnClient.LoadConfiguration方法的具体用法?C# SvnClient.LoadConfiguration怎么用?C# SvnClient.LoadConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SvnClient
的用法示例。
在下文中一共展示了SvnClient.LoadConfiguration方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAvailableRevisions
public override string[] GetAvailableRevisions()
{
string url = Url.TrimEnd('/');
using (SvnClient client = new SvnClient())
{
client.LoadConfiguration("path");
client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
SvnTarget folderTarget = SvnTarget.FromString(url);
List<String> filesFound = new List<String>();
Collection<SvnListEventArgs> listResults;
if (client.GetList(folderTarget, out listResults))
{
foreach (SvnListEventArgs item in listResults)
if (item.Entry.NodeKind == SvnNodeKind.Directory && !string.IsNullOrEmpty(item.Name))
filesFound.Add(item.Name);
return filesFound.ToArray();
}
}
return new string[0];
}
示例2: CommitRevision
public override void CommitRevision(Revision revision)
{
string localPath = PackagingManager.Instance.OutputDirectory;
string url = Url.TrimEnd('/') + "/" + revision.Directory;
using (SvnClient client = new SvnClient())
{
client.LoadConfiguration("path");
client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
SvnTarget folderTarget = SvnTarget.FromString(url);
//client.Export(folderTarget, tempFolder);
}
}
示例3: CreateSvnClient
public override SvnClient CreateSvnClient()
{
var client = new SvnClient();
if (!string.IsNullOrEmpty(_userName) && !string.IsNullOrEmpty(_password))
{
client.Authentication.ForceCredentials(_userName, _password);
}
client.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true);
client.Authentication.Clear();
client.Authentication.SslServerTrustHandlers +=
(sender, e) =>
{
e.AcceptedFailures = e.Failures;
e.Save = true;
};
return client;
}
示例4: GetRevision
public override Revision GetRevision(string alias)
{
string url = Url.TrimEnd('/');
string tempFolder = Context.Current.MapPath(Core.Settings.rootPath + "/svnRepoTemp/");
if (System.IO.Directory.Exists(tempFolder))
System.IO.Directory.Delete(tempFolder);
using (SvnClient client = new SvnClient())
{
client.LoadConfiguration("path");
client.Authentication.DefaultCredentials = new NetworkCredential(Login, Password);
SvnTarget folderTarget = SvnTarget.FromString(url);
client.Export(folderTarget, tempFolder);
RevisionStorage rs = new RevisionStorage();
var r = rs.GetFromDirectory(alias, tempFolder + alias);
rs.Save(r, alias);
rs.Dispose();
return r;
}
return null;
}