本文整理汇总了C#中VersionControlItemList.Add方法的典型用法代码示例。如果您正苦于以下问题:C# VersionControlItemList.Add方法的具体用法?C# VersionControlItemList.Add怎么用?C# VersionControlItemList.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VersionControlItemList
的用法示例。
在下文中一共展示了VersionControlItemList.Add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetItems
protected VersionControlItemList GetItems ()
{
VersionControlItemList list = new VersionControlItemList ();
VersionControlItem it = GetItem ();
if (it != null)
list.Add (it);
return list;
}
示例2: GetItems
public VersionControlItemList GetItems ()
{
// Cached items are used only in the status view, not in the project pad.
if (items != null)
return items;
// Don't cache node items because they can change
VersionControlItemList nodeItems = new VersionControlItemList ();
foreach (ITreeNavigator node in CurrentNodes) {
VersionControlItem item = CreateItem (node.DataItem);
if (item != null)
nodeItems.Add (item);
}
return nodeItems;
}
示例3: GetItems
VersionControlItemList GetItems ()
{
VersionControlItemList list = new VersionControlItemList ();
WorkspaceItem wob;
SolutionItem sol;
Repository repo = null;
wob = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem;
if (wob != null)
repo = VersionControlService.GetRepository (wob);
if (repo == null) {
sol = IdeApp.ProjectOperations.CurrentSelectedSolutionItem;
if (sol != null)
repo = VersionControlService.GetRepository (sol);
}
if (repo == null || repo.VersionControlSystem == null || !repo.VersionControlSystem.IsInstalled)
return list;
list.Add (new VersionControlItem (repo, wob, wob.FileName, true, null));
return list;
}
示例4: GetSelectedItems
public VersionControlItemList GetSelectedItems ()
{
string[] files = GetCurrentFiles ();
VersionControlItemList items = new VersionControlItemList ();
foreach (string file in files) {
Project prj = IdeApp.Workspace.GetProjectsContainingFile (file).FirstOrDefault ();
items.Add (new VersionControlItem (vc, prj, file, Directory.Exists (file), null));
}
return items;
示例5: Show
public static void Show (Repository repo, string path)
{
VersionControlItemList list = new VersionControlItemList ();
list.Add (new VersionControlItem (repo, null, path, Directory.Exists (path)));
Show (list, false);
}