mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
- Added check for dependencies, which can be installed from the builder. - Replaced CosmosTask with CosmosBuildDefinition, which is much simpler. - The builder can be opened without any command line arguments. - If the VS path is not specified as a command line argument, it can be selected in a dialog.
21 lines
769 B
C#
21 lines
769 B
C#
using System;
|
|
using System.Windows;
|
|
using Microsoft.VisualStudio.Setup.Configuration;
|
|
|
|
namespace Cosmos.Build.Builder.Services.VisualStudioSetup
|
|
{
|
|
internal class VisualStudioSetupPropertyStore : ISetupPropertyStore
|
|
{
|
|
private ISetupPropertyStore _setupPropertyStore;
|
|
|
|
public VisualStudioSetupPropertyStore(ISetupPropertyStore setupPropertyStore)
|
|
{
|
|
_setupPropertyStore = setupPropertyStore;
|
|
}
|
|
|
|
public string[] GetNames() => RunOnMainThread(_setupPropertyStore.GetNames);
|
|
public object GetValue(string pwszName) => RunOnMainThread(() => _setupPropertyStore.GetValue(pwszName));
|
|
|
|
private static T RunOnMainThread<T>(Func<T> function) => Application.Current.Dispatcher.Invoke(function);
|
|
}
|
|
}
|