本文整理汇总了C#中SolutionFolder类的典型用法代码示例。如果您正苦于以下问题:C# SolutionFolder类的具体用法?C# SolutionFolder怎么用?C# SolutionFolder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SolutionFolder类属于命名空间,在下文中一共展示了SolutionFolder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddProject
internal void AddProject(AbstractDProject sub)
{
var folder = sub.BaseDirectory == BaseDirectory || sub.BaseDirectory.IsChildPathOf (BaseDirectory) ? RootFolder : ExternalDepFolder;
if (folder == ExternalDepFolder && sub is DubProject) {
var packageName = (sub as DubProject).packageName.Split(':');
for (int i = 0; i < packageName.Length - 1; i++) {
bool foundSubFolder = false;
foreach (var subFolder in folder.GetAllItems<SolutionFolder>()) {
if (String.Equals (subFolder.Name, packageName [i], StringComparison.CurrentCultureIgnoreCase)) {
folder = subFolder;
foundSubFolder = true;
break;
}
}
if (!foundSubFolder) {
var newSubFolder = new SolutionFolder{ Name = packageName [i] };
folder.AddItem (newSubFolder);
folder = newSubFolder;
}
}
}
if (!folder.Items.Contains (sub))
folder.AddItem (sub, false);
}
示例2: GetCombineDeployFiles
public virtual DeployFileCollection GetCombineDeployFiles (DeployContext ctx, SolutionFolder combine, ConfigurationSelector configuration)
{
if (Next != null)
return Next.GetDeployFiles (ctx, combine, configuration);
else
return new DeployFileCollection ();
}
示例3: GetSupportLevel
public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
{
if (entry is Project)
return FeatureSupportLevel.SupportedByDefault;
else
return FeatureSupportLevel.NotSupported;
}
示例4: Fill
public void Fill (SolutionFolder parentCombine, SolutionItem entry, ISolutionItemFeature[] features)
{
selectedFeatures.Clear ();
selectedEditors.Clear ();
this.entry = entry;
this.parentCombine = parentCombine;
foreach (Gtk.Widget w in box.Children) {
box.Remove (w);
w.Destroy ();
}
// Show enabled features at the beginning
foreach (ISolutionItemFeature feature in features)
if (feature.GetSupportLevel (parentCombine, entry) == FeatureSupportLevel.Enabled) {
Gtk.Widget editor = AddFeature (feature);
selectedFeatures.Add (feature);
selectedEditors.Add (editor);
}
foreach (ISolutionItemFeature feature in features)
if (feature.GetSupportLevel (parentCombine, entry) != FeatureSupportLevel.Enabled)
AddFeature (feature);
if (box.Children.Length == 0) {
// No features
Label lab = new Label ();
lab.Xalign = 0;
lab.Text = GettextCatalog.GetString ("There are no additional features available for this project.");
box.PackStart (lab, false, false, 0);
lab.Show ();
}
scrolled.AddWithViewport (box);
}
示例5: ApplyFeature
public void ApplyFeature (SolutionFolder parentCombine, SolutionItem entry, Widget editor)
{
GtkFeatureWidget fw = (GtkFeatureWidget) editor;
ReferenceManager refmgr = new ReferenceManager ((DotNetProject) entry);
refmgr.GtkPackageVersion = fw.SelectedVersion;
refmgr.Dispose ();
}
示例6: CheckProjectContainsItself
public void CheckProjectContainsItself()
{
var folder = new SolutionFolder ();
var project = new DotNetAssemblyProject { Name = "foo" };
folder.AddItem (project);
Assert.IsNotNull (folder.GetProjectContainingFile (project.FileName), "#1");
}
示例7: ApplyFeature
public void ApplyFeature (SolutionFolder parentFolder, SolutionItem entry, Gtk.Widget editor)
{
// The solution may not be saved yet
if (parentFolder.ParentSolution.FileName.IsNullOrEmpty || !System.IO.File.Exists (parentFolder.ParentSolution.FileName))
parentFolder.ParentSolution.Saved += OnSolutionSaved;
else
OnSolutionSaved (parentFolder.ParentSolution, null);
}
示例8: GetSupportLevel
public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
{
if (entry is TranslationProject && parentCombine != null)
return FeatureSupportLevel.Enabled;
else if ((entry is Project) && parentCombine != null)
return FeatureSupportLevel.Supported;
else
return FeatureSupportLevel.NotSupported;
}
示例9: ProtobuildSubmodule
public ProtobuildSubmodule (ProtobuildModuleInfo latestModuleInfo, ProtobuildModuleInfo submodule, SolutionFolder rootFolder)
{
parentModule = latestModuleInfo;
currentModule = submodule;
RootFolder = rootFolder;
Packages = new ProtobuildPackages(this);
Definitions = new ItemCollection<IProtobuildDefinition>();
Submodules = new ItemCollection<ProtobuildSubmodule>();
}
示例10: GetFeatures
public static ISolutionItemFeature[] GetFeatures (SolutionFolder parentCombine, SolutionItem entry)
{
List<ISolutionItemFeature> list = new List<ISolutionItemFeature> ();
foreach (ISolutionItemFeature e in AddinManager.GetExtensionObjects ("/MonoDevelop/Ide/ProjectFeatures", typeof(ISolutionItemFeature), true)) {
FeatureSupportLevel level = e.GetSupportLevel (parentCombine, entry);
if (level == FeatureSupportLevel.Enabled || level == FeatureSupportLevel.SupportedByDefault)
list.Add (e);
}
return list.ToArray ();
}
示例11: SolutionFolderTestGroup
public SolutionFolderTestGroup (SolutionFolder c): base (c.Name, c)
{
string storeId = c.ItemId;
string resultsPath = MonoDevelop.NUnit.RootTest.GetTestResultsDirectory (c.BaseDirectory);
ResultsStore = new XmlResultsStore (resultsPath, storeId);
combine = c;
combine.ItemAdded += OnEntryChanged;
combine.ItemRemoved += OnEntryChanged;
combine.NameChanged += OnCombineRenamed;
}
示例12: SolutionFolderTestGroup
public SolutionFolderTestGroup (SolutionFolder c): base (c.Name, c)
{
string storeId = c.ItemId;
string resultsPath = Path.Combine (c.BaseDirectory, "test-results");
ResultsStore = new XmlResultsStore (resultsPath, storeId);
combine = c;
combine.ItemAdded += OnEntryChanged;
combine.ItemRemoved += OnEntryChanged;
combine.NameChanged += OnCombineRenamed;
}
示例13: GetSupportLevel
public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
{
if (!(entry is DotNetProject) || !GtkDesignInfo.SupportsRefactoring (entry as DotNetProject))
return FeatureSupportLevel.NotSupported;
else if (GtkDesignInfo.SupportsDesigner ((Project)entry))
return FeatureSupportLevel.Enabled;
else if (entry is DotNetAssemblyProject)
return FeatureSupportLevel.SupportedByDefault;
else
return FeatureSupportLevel.Supported;
}
示例14: CreateProjectCreateInformation
ProjectCreateInformation CreateProjectCreateInformation (NewProjectConfiguration config, SolutionFolder parentFolder)
{
ProjectCreateInformation cinfo = new ProjectCreateInformation ();
cinfo.SolutionPath = new FilePath (config.SolutionLocation).ResolveLinks ();
cinfo.ProjectBasePath = new FilePath (config.ProjectLocation).ResolveLinks ();
cinfo.ProjectName = config.ProjectName;
cinfo.SolutionName = config.SolutionName;
cinfo.ParentFolder = parentFolder;
cinfo.ActiveConfiguration = IdeApp.Workspace.ActiveConfiguration;
cinfo.Parameters = config.Parameters;
return cinfo;
}
示例15: GetSupportLevel
public FeatureSupportLevel GetSupportLevel (SolutionFolder parentCombine, SolutionItem entry)
{
if (parentCombine == null)
return FeatureSupportLevel.NotSupported;
if (entry is PackagingProject)
return FeatureSupportLevel.Enabled;
else if (entry is Project)
return FeatureSupportLevel.SupportedByDefault;
else
return FeatureSupportLevel.NotSupported;
}