17 changed files with 280 additions and 106 deletions
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
/// <summary>
|
||||
/// Base interface for assembly list implementations.
|
||||
/// </summary>
|
||||
public interface IAssemblyList |
||||
{ |
||||
string Name { get; set; } |
||||
IMutableModelCollection<IAssemblyModel> Assemblies { get; set; } |
||||
} |
||||
|
||||
public class AssemblyList : IAssemblyList |
||||
{ |
||||
public string Name { get; set; } |
||||
public IMutableModelCollection<IAssemblyModel> Assemblies { get; set; } |
||||
|
||||
public AssemblyList() |
||||
{ |
||||
Name = "<default>"; |
||||
Assemblies = new NullSafeSimpleModelCollection<IAssemblyModel>(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,19 @@
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
/// <summary>
|
||||
/// Represents a solution assembly list.
|
||||
/// </summary>
|
||||
public interface ISolutionAssemblyList : IAssemblyList |
||||
{ |
||||
/// <summary>
|
||||
/// Returns the <see cref="ICSharpCode.SharpDevelop.Project.ISolution"/> instance behind this assembly list.
|
||||
/// </summary>
|
||||
ISolution Solution { get; } |
||||
} |
||||
} |
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
/// <summary>
|
||||
/// Implements an assembly list representing a solution.
|
||||
/// </summary>
|
||||
class SolutionAssemblyList : ISolutionAssemblyList |
||||
{ |
||||
ISolution solution; |
||||
|
||||
public SolutionAssemblyList(ISolution solution) |
||||
{ |
||||
this.solution = solution; |
||||
if (solution != null) { |
||||
Name = solution.Name; |
||||
Assemblies = new NullSafeSimpleModelCollection<IAssemblyModel>(); |
||||
Assemblies.AddRange(solution.Projects.Select(p => p.AssemblyModel)); |
||||
} |
||||
} |
||||
|
||||
public ISolution Solution { |
||||
get { |
||||
return solution; |
||||
} |
||||
} |
||||
|
||||
public string Name { get; set; } |
||||
|
||||
public IMutableModelCollection<IAssemblyModel> Assemblies { get; set; } |
||||
} |
||||
} |
Loading…
Reference in new issue