Skip to content

Commit

Permalink
Renamed to match the other constant fields #84
Browse files Browse the repository at this point in the history
  • Loading branch information
mtscout6 committed Mar 19, 2014
1 parent 940ca7e commit bd636ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/FubuCsProjFile/ProjectFiles/CsProj/CsProjCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public IProjectFile CreateAtLocation(string filename, string assemblyName)

private IProjectFile CreateCore(MSBuildProject project, string fileName)
{
var group = project.PropertyGroups.FirstOrDefault(x => x.Properties.Any(p => p.Name == CsProjFile.PROJECTGUID)) ??
var group = project.PropertyGroups.FirstOrDefault(x => x.Properties.Any(p => p.Name == CsProjFile.PROJECT_GUID)) ??
project.PropertyGroups.FirstOrDefault() ?? project.AddNewPropertyGroup(true);

@group.SetPropertyValue(CsProjFile.PROJECTGUID, Guid.NewGuid().ToString().ToUpper(), true);
@group.SetPropertyValue(CsProjFile.PROJECT_GUID, Guid.NewGuid().ToString().ToUpper(), true);

var file = new CsProjFile(fileName, project);
file.AssemblyName = file.RootNamespace = file.ProjectName;
Expand Down
8 changes: 4 additions & 4 deletions src/FubuCsProjFile/ProjectFiles/CsProj/CsProjFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CsProjFile : IProjectFile
<RootNamespace>MyProject</RootNamespace>
<AssemblyName>MyProject</AssemblyName>
*/
public const string PROJECTGUID = "ProjectGuid";
public const string PROJECT_GUID = "ProjectGuid";
public const string ROOT_NAMESPACE = "RootNamespace";
public const string ASSEMBLY_NAME = "AssemblyName";

Expand All @@ -43,18 +43,18 @@ public Guid ProjectGuid
{
get
{
var raw = _project.PropertyGroups.Select(x => x.GetPropertyValue(PROJECTGUID))
var raw = _project.PropertyGroups.Select(x => x.GetPropertyValue(PROJECT_GUID))
.FirstOrDefault(x => x.IsNotEmpty());

return raw.IsEmpty() ? Guid.Empty : Guid.Parse(raw.TrimStart('{').TrimEnd('}'));

}
internal set
{
var group = _project.PropertyGroups.FirstOrDefault(x => x.Properties.Any(p => p.Name == PROJECTGUID))
var group = _project.PropertyGroups.FirstOrDefault(x => x.Properties.Any(p => p.Name == PROJECT_GUID))
?? _project.PropertyGroups.FirstOrDefault() ?? _project.AddNewPropertyGroup(true);

group.SetPropertyValue(PROJECTGUID, value.ToString().ToUpper(), true);
group.SetPropertyValue(PROJECT_GUID, value.ToString().ToUpper(), true);
}
}

Expand Down

0 comments on commit bd636ea

Please sign in to comment.