Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/Cli/dotnet/LaunchSettings/ILaunchSettingsProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Text.Json;
using Microsoft.DotNet.Cli.Utils;

namespace Microsoft.DotNet.LaunchSettings
{
internal interface ILaunchSettingsProvider
{
LaunchSettingsApplyResult TryGetLaunchSettings(JsonElement model);
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.DotNet.Tools.Run.LaunchSettings
namespace Microsoft.DotNet.LaunchSettings
{
public class LaunchSettingsApplyResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Text.Json;
using Microsoft.DotNet.Cli.Utils;

namespace Microsoft.DotNet.Tools.Run.LaunchSettings
namespace Microsoft.DotNet.LaunchSettings
{
internal class LaunchSettingsManager
{
Expand Down
145 changes: 145 additions & 0 deletions src/Cli/dotnet/LaunchSettings/LocalizableStrings.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>

There are any number of "resheader" rows that contain simple
name/value pairs.

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="LaunchProfileIsNotAJsonObject" xml:space="preserve">
<value>A profile with the specified name could not be found or is not a valid JSON object.</value>
</data>
<data name="LaunchProfileHandlerCannotBeLocated" xml:space="preserve">
<value>The launch profile type '{0}' is not supported.</value>
</data>
<data name="UsableLaunchProfileCannotBeLocated" xml:space="preserve">
<value>A usable launch profile could not be located.</value>
</data>
<data name="LaunchProfilesCollectionIsNotAJsonObject" xml:space="preserve">
<value>The 'profiles' property of the launch settings document is not a JSON object.</value>
</data>
<data name="DeserializationExceptionMessage" xml:space="preserve">
<value>An error was encountered when reading launchSettings.json.
{0}</value>
</data>
<data name="CouldNotConvertToBoolean" xml:space="preserve">
<value>Could not convert the value of property '{0}' to a boolean.</value>
</data>
<data name="CouldNotConvertToString" xml:space="preserve">
<value>Could not convert the value of property '{0}' to a string.</value>
</data>
<data name="ValueMustBeAnObject" xml:space="preserve">
<value>The property '{0}' must be an object if it is specified.</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,35 @@
using System;
using System.Collections.Generic;

namespace Microsoft.DotNet.Tools.Run.LaunchSettings
namespace Microsoft.DotNet.LaunchSettings
{
public class ProjectLaunchSettingsModel
{
/// <summary>
/// The arguments to pass to the target being run.
/// </summary>
public string CommandLineArgs { get; set; }

/// <summary>
/// Whether or not to launched a browser.
/// </summary>
public bool LaunchBrowser { get; set; }

/// <summary>
/// The relative URL to launch in the browser.
/// </summary>
public string LaunchUrl { get; set; }

/// <summary>
/// A semi-colon delimited list of URL(s) to configure for the web server.
/// </summary>
public string ApplicationUrl { get; set; }

public string DotNetRunMessages { get; set; }

/// <summary>
/// Environment variables to set.
/// </summary>
public Dictionary<string, string> EnvironmentVariables { get; } = new Dictionary<string, string>(StringComparer.Ordinal);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System;
using System.Text.Json;

namespace Microsoft.DotNet.Tools.Run.LaunchSettings
namespace Microsoft.DotNet.LaunchSettings
{
internal class ProjectLaunchSettingsProvider : ILaunchSettingsProvider
{
Expand Down
49 changes: 49 additions & 0 deletions src/Cli/dotnet/LaunchSettings/xlf/LocalizableStrings.cs.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CouldNotConvertToBoolean">
<source>Could not convert the value of property '{0}' to a boolean.</source>
<target state="translated">Hodnotu vlastnosti {0} nejde převést na logickou hodnotu.</target>
<note />
</trans-unit>
<trans-unit id="CouldNotConvertToString">
<source>Could not convert the value of property '{0}' to a string.</source>
<target state="translated">Hodnotu vlastnosti {0} nejde převést na řetězec.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source>
<target state="translated">Profil se zadaným názvem se nenašel nebo nepředstavuje platný objekt JSON.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated">
<source>The launch profile type '{0}' is not supported.</source>
<target state="translated">Typ profilu spuštění {0} se nepodporuje.</target>
<note />
</trans-unit>
<trans-unit id="UsableLaunchProfileCannotBeLocated">
<source>A usable launch profile could not be located.</source>
<target state="translated">Nenašel se použitelný profil spuštění.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfilesCollectionIsNotAJsonObject">
<source>The 'profiles' property of the launch settings document is not a JSON object.</source>
<target state="translated">Vlastnost profiles v dokumentu nastavení spuštění není objektem JSON.</target>
<note />
</trans-unit>
<trans-unit id="DeserializationExceptionMessage">
<source>An error was encountered when reading launchSettings.json.
{0}</source>
<target state="translated">Při načítání launchSettings.json došlo k chybě.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ValueMustBeAnObject">
<source>The property '{0}' must be an object if it is specified.</source>
<target state="translated">Vlastnost {0} musí být objektem, pokud je zadána.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
49 changes: 49 additions & 0 deletions src/Cli/dotnet/LaunchSettings/xlf/LocalizableStrings.de.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CouldNotConvertToBoolean">
<source>Could not convert the value of property '{0}' to a boolean.</source>
<target state="translated">Der Wert der Eigenschaft "{0}" konnte nicht in einen booleschen Wert konvertiert werden.</target>
<note />
</trans-unit>
<trans-unit id="CouldNotConvertToString">
<source>Could not convert the value of property '{0}' to a string.</source>
<target state="translated">Der Wert der Eigenschaft "{0}" konnte nicht in eine Zeichenfolge konvertiert werden.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source>
<target state="translated">Ein Profil mit dem angegebenen Namen wurde nicht gefunden oder ist kein gültiges JSON-Objekt.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated">
<source>The launch profile type '{0}' is not supported.</source>
<target state="translated">Der Startprofiltyp "{0}" wird nicht unterstützt.</target>
<note />
</trans-unit>
<trans-unit id="UsableLaunchProfileCannotBeLocated">
<source>A usable launch profile could not be located.</source>
<target state="translated">Es wurde kein verwendbares Startprofil gefunden.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfilesCollectionIsNotAJsonObject">
<source>The 'profiles' property of the launch settings document is not a JSON object.</source>
<target state="translated">Die Eigenschaft "Profile" des Starteigenschaftendokuments ist kein JSON-Objekt.</target>
<note />
</trans-unit>
<trans-unit id="DeserializationExceptionMessage">
<source>An error was encountered when reading launchSettings.json.
{0}</source>
<target state="translated">Beim Lesen von "launchSettings.json" ist ein Fehler aufgetreten.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ValueMustBeAnObject">
<source>The property '{0}' must be an object if it is specified.</source>
<target state="translated">Die Eigenschaft "{0}" muss ein Objekt sein, sofern angegeben.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
49 changes: 49 additions & 0 deletions src/Cli/dotnet/LaunchSettings/xlf/LocalizableStrings.es.xlf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CouldNotConvertToBoolean">
<source>Could not convert the value of property '{0}' to a boolean.</source>
<target state="translated">No se pudo convertir el valor de la propiedad "{0}" en un booleano.</target>
<note />
</trans-unit>
<trans-unit id="CouldNotConvertToString">
<source>Could not convert the value of property '{0}' to a string.</source>
<target state="translated">No se pudo convertir el valor de la propiedad "{0}" en una cadena.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileIsNotAJsonObject">
<source>A profile with the specified name could not be found or is not a valid JSON object.</source>
<target state="translated">No se ha encontrado ningún perfil con el nombre especificado o el que se ha encontrado no es un objeto JSON válido.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfileHandlerCannotBeLocated">
<source>The launch profile type '{0}' is not supported.</source>
<target state="translated">No se admite el tipo de perfil de inicio "{0}".</target>
<note />
</trans-unit>
<trans-unit id="UsableLaunchProfileCannotBeLocated">
<source>A usable launch profile could not be located.</source>
<target state="translated">No se ha podido encontrar un perfil de inicio que se pueda usar.</target>
<note />
</trans-unit>
<trans-unit id="LaunchProfilesCollectionIsNotAJsonObject">
<source>The 'profiles' property of the launch settings document is not a JSON object.</source>
<target state="translated">La propiedad "profiles" del documento de configuración de inicio no es un objeto JSON.</target>
<note />
</trans-unit>
<trans-unit id="DeserializationExceptionMessage">
<source>An error was encountered when reading launchSettings.json.
{0}</source>
<target state="translated">Se produjo un error al leer launchSettings.json.
{0}</target>
<note />
</trans-unit>
<trans-unit id="ValueMustBeAnObject">
<source>The property '{0}' must be an object if it is specified.</source>
<target state="translated">La propiedad "{0}" debe ser un objeto si se especifica.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
Loading