Skip to content
Permalink
Browse files

[Assets] Properly get namespace from project

  • Loading branch information
xen2 committed Sep 12, 2018
1 parent 24bb053 commit fe22dec3f7176a15ed19c236aee3964e942d35c7
@@ -528,9 +528,8 @@ private string ComputeNamespace(DirectoryBaseViewModel directory)
{
switch (directory)
{
// TODO CSPROJ=XKPKG
//case ProjectViewModel project:
// return project.RootNamespace;
case ProjectCodeViewModel projectCode:
return projectCode.Project.RootNamespace;
case var directoryWithParent when directoryWithParent.Parent != null:
return $"{ComputeNamespace(directoryWithParent.Parent)}.{directoryWithParent.Name}";
default:
@@ -50,7 +50,6 @@ protected override void UpdateIsDeletedStatus()
public class ProjectViewModel : PackageViewModel
{
private bool isCurrentProject;
private PackageViewModel package;

public ProjectViewModel(SessionViewModel session, SolutionProject project, bool packageAlreadyInSession)
: base(session, project, packageAlreadyInSession)
@@ -95,7 +94,7 @@ internal set
/// <summary>
/// Gets the root namespace for this project.
/// </summary>
public string RootNamespace => Name; // TODO CSPROJ=XKPKG
public string RootNamespace => Package.RootNamespace ?? Name;

/// <summary>
/// Gets asset directory view model for a given path and creates all missing parts.

0 comments on commit fe22dec

Please sign in to comment.
You can’t perform that action at this time.