Skip to content

Commit

Permalink
IsolatedEnv.Load(...) splitted and marked as virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
3F committed Oct 5, 2017
1 parent 0f0aed5 commit a84f0f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
21 changes: 14 additions & 7 deletions MvsSln/Core/IsolatedEnv.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,22 @@ protected virtual IEnumerable<IXProject> Load(IEnumerable<ProjectItemCfg> pItems

protected Project Load(ProjectItem pItem, IDictionary<string, string> properties)
{
if(rawXmlProjects != null && rawXmlProjects.ContainsKey(pItem.pGuid))
{
var raw = rawXmlProjects[pItem.pGuid];
if(rawXmlProjects != null && rawXmlProjects.ContainsKey(pItem.pGuid)) {
return Load(rawXmlProjects[pItem.pGuid], properties);
}
return Load(pItem.fullPath, properties);
}

using(var reader = XmlReader.Create(new StreamReader(raw.data.GetStream(raw.encoding), raw.encoding))) {
return new Project(reader, properties, null, PrjCollection);
}
protected virtual Project Load(RawText raw, IDictionary<string, string> properties)
{
using(var reader = XmlReader.Create(new StreamReader(raw.data.GetStream(raw.encoding), raw.encoding))) {
return new Project(reader, properties, null, PrjCollection);
}
return new Project(pItem.fullPath, properties, null, PrjCollection);
}

protected virtual Project Load(string path, IDictionary<string, string> properties)
{
return new Project(path, properties, null, PrjCollection);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The final draft-version of the new configurator for DllExport now fully works vi

### Map of .sln & Writers

v2+ also may provides map of analyzed data. To enable this define a bit **0x0080** for type of operations to parser.
v2+ also provides map of analyzed data. To enable this, define a bit **0x0080** for type of operations to parser.

Parser will expose map through list of `ISection` for each line. For example:

Expand Down

0 comments on commit a84f0f2

Please sign in to comment.