// Internal for testing internal void UpdateGuestProjectManager(ProjectChangeEventProxyArgs args) { if (args.Kind == ProjectProxyChangeKind.ProjectAdded) { var guestPath = ResolveGuestPath(args.ProjectFilePath); var hostProject = new HostProject(guestPath, args.Newer.Configuration, args.Newer.RootNamespace); _projectSnapshotManager.ProjectAdded(hostProject); if (args.Newer.ProjectWorkspaceState != null) { _projectSnapshotManager.ProjectWorkspaceStateChanged(guestPath, args.Newer.ProjectWorkspaceState); } } else if (args.Kind == ProjectProxyChangeKind.ProjectRemoved) { var guestPath = ResolveGuestPath(args.ProjectFilePath); var hostProject = new HostProject(guestPath, args.Older.Configuration, args.Older.RootNamespace); _projectSnapshotManager.ProjectRemoved(hostProject); } else if (args.Kind == ProjectProxyChangeKind.ProjectChanged) { if (!args.Older.Configuration.Equals(args.Newer.Configuration)) { var guestPath = ResolveGuestPath(args.Newer.FilePath); var hostProject = new HostProject(guestPath, args.Newer.Configuration, args.Newer.RootNamespace); _projectSnapshotManager.ProjectConfigurationChanged(hostProject); } else if (args.Older.ProjectWorkspaceState != args.Newer.ProjectWorkspaceState || args.Older.ProjectWorkspaceState?.Equals(args.Newer.ProjectWorkspaceState) == false) { var guestPath = ResolveGuestPath(args.Newer.FilePath); _projectSnapshotManager.ProjectWorkspaceStateChanged(guestPath, args.Newer.ProjectWorkspaceState); } } }