本文整理汇总了C#中RepositoryBrowser.GetBlame方法的典型用法代码示例。如果您正苦于以下问题:C# RepositoryBrowser.GetBlame方法的具体用法?C# RepositoryBrowser.GetBlame怎么用?C# RepositoryBrowser.GetBlame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RepositoryBrowser
的用法示例。
在下文中一共展示了RepositoryBrowser.GetBlame方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Blame
public ActionResult Blame(string id, string encodedName, string encodedPath)
{
ViewBag.ID = id;
ViewBag.ShowShortMessageOnly = true;
if (!String.IsNullOrEmpty(id))
{
using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, id)))
{
var name = PathEncoder.Decode(encodedName);
var path = PathEncoder.Decode(encodedPath);
string referenceName;
var model = browser.GetBlame(name, path, out referenceName);
PopulateBranchesData(browser, referenceName);
PopulateAddressBarData(path);
return View(model);
}
}
return HttpNotFound();
}
示例2: Blame
public ActionResult Blame(Guid id, string encodedName, string encodedPath)
{
ViewBag.ID = id;
ViewBag.ShowShortMessageOnly = true;
var repo = RepositoryRepository.GetRepository(id);
using (var browser = new RepositoryBrowser(Path.Combine(UserConfiguration.Current.Repositories, repo.Name)))
{
var name = PathEncoder.Decode(encodedName);
var path = PathEncoder.Decode(encodedPath);
string referenceName;
var model = browser.GetBlame(name, path, out referenceName);
model.Logo = new RepositoryLogoDetailModel(repo.Logo);
PopulateBranchesData(browser, referenceName);
PopulateAddressBarData(path);
return View(model);
}
}