From 4ed18638e901ae7bfdc48433ff18cc783cf88b53 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 19 Jan 2021 18:55:26 -0300 Subject: [PATCH] =?UTF-8?q?=E2=AD=AE=20Rename=20top-level=20namespace=20to?= =?UTF-8?q?=20Devlooped=20=E2=AD=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #70 --- src/VisualStudio.Tests/ChooserTests.cs | 2 +- src/VisualStudio.Tests/CommandFactoryTests.cs | 2 +- .../Commands/ClientCommandTests.cs | 4 ++-- .../Commands/GenerateReadmeCommandTests.cs | 4 ++-- src/VisualStudio.Tests/OutputHelperTextWriter.cs | 2 +- src/VisualStudio.Tests/ProgramTests.cs | 2 +- .../VisualStudioInstanceExtensions.cs | 2 +- src/VisualStudio.Tests/VisualStudioOptionsTests.cs | 2 +- .../VisualStudioPredicateBuilderTests.cs | 2 +- src/VisualStudio/Channel.cs | 2 +- src/VisualStudio/Chooser.cs | 2 +- src/VisualStudio/Command.cs | 2 +- src/VisualStudio/CommandDescriptor.cs | 4 ++-- src/VisualStudio/CommandFactory.cs | 2 +- src/VisualStudio/Commands.cs | 2 +- src/VisualStudio/Commands/AliasCommand.cs | 2 +- src/VisualStudio/Commands/AliasCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/ClientCommand.cs | 2 +- src/VisualStudio/Commands/ClientCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/ConfigCommand.cs | 2 +- src/VisualStudio/Commands/ConfigCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/GenerateReadmeCommand.cs | 2 +- .../Commands/GenerateReadmeCommandDescriptor.cs | 4 ++-- src/VisualStudio/Commands/InstallCommand.cs | 2 +- .../Commands/InstallCommandDescriptor.cs | 4 ++-- src/VisualStudio/Commands/KillCommand.cs | 2 +- src/VisualStudio/Commands/KillCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/LogCommand.cs | 2 +- src/VisualStudio/Commands/LogCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/ModifyCommand.cs | 2 +- src/VisualStudio/Commands/ModifyCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/RunCommand.cs | 2 +- src/VisualStudio/Commands/RunCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/SaveCommand.cs | 2 +- src/VisualStudio/Commands/SaveCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/UpdateCommand.cs | 2 +- src/VisualStudio/Commands/UpdateCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/UpdateSelfCommand.cs | 2 +- .../Commands/UpdateSelfCommandDescriptor.cs | 2 +- src/VisualStudio/Commands/WhereCommand.cs | 2 +- src/VisualStudio/Commands/WhereCommandDescriptor.cs | 2 +- src/VisualStudio/DefaultTextWriter.cs | 2 +- src/VisualStudio/Docs/modify.md | 5 +++++ src/VisualStudio/Docs/{README.md => readme.md} | 0 src/VisualStudio/ErrorCodes.cs | 2 +- src/VisualStudio/IOptions.cs | 2 +- src/VisualStudio/ITextWriter.cs | 2 +- src/VisualStudio/InstallerService.cs | 2 +- src/VisualStudio/MarkdownOptionsTextWriter.cs | 2 +- src/VisualStudio/OptionSet.cs | 2 +- src/VisualStudio/Options.cs | 2 +- src/VisualStudio/Options/ChannelOption.cs | 2 +- src/VisualStudio/Options/ClientOptions.cs | 2 +- src/VisualStudio/Options/DebugOption.cs | 2 +- src/VisualStudio/Options/ExperimentalOption.cs | 2 +- src/VisualStudio/Options/FilterOption.cs | 2 +- src/VisualStudio/Options/FirstOption.cs | 2 +- src/VisualStudio/Options/GlobalOption.cs | 2 +- src/VisualStudio/Options/HelpOption.cs | 2 +- src/VisualStudio/Options/ListOption.cs | 2 +- src/VisualStudio/Options/NicknameOption.cs | 2 +- src/VisualStudio/Options/SaveOption.cs | 2 +- src/VisualStudio/Options/SelectAllOption.cs | 2 +- src/VisualStudio/Options/SelectPropertyOption.cs | 2 +- src/VisualStudio/Options/SelfOption.cs | 2 +- src/VisualStudio/Options/SkuOption.cs | 12 ++++++------ src/VisualStudio/Options/VersionOption.cs | 2 +- src/VisualStudio/Options/VisualStudioOptions.cs | 2 +- src/VisualStudio/Options/WorkloadOptions.cs | 2 +- src/VisualStudio/ProcessExtensions.cs | 10 ++++++++-- src/VisualStudio/Program.cs | 5 +++-- src/VisualStudio/ShowUsageException.cs | 2 +- src/VisualStudio/Sku.cs | 2 +- src/VisualStudio/ToolSettings.cs | 2 +- src/VisualStudio/VisualStudioInstanceExtensions.cs | 2 +- src/VisualStudio/VisualStudioPredicateBuilder.cs | 2 +- src/VisualStudio/WhereException.cs | 2 +- src/VisualStudio/WhereService.cs | 2 +- 78 files changed, 100 insertions(+), 88 deletions(-) rename src/VisualStudio/Docs/{README.md => readme.md} (100%) diff --git a/src/VisualStudio.Tests/ChooserTests.cs b/src/VisualStudio.Tests/ChooserTests.cs index 3e5f244..2cf543d 100644 --- a/src/VisualStudio.Tests/ChooserTests.cs +++ b/src/VisualStudio.Tests/ChooserTests.cs @@ -4,7 +4,7 @@ using Xunit; using Xunit.Abstractions; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class ChooserTests { diff --git a/src/VisualStudio.Tests/CommandFactoryTests.cs b/src/VisualStudio.Tests/CommandFactoryTests.cs index 52cbec1..f3e3ad0 100644 --- a/src/VisualStudio.Tests/CommandFactoryTests.cs +++ b/src/VisualStudio.Tests/CommandFactoryTests.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Xunit; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class CommandFactoryTests { diff --git a/src/VisualStudio.Tests/Commands/ClientCommandTests.cs b/src/VisualStudio.Tests/Commands/ClientCommandTests.cs index 3bede5c..f0efbad 100644 --- a/src/VisualStudio.Tests/Commands/ClientCommandTests.cs +++ b/src/VisualStudio.Tests/Commands/ClientCommandTests.cs @@ -8,7 +8,7 @@ using Xunit.Abstractions; using DevEnv = vswhere.VisualStudioInstance; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class ClientCommandTests { @@ -112,7 +112,7 @@ protected override IEnumerable ReadOutputLines(Process process) { yield return "Start Live Share Session command enabled: True"; yield return "Start Live Share Session command succeeded: True"; - yield return $"Invitation link:https://prod.liveshare.vsengsaas.visualstudio.com/join?{GeneratedServerWorkspaceId}"; + yield return $"Invitation link:https://prod.liveshare.vsengsaas.VisualStudio.com/join?{GeneratedServerWorkspaceId}"; } } diff --git a/src/VisualStudio.Tests/Commands/GenerateReadmeCommandTests.cs b/src/VisualStudio.Tests/Commands/GenerateReadmeCommandTests.cs index be632c1..e3cd13a 100644 --- a/src/VisualStudio.Tests/Commands/GenerateReadmeCommandTests.cs +++ b/src/VisualStudio.Tests/Commands/GenerateReadmeCommandTests.cs @@ -7,7 +7,7 @@ using Xunit; using Xunit.Abstractions; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class GenerateReadmeCommandTests { @@ -73,7 +73,7 @@ public TestCommandDescriptor() { Description = "test command description"; - Options = VisualStudio.Options.Empty.With( + Options = Devlooped.Options.Empty.With( new OptionSet { { "headers should not be included in the markdown" }, diff --git a/src/VisualStudio.Tests/OutputHelperTextWriter.cs b/src/VisualStudio.Tests/OutputHelperTextWriter.cs index ebc9410..f259ac5 100644 --- a/src/VisualStudio.Tests/OutputHelperTextWriter.cs +++ b/src/VisualStudio.Tests/OutputHelperTextWriter.cs @@ -2,7 +2,7 @@ using System.Text; using Xunit.Abstractions; -namespace VisualStudio.Tests +namespace Devlooped.Tests { internal class OutputHelperTextWriter : TextWriter { diff --git a/src/VisualStudio.Tests/ProgramTests.cs b/src/VisualStudio.Tests/ProgramTests.cs index 3c07dcd..d634eb2 100644 --- a/src/VisualStudio.Tests/ProgramTests.cs +++ b/src/VisualStudio.Tests/ProgramTests.cs @@ -6,7 +6,7 @@ using Xunit; using Xunit.Abstractions; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class ProgramTests { diff --git a/src/VisualStudio.Tests/VisualStudioInstanceExtensions.cs b/src/VisualStudio.Tests/VisualStudioInstanceExtensions.cs index 57be6c1..430ffbf 100644 --- a/src/VisualStudio.Tests/VisualStudioInstanceExtensions.cs +++ b/src/VisualStudio.Tests/VisualStudioInstanceExtensions.cs @@ -1,6 +1,6 @@ using System; using System.Collections.Generic; -using VisualStudio; +using Devlooped; namespace vswhere { diff --git a/src/VisualStudio.Tests/VisualStudioOptionsTests.cs b/src/VisualStudio.Tests/VisualStudioOptionsTests.cs index 2db61fa..d6ae986 100644 --- a/src/VisualStudio.Tests/VisualStudioOptionsTests.cs +++ b/src/VisualStudio.Tests/VisualStudioOptionsTests.cs @@ -3,7 +3,7 @@ using System.Linq; using Xunit; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class VisualStudioOptionsTests { diff --git a/src/VisualStudio.Tests/VisualStudioPredicateBuilderTests.cs b/src/VisualStudio.Tests/VisualStudioPredicateBuilderTests.cs index 860c1b8..edf21a4 100644 --- a/src/VisualStudio.Tests/VisualStudioPredicateBuilderTests.cs +++ b/src/VisualStudio.Tests/VisualStudioPredicateBuilderTests.cs @@ -3,7 +3,7 @@ using vswhere; using Xunit; -namespace VisualStudio.Tests +namespace Devlooped.Tests { public class VisualStudioPredicateBuilderTests { diff --git a/src/VisualStudio/Channel.cs b/src/VisualStudio/Channel.cs index 60b74f7..3e5c74b 100644 --- a/src/VisualStudio/Channel.cs +++ b/src/VisualStudio/Channel.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { public enum Channel { diff --git a/src/VisualStudio/Chooser.cs b/src/VisualStudio/Chooser.cs index b9da15b..c82737c 100644 --- a/src/VisualStudio/Chooser.cs +++ b/src/VisualStudio/Chooser.cs @@ -5,7 +5,7 @@ using System.Linq; using vswhere; -namespace VisualStudio +namespace Devlooped { class Chooser { diff --git a/src/VisualStudio/Command.cs b/src/VisualStudio/Command.cs index 7f997f0..5865929 100644 --- a/src/VisualStudio/Command.cs +++ b/src/VisualStudio/Command.cs @@ -1,7 +1,7 @@ using System.IO; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { abstract class Command { diff --git a/src/VisualStudio/CommandDescriptor.cs b/src/VisualStudio/CommandDescriptor.cs index beb9eac..d9155a4 100644 --- a/src/VisualStudio/CommandDescriptor.cs +++ b/src/VisualStudio/CommandDescriptor.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using System.Collections.Immutable; -namespace VisualStudio +namespace Devlooped { abstract class CommandDescriptor { - public IOptions Options { get; protected set; } = VisualStudio.Options.Empty; + public IOptions Options { get; protected set; } = Devlooped.Options.Empty; public string Description { get; protected set; } = string.Empty; diff --git a/src/VisualStudio/CommandFactory.cs b/src/VisualStudio/CommandFactory.cs index 2a2e126..a41e36d 100644 --- a/src/VisualStudio/CommandFactory.cs +++ b/src/VisualStudio/CommandFactory.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using DotNetConfig; -namespace VisualStudio +namespace Devlooped { sealed class CommandFactory { diff --git a/src/VisualStudio/Commands.cs b/src/VisualStudio/Commands.cs index 31977a2..c6fe821 100644 --- a/src/VisualStudio/Commands.cs +++ b/src/VisualStudio/Commands.cs @@ -1,6 +1,6 @@ using DotNetConfig; -namespace VisualStudio +namespace Devlooped { class Commands { diff --git a/src/VisualStudio/Commands/AliasCommand.cs b/src/VisualStudio/Commands/AliasCommand.cs index 5f871d4..44abb8a 100644 --- a/src/VisualStudio/Commands/AliasCommand.cs +++ b/src/VisualStudio/Commands/AliasCommand.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class AliasCommand : Command { diff --git a/src/VisualStudio/Commands/AliasCommandDescriptor.cs b/src/VisualStudio/Commands/AliasCommandDescriptor.cs index 6e84884..8aa8eb0 100644 --- a/src/VisualStudio/Commands/AliasCommandDescriptor.cs +++ b/src/VisualStudio/Commands/AliasCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class AliasCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/ClientCommand.cs b/src/VisualStudio/Commands/ClientCommand.cs index ed35234..24002c1 100644 --- a/src/VisualStudio/Commands/ClientCommand.cs +++ b/src/VisualStudio/Commands/ClientCommand.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using DevEnv = vswhere.VisualStudioInstance; -namespace VisualStudio +namespace Devlooped { class ClientCommand : Command, IDisposable { diff --git a/src/VisualStudio/Commands/ClientCommandDescriptor.cs b/src/VisualStudio/Commands/ClientCommandDescriptor.cs index e48fa1c..c24e3a5 100644 --- a/src/VisualStudio/Commands/ClientCommandDescriptor.cs +++ b/src/VisualStudio/Commands/ClientCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class ClientCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/ConfigCommand.cs b/src/VisualStudio/Commands/ConfigCommand.cs index 37cb4c7..34e34f9 100644 --- a/src/VisualStudio/Commands/ConfigCommand.cs +++ b/src/VisualStudio/Commands/ConfigCommand.cs @@ -3,7 +3,7 @@ using System.IO; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class ConfigCommand : Command { diff --git a/src/VisualStudio/Commands/ConfigCommandDescriptor.cs b/src/VisualStudio/Commands/ConfigCommandDescriptor.cs index a1c8b9e..3070f40 100644 --- a/src/VisualStudio/Commands/ConfigCommandDescriptor.cs +++ b/src/VisualStudio/Commands/ConfigCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class ConfigCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/GenerateReadmeCommand.cs b/src/VisualStudio/Commands/GenerateReadmeCommand.cs index 9fb732c..5855e1c 100644 --- a/src/VisualStudio/Commands/GenerateReadmeCommand.cs +++ b/src/VisualStudio/Commands/GenerateReadmeCommand.cs @@ -2,7 +2,7 @@ using System.Text; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class GenerateReadmeCommand : Command { diff --git a/src/VisualStudio/Commands/GenerateReadmeCommandDescriptor.cs b/src/VisualStudio/Commands/GenerateReadmeCommandDescriptor.cs index d767b0f..b3c9c7b 100644 --- a/src/VisualStudio/Commands/GenerateReadmeCommandDescriptor.cs +++ b/src/VisualStudio/Commands/GenerateReadmeCommandDescriptor.cs @@ -6,12 +6,12 @@ using System.Threading.Tasks; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class GenerateReadmeCommandDescriptor : CommandDescriptor { const string ResourcePrefix = "VisualStudio.Docs."; - const string ReadmeResource = ResourcePrefix + "README.md"; + const string ReadmeResource = ResourcePrefix + "readme.md"; public GenerateReadmeCommandDescriptor(Dictionary commands) { diff --git a/src/VisualStudio/Commands/InstallCommand.cs b/src/VisualStudio/Commands/InstallCommand.cs index 9b1f628..c20e58e 100644 --- a/src/VisualStudio/Commands/InstallCommand.cs +++ b/src/VisualStudio/Commands/InstallCommand.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class InstallCommand : Command { diff --git a/src/VisualStudio/Commands/InstallCommandDescriptor.cs b/src/VisualStudio/Commands/InstallCommandDescriptor.cs index 25d2418..7ab32b3 100644 --- a/src/VisualStudio/Commands/InstallCommandDescriptor.cs +++ b/src/VisualStudio/Commands/InstallCommandDescriptor.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class InstallCommandDescriptor : CommandDescriptor { @@ -15,7 +15,7 @@ public InstallCommandDescriptor() public Channel? Channel => vsOptions.Channel; - public Sku? Sku => vsOptions.Sku ?? VisualStudio.Sku.Community; + public Sku? Sku => vsOptions.Sku ?? Devlooped.Sku.Community; public string Nickname => vsOptions.Nickname; diff --git a/src/VisualStudio/Commands/KillCommand.cs b/src/VisualStudio/Commands/KillCommand.cs index c999ad6..ae79f7a 100644 --- a/src/VisualStudio/Commands/KillCommand.cs +++ b/src/VisualStudio/Commands/KillCommand.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class KillCommand : Command { diff --git a/src/VisualStudio/Commands/KillCommandDescriptor.cs b/src/VisualStudio/Commands/KillCommandDescriptor.cs index 43f4765..959b129 100644 --- a/src/VisualStudio/Commands/KillCommandDescriptor.cs +++ b/src/VisualStudio/Commands/KillCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class KillCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/LogCommand.cs b/src/VisualStudio/Commands/LogCommand.cs index 8b8c114..0078953 100644 --- a/src/VisualStudio/Commands/LogCommand.cs +++ b/src/VisualStudio/Commands/LogCommand.cs @@ -3,7 +3,7 @@ using System.IO; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class LogCommand : Command { diff --git a/src/VisualStudio/Commands/LogCommandDescriptor.cs b/src/VisualStudio/Commands/LogCommandDescriptor.cs index 1a77045..16ebd96 100644 --- a/src/VisualStudio/Commands/LogCommandDescriptor.cs +++ b/src/VisualStudio/Commands/LogCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class LogCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/ModifyCommand.cs b/src/VisualStudio/Commands/ModifyCommand.cs index 911987f..e9f5903 100644 --- a/src/VisualStudio/Commands/ModifyCommand.cs +++ b/src/VisualStudio/Commands/ModifyCommand.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class ModifyCommand : Command { diff --git a/src/VisualStudio/Commands/ModifyCommandDescriptor.cs b/src/VisualStudio/Commands/ModifyCommandDescriptor.cs index 2329e80..0990256 100644 --- a/src/VisualStudio/Commands/ModifyCommandDescriptor.cs +++ b/src/VisualStudio/Commands/ModifyCommandDescriptor.cs @@ -1,6 +1,6 @@ using System.Collections.Immutable; -namespace VisualStudio +namespace Devlooped { class ModifyCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/RunCommand.cs b/src/VisualStudio/Commands/RunCommand.cs index d0d9fd1..7555a3c 100644 --- a/src/VisualStudio/Commands/RunCommand.cs +++ b/src/VisualStudio/Commands/RunCommand.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class RunCommand : Command { diff --git a/src/VisualStudio/Commands/RunCommandDescriptor.cs b/src/VisualStudio/Commands/RunCommandDescriptor.cs index 922e08a..c2e56eb 100644 --- a/src/VisualStudio/Commands/RunCommandDescriptor.cs +++ b/src/VisualStudio/Commands/RunCommandDescriptor.cs @@ -2,7 +2,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class RunCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/SaveCommand.cs b/src/VisualStudio/Commands/SaveCommand.cs index 0d593f9..e254dca 100644 --- a/src/VisualStudio/Commands/SaveCommand.cs +++ b/src/VisualStudio/Commands/SaveCommand.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using DotNetConfig; -namespace VisualStudio +namespace Devlooped { class SaveCommand : Command { diff --git a/src/VisualStudio/Commands/SaveCommandDescriptor.cs b/src/VisualStudio/Commands/SaveCommandDescriptor.cs index e89ddec..ce86b75 100644 --- a/src/VisualStudio/Commands/SaveCommandDescriptor.cs +++ b/src/VisualStudio/Commands/SaveCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class SaveCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/UpdateCommand.cs b/src/VisualStudio/Commands/UpdateCommand.cs index a347127..8a46b91 100644 --- a/src/VisualStudio/Commands/UpdateCommand.cs +++ b/src/VisualStudio/Commands/UpdateCommand.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class UpdateCommand : Command { diff --git a/src/VisualStudio/Commands/UpdateCommandDescriptor.cs b/src/VisualStudio/Commands/UpdateCommandDescriptor.cs index 24d0136..6a864aa 100644 --- a/src/VisualStudio/Commands/UpdateCommandDescriptor.cs +++ b/src/VisualStudio/Commands/UpdateCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class UpdateCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/UpdateSelfCommand.cs b/src/VisualStudio/Commands/UpdateSelfCommand.cs index 9769809..c20d7d9 100644 --- a/src/VisualStudio/Commands/UpdateSelfCommand.cs +++ b/src/VisualStudio/Commands/UpdateSelfCommand.cs @@ -2,7 +2,7 @@ using System.IO; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class UpdateSelfCommand : Command { diff --git a/src/VisualStudio/Commands/UpdateSelfCommandDescriptor.cs b/src/VisualStudio/Commands/UpdateSelfCommandDescriptor.cs index fa9543f..0f406df 100644 --- a/src/VisualStudio/Commands/UpdateSelfCommandDescriptor.cs +++ b/src/VisualStudio/Commands/UpdateSelfCommandDescriptor.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class UpdateSelfCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/Commands/WhereCommand.cs b/src/VisualStudio/Commands/WhereCommand.cs index 4ff6bb1..ad0f56c 100644 --- a/src/VisualStudio/Commands/WhereCommand.cs +++ b/src/VisualStudio/Commands/WhereCommand.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class WhereCommand : Command { diff --git a/src/VisualStudio/Commands/WhereCommandDescriptor.cs b/src/VisualStudio/Commands/WhereCommandDescriptor.cs index c3b7a83..2c37ce0 100644 --- a/src/VisualStudio/Commands/WhereCommandDescriptor.cs +++ b/src/VisualStudio/Commands/WhereCommandDescriptor.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class WhereCommandDescriptor : CommandDescriptor { diff --git a/src/VisualStudio/DefaultTextWriter.cs b/src/VisualStudio/DefaultTextWriter.cs index 137e421..4cb4afc 100644 --- a/src/VisualStudio/DefaultTextWriter.cs +++ b/src/VisualStudio/DefaultTextWriter.cs @@ -2,7 +2,7 @@ using System.IO; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class DefaultTextWriter : ITextWriter { diff --git a/src/VisualStudio/Docs/modify.md b/src/VisualStudio/Docs/modify.md index a3dd302..068c5ce 100644 --- a/src/VisualStudio/Docs/modify.md +++ b/src/VisualStudio/Docs/modify.md @@ -10,5 +10,10 @@ Examples: + ``` +# Add .NET Core Workload to installed Visual Studio Preview +> vs modify preview +core ``` + + diff --git a/src/VisualStudio/Docs/README.md b/src/VisualStudio/Docs/readme.md similarity index 100% rename from src/VisualStudio/Docs/README.md rename to src/VisualStudio/Docs/readme.md diff --git a/src/VisualStudio/ErrorCodes.cs b/src/VisualStudio/ErrorCodes.cs index fad9af8..d361f3b 100644 --- a/src/VisualStudio/ErrorCodes.cs +++ b/src/VisualStudio/ErrorCodes.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { public struct ErrorCodes { diff --git a/src/VisualStudio/IOptions.cs b/src/VisualStudio/IOptions.cs index 935cfc3..b6c2a23 100644 --- a/src/VisualStudio/IOptions.cs +++ b/src/VisualStudio/IOptions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Mono.Options; -namespace VisualStudio +namespace Devlooped { interface IOptions { diff --git a/src/VisualStudio/ITextWriter.cs b/src/VisualStudio/ITextWriter.cs index 9435780..c2f2980 100644 --- a/src/VisualStudio/ITextWriter.cs +++ b/src/VisualStudio/ITextWriter.cs @@ -1,7 +1,7 @@ using System.Collections.Immutable; using Mono.Options; -namespace VisualStudio +namespace Devlooped { interface ITextWriter { diff --git a/src/VisualStudio/InstallerService.cs b/src/VisualStudio/InstallerService.cs index fd048b2..bcbf3e8 100644 --- a/src/VisualStudio/InstallerService.cs +++ b/src/VisualStudio/InstallerService.cs @@ -6,7 +6,7 @@ using System.Net.Http; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class InstallerService { diff --git a/src/VisualStudio/MarkdownOptionsTextWriter.cs b/src/VisualStudio/MarkdownOptionsTextWriter.cs index 760055c..9939f26 100644 --- a/src/VisualStudio/MarkdownOptionsTextWriter.cs +++ b/src/VisualStudio/MarkdownOptionsTextWriter.cs @@ -3,7 +3,7 @@ using System.Text; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class MarkdownOptionsTextWriter : ITextWriter { diff --git a/src/VisualStudio/OptionSet.cs b/src/VisualStudio/OptionSet.cs index c5cea4f..b980fc8 100644 --- a/src/VisualStudio/OptionSet.cs +++ b/src/VisualStudio/OptionSet.cs @@ -1,6 +1,6 @@ using Mono.Options; -namespace VisualStudio +namespace Devlooped { class OptionSet : OptionSet { diff --git a/src/VisualStudio/Options.cs b/src/VisualStudio/Options.cs index 7a285d7..12f24e1 100644 --- a/src/VisualStudio/Options.cs +++ b/src/VisualStudio/Options.cs @@ -3,7 +3,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class Options : IOptions { diff --git a/src/VisualStudio/Options/ChannelOption.cs b/src/VisualStudio/Options/ChannelOption.cs index d904594..2b5154d 100644 --- a/src/VisualStudio/Options/ChannelOption.cs +++ b/src/VisualStudio/Options/ChannelOption.cs @@ -2,7 +2,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class ChannelOption : OptionSet { diff --git a/src/VisualStudio/Options/ClientOptions.cs b/src/VisualStudio/Options/ClientOptions.cs index 1d0a64b..ac8c3d8 100644 --- a/src/VisualStudio/Options/ClientOptions.cs +++ b/src/VisualStudio/Options/ClientOptions.cs @@ -1,6 +1,6 @@ using Mono.Options; -namespace VisualStudio +namespace Devlooped { class ClientOptions : OptionSet { diff --git a/src/VisualStudio/Options/DebugOption.cs b/src/VisualStudio/Options/DebugOption.cs index 850fe58..e9f0f65 100644 --- a/src/VisualStudio/Options/DebugOption.cs +++ b/src/VisualStudio/Options/DebugOption.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class DebugOption : OptionSet { diff --git a/src/VisualStudio/Options/ExperimentalOption.cs b/src/VisualStudio/Options/ExperimentalOption.cs index 385bdc3..898ea05 100644 --- a/src/VisualStudio/Options/ExperimentalOption.cs +++ b/src/VisualStudio/Options/ExperimentalOption.cs @@ -2,7 +2,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class ExperimentalOption : OptionSet { diff --git a/src/VisualStudio/Options/FilterOption.cs b/src/VisualStudio/Options/FilterOption.cs index e8aa958..a8ff29d 100644 --- a/src/VisualStudio/Options/FilterOption.cs +++ b/src/VisualStudio/Options/FilterOption.cs @@ -1,6 +1,6 @@ using Mono.Options; -namespace VisualStudio +namespace Devlooped { class FilterOption : OptionSet { diff --git a/src/VisualStudio/Options/FirstOption.cs b/src/VisualStudio/Options/FirstOption.cs index 02f2d72..4a0cd26 100644 --- a/src/VisualStudio/Options/FirstOption.cs +++ b/src/VisualStudio/Options/FirstOption.cs @@ -1,7 +1,7 @@ using System; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class FirstOption : OptionSet { diff --git a/src/VisualStudio/Options/GlobalOption.cs b/src/VisualStudio/Options/GlobalOption.cs index f0f3813..7c89595 100644 --- a/src/VisualStudio/Options/GlobalOption.cs +++ b/src/VisualStudio/Options/GlobalOption.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class GlobalOption : OptionSet { diff --git a/src/VisualStudio/Options/HelpOption.cs b/src/VisualStudio/Options/HelpOption.cs index 837ebd2..9f8df60 100644 --- a/src/VisualStudio/Options/HelpOption.cs +++ b/src/VisualStudio/Options/HelpOption.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class HelpOption : OptionSet { diff --git a/src/VisualStudio/Options/ListOption.cs b/src/VisualStudio/Options/ListOption.cs index f718924..2410c2c 100644 --- a/src/VisualStudio/Options/ListOption.cs +++ b/src/VisualStudio/Options/ListOption.cs @@ -1,7 +1,7 @@ using System; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class ListOption : OptionSet { diff --git a/src/VisualStudio/Options/NicknameOption.cs b/src/VisualStudio/Options/NicknameOption.cs index 40c12ff..2d9b842 100644 --- a/src/VisualStudio/Options/NicknameOption.cs +++ b/src/VisualStudio/Options/NicknameOption.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class NicknameOption : OptionSet { diff --git a/src/VisualStudio/Options/SaveOption.cs b/src/VisualStudio/Options/SaveOption.cs index 836e472..03c0a08 100644 --- a/src/VisualStudio/Options/SaveOption.cs +++ b/src/VisualStudio/Options/SaveOption.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class SaveOption : OptionSet { diff --git a/src/VisualStudio/Options/SelectAllOption.cs b/src/VisualStudio/Options/SelectAllOption.cs index cfcf5ff..c4aa628 100644 --- a/src/VisualStudio/Options/SelectAllOption.cs +++ b/src/VisualStudio/Options/SelectAllOption.cs @@ -1,7 +1,7 @@ using System; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class SelectAllOption : OptionSet { diff --git a/src/VisualStudio/Options/SelectPropertyOption.cs b/src/VisualStudio/Options/SelectPropertyOption.cs index 2b2c10d..98e06ca 100644 --- a/src/VisualStudio/Options/SelectPropertyOption.cs +++ b/src/VisualStudio/Options/SelectPropertyOption.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { class SelectPropertyOption : OptionSet { diff --git a/src/VisualStudio/Options/SelfOption.cs b/src/VisualStudio/Options/SelfOption.cs index 1e21e53..773d323 100644 --- a/src/VisualStudio/Options/SelfOption.cs +++ b/src/VisualStudio/Options/SelfOption.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class SelfOption : OptionSet { diff --git a/src/VisualStudio/Options/SkuOption.cs b/src/VisualStudio/Options/SkuOption.cs index 20f1346..a82218b 100644 --- a/src/VisualStudio/Options/SkuOption.cs +++ b/src/VisualStudio/Options/SkuOption.cs @@ -2,7 +2,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { class SkuOption : OptionSet { @@ -32,15 +32,15 @@ protected override bool Parse(string argument, OptionContext c) Sku ParseSku(string sku) { if (sku.StartsWith("e", StringComparison.OrdinalIgnoreCase)) - return VisualStudio.Sku.Enterprise; + return Devlooped.Sku.Enterprise; else if (sku.StartsWith("p", StringComparison.OrdinalIgnoreCase)) - return VisualStudio.Sku.Professional; + return Devlooped.Sku.Professional; else if (sku.StartsWith("c", StringComparison.OrdinalIgnoreCase)) - return VisualStudio.Sku.Community; + return Devlooped.Sku.Community; else if (sku.StartsWith("b", StringComparison.OrdinalIgnoreCase)) - return VisualStudio.Sku.BuildTools; + return Devlooped.Sku.BuildTools; else if (sku.StartsWith("t", StringComparison.OrdinalIgnoreCase)) - return VisualStudio.Sku.TestAgent; + return Devlooped.Sku.TestAgent; else throw new OptionException($"Invalid SKU {sku}. Must be one of {string.Join(", ", Enum.GetNames(typeof(Sku)).Select(x => x.ToLowerInvariant()))}.", "sku"); } diff --git a/src/VisualStudio/Options/VersionOption.cs b/src/VisualStudio/Options/VersionOption.cs index 67a4863..9c053f5 100644 --- a/src/VisualStudio/Options/VersionOption.cs +++ b/src/VisualStudio/Options/VersionOption.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace VisualStudio +namespace Devlooped { class VersionOption : OptionSet { diff --git a/src/VisualStudio/Options/VisualStudioOptions.cs b/src/VisualStudio/Options/VisualStudioOptions.cs index ace7c58..7d6ae5d 100644 --- a/src/VisualStudio/Options/VisualStudioOptions.cs +++ b/src/VisualStudio/Options/VisualStudioOptions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Mono.Options; -namespace VisualStudio +namespace Devlooped { /// /// Provides visual studio selection options diff --git a/src/VisualStudio/Options/WorkloadOptions.cs b/src/VisualStudio/Options/WorkloadOptions.cs index e577ea8..0138ae3 100644 --- a/src/VisualStudio/Options/WorkloadOptions.cs +++ b/src/VisualStudio/Options/WorkloadOptions.cs @@ -4,7 +4,7 @@ using System.Linq; using Mono.Options; -namespace VisualStudio +namespace Devlooped { /// /// Provides shorthand notation for workload identifiers. diff --git a/src/VisualStudio/ProcessExtensions.cs b/src/VisualStudio/ProcessExtensions.cs index f49434e..d4c8836 100644 --- a/src/VisualStudio/ProcessExtensions.cs +++ b/src/VisualStudio/ProcessExtensions.cs @@ -1,9 +1,11 @@ -using System.Diagnostics; +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Management; -namespace VisualStudio +namespace Devlooped { static class ProcessExtensions { @@ -22,8 +24,12 @@ public static void Log(this ProcessStartInfo info, TextWriter output) static string Quote(string value) => value.Contains(' ') ? "\"" + value + "\"" : value; + [SuppressMessage("Design", "CA1416", Justification = "Checked at run-time.")] public static string GetCommandLine(this Process process) { + if (Environment.OSVersion.Platform != PlatformID.Win32NT) + throw new PlatformNotSupportedException("Can only run on Windows."); + try { using (var searcher = new ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + process.Id)) diff --git a/src/VisualStudio/Program.cs b/src/VisualStudio/Program.cs index 0fde6b5..42ccaf6 100644 --- a/src/VisualStudio/Program.cs +++ b/src/VisualStudio/Program.cs @@ -5,7 +5,7 @@ using System.Reflection; using System.Threading.Tasks; -namespace VisualStudio +namespace Devlooped { class Program { @@ -122,8 +122,9 @@ protected virtual void ShowExamples(string commandName) showLine = true; } - else if (showLine) + else if (showLine && !line.Trim().StartsWith("```")) { + // Don't render the code formatting block output.WriteLine(line); } } diff --git a/src/VisualStudio/ShowUsageException.cs b/src/VisualStudio/ShowUsageException.cs index 993d8e1..dc11bc6 100644 --- a/src/VisualStudio/ShowUsageException.cs +++ b/src/VisualStudio/ShowUsageException.cs @@ -1,6 +1,6 @@ using System; -namespace VisualStudio +namespace Devlooped { class ShowUsageException : Exception { diff --git a/src/VisualStudio/Sku.cs b/src/VisualStudio/Sku.cs index cd80cf4..ed8d1d0 100644 --- a/src/VisualStudio/Sku.cs +++ b/src/VisualStudio/Sku.cs @@ -1,4 +1,4 @@ -namespace VisualStudio +namespace Devlooped { public enum Sku { diff --git a/src/VisualStudio/ToolSettings.cs b/src/VisualStudio/ToolSettings.cs index 7c8f255..a612a64 100644 --- a/src/VisualStudio/ToolSettings.cs +++ b/src/VisualStudio/ToolSettings.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; -namespace VisualStudio +namespace Devlooped { public class ToolSettings { diff --git a/src/VisualStudio/VisualStudioInstanceExtensions.cs b/src/VisualStudio/VisualStudioInstanceExtensions.cs index 85406cb..3de7374 100644 --- a/src/VisualStudio/VisualStudioInstanceExtensions.cs +++ b/src/VisualStudio/VisualStudioInstanceExtensions.cs @@ -1,6 +1,6 @@ using System; using System.Linq; -using VisualStudio; +using Devlooped; namespace vswhere { diff --git a/src/VisualStudio/VisualStudioPredicateBuilder.cs b/src/VisualStudio/VisualStudioPredicateBuilder.cs index a4f4d18..18f40ff 100644 --- a/src/VisualStudio/VisualStudioPredicateBuilder.cs +++ b/src/VisualStudio/VisualStudioPredicateBuilder.cs @@ -4,7 +4,7 @@ using Microsoft.CodeAnalysis.Scripting; using vswhere; -namespace VisualStudio +namespace Devlooped { class VisualStudioPredicateBuilder { diff --git a/src/VisualStudio/WhereException.cs b/src/VisualStudio/WhereException.cs index 07277fa..fb4ba34 100644 --- a/src/VisualStudio/WhereException.cs +++ b/src/VisualStudio/WhereException.cs @@ -1,6 +1,6 @@ using System; -namespace VisualStudio +namespace Devlooped { class WhereException : Exception { diff --git a/src/VisualStudio/WhereService.cs b/src/VisualStudio/WhereService.cs index 2a2ea29..6627904 100644 --- a/src/VisualStudio/WhereService.cs +++ b/src/VisualStudio/WhereService.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using vswhere; -namespace VisualStudio +namespace Devlooped { class WhereService {