mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
43 lines
1.5 KiB
C#
43 lines
1.5 KiB
C#
using Microsoft.VisualStudio.ProjectSystem;
|
|
|
|
using VSPropertyPages;
|
|
|
|
using Cosmos.Build.Common;
|
|
|
|
namespace Cosmos.VS.ProjectSystem.VS.PropertyPages
|
|
{
|
|
internal class OldCosmosPropertyPageViewModel : PropertyPageViewModel
|
|
{
|
|
private OldPropertyManager mPropertyManager;
|
|
private IProjectThreadingService mProjectThreadingService;
|
|
|
|
public BuildProperties BuildProperties => mPropertyManager.BuildProperties;
|
|
|
|
public OldCosmosPropertyPageViewModel(
|
|
OldPropertyManager propertyManager,
|
|
IProjectThreadingService projectThreadingService)
|
|
: base(propertyManager, projectThreadingService)
|
|
{
|
|
mPropertyManager = propertyManager;
|
|
mProjectThreadingService = projectThreadingService;
|
|
}
|
|
|
|
public string ProjectPath => mPropertyManager.ProjectPath;
|
|
|
|
public void LoadProjectProperties()
|
|
{
|
|
mProjectThreadingService.ExecuteSynchronously(() => mPropertyManager.LoadPropertiesAsync());
|
|
}
|
|
|
|
public void LoadProfile()
|
|
{
|
|
BuildProperties.Profile = mProjectThreadingService.ExecuteSynchronously(
|
|
() => mPropertyManager.GetProjectPropertyAsync(BuildPropertyNames.ProfileString));
|
|
}
|
|
|
|
public string GetProjectProperty(string propertyName)
|
|
{
|
|
return mProjectThreadingService.ExecuteSynchronously(() => mPropertyManager.GetProjectPropertyAsync(propertyName));
|
|
}
|
|
}
|
|
}
|