diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs index 8c5a7303fa..cb9934cd82 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItem.cs @@ -26,14 +26,16 @@ using System; using System.Collections; +using System.Collections.Generic; using MonoDevelop.Core.Serialization; +using MonoDevelop.Projects.Formats.MSBuild; namespace MonoDevelop.Projects { public class ProjectItem: IExtendedDataItem { Hashtable extendedProperties; - + public IDictionary ExtendedProperties { get { if (extendedProperties == null) @@ -41,19 +43,42 @@ namespace MonoDevelop.Projects return extendedProperties; } } + + public void SetMetadata (string name, string value, bool isXml = false) + { + } + + public string GetMetadata (string name, string defaultValue = null) + { + return null; + } internal string Condition { get; set; } + public string ItemName { get; protected set; } + + public virtual string Include { get; protected set; } + + public string UnevaluatedInclude { get; protected set; } + public ProjectItemFlags Flags { get; set; } + + internal protected virtual void Read (Project project, IMSBuildItemEvaluated buildItem) + { + ItemName = buildItem.Name; + Include = buildItem.Include; + UnevaluatedInclude = buildItem.UnevaluatedInclude; + Condition = buildItem.Condition; + } + + internal protected virtual void Write (MSBuildFileFormat fmt, MSBuildItem buildItem) + { + buildItem.Condition = Condition; + } } public class UnknownProjectItem: ProjectItem { - public string ItemName { get; private set; } - - [ItemProperty ("Include")] - public string Include { get; private set; } - public UnknownProjectItem (string name, string include) { this.ItemName = name; |