Skip to content

Commit 959ceee

Browse files
author
Klein Hu
committed
Write current module version to Verbose channel.
This information will help us debugging end user problems.
1 parent 189246a commit 959ceee

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

src/ResourceManager/MachineLearning/Commands.MachineLearning/Cmdlets/ExportWebServiceDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Microsoft.Azure.Commands.MachineLearning.Cmdlets
2727
WebServicesCmdletBase.CommandletSuffix,
2828
SupportsShouldProcess = true)]
2929
[OutputType(typeof(string))]
30-
public class ExportWebServiceDefinition : AzureRMCmdlet
30+
public class ExportWebServiceDefinition : WebServicesCmdletBase
3131
{
3232
private const string ExportToFileParamSet = "Export to file.";
3333
private const string ExportToStringParamSet = "Export to JSON string.";

src/ResourceManager/MachineLearning/Commands.MachineLearning/Cmdlets/ImportWebServiceDefinition.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.MachineLearning.Cmdlets
2323
{
2424
[Cmdlet(VerbsData.Import, WebServicesCmdletBase.CommandletSuffix)]
2525
[OutputType(typeof(WebService))]
26-
public class ImportWebServiceDefinition : AzureRMCmdlet
26+
public class ImportWebServiceDefinition : WebServicesCmdletBase
2727
{
2828
private const string ImportFromFileParamSet = "Import from JSON file.";
2929
private const string ImportFromStringParamSet = "Import from JSON string.";

src/ResourceManager/MachineLearning/Commands.MachineLearning/Cmdlets/WebServicesCmdletBase.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public WebServicesClient WebServicesClient
7171

7272
protected override void BeginProcessing()
7373
{
74+
var versionInfo = typeof(WebServicesCmdletBase).Assembly.GetName().Version;
75+
this.WriteVerbose(Resources.VersionInfo.FormatInvariant(versionInfo.ToString(3)));
76+
7477
try
7578
{
7679
if (this.cancellationSource == null)

src/ResourceManager/MachineLearning/Commands.MachineLearning/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/MachineLearning/Commands.MachineLearning/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,7 @@
135135
<data name="UpdateServiceWarning" xml:space="preserve">
136136
<value>Are you sure you want to update the machine learning web service "{0}" ?</value>
137137
</data>
138+
<data name="VersionInfo" xml:space="preserve">
139+
<value>Azure Machine Learning Module Version: "{0}"</value>
140+
</data>
138141
</root>

0 commit comments

Comments
 (0)