Skip to content

Commit 76473e7

Browse files
authored
final version (#216)
1 parent 0286cd8 commit 76473e7

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

src/Common/CustomAttributes/CmdletParameterBreakingChangeAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected override string GetAttributeSpecificMessage()
8383
//See if the type of the param is changing
8484
if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterTypeName))
8585
{
86-
message.Append("\n" + string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType.FullName, NewParameterTypeName));
86+
message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType.FullName, NewParameterTypeName));
8787
}
8888
return message.ToString();
8989
}

src/Common/CustomAttributes/GenericBreakingChangeAttribute.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ public string GetBreakingChangeTextFromAttribute(Type type, bool withCmdletName)
129129
public void PrintCustomAttributeInfo(Type type, bool withCmdletName, Action<string> writeOutput)
130130
{
131131
if (!withCmdletName) {
132-
if(!string.IsNullOrEmpty(GetAttributeSpecificMessage())){
133-
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage()));
132+
if (!GetAttributeSpecificMessage().StartsWith("\r\n"))
133+
{
134+
writeOutput("\r\n");
134135
}
136+
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage()));
135137
} else
136138
{
137139
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessageWithCmdletName, Utilities.GetNameFromCmdletType(type), GetAttributeSpecificMessage()));

src/Common/Properties/Resources.resx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1652,7 +1652,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
16521652
- The parameter : '{0}' is becoming mandatory.</value>
16531653
</data>
16541654
<data name="BreakingChangeAttributeParameterReplaced" xml:space="preserve">
1655-
<value>
1655+
<value>
16561656
- The parameter : '{0}' is being replaced by parameter : '{1}'.</value>
16571657
</data>
16581658
<data name="BreakingChangeAttributeParameterReplacedMandatory" xml:space="preserve">
@@ -1686,8 +1686,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
16861686
- The following properties in the output type are being deprecated :</value>
16871687
</data>
16881688
<data name="BreakingChangesAttributesDeclarationMessage" xml:space="preserve">
1689-
<value>
1690-
{0}</value>
1689+
<value>{0}</value>
16911690
</data>
16921691
<data name="BreakingChangesAttributesDeclarationMessageWithCmdletName" xml:space="preserve">
16931692
<value>
@@ -1716,15 +1715,18 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
17161715
</value>
17171716
</data>
17181717
<data name="BreakingChangesAttributesUsageChangeMessageConsole" xml:space="preserve">
1719-
<value>Cmdlet invocation changes :
1720-
Old Way : {0}
1721-
New Way : {1}</value>
1718+
<value>
1719+
Cmdlet invocation changes :
1720+
Old Way : {0}
1721+
New Way : {1}</value>
17221722
</data>
17231723
<data name="BreakingChangesAttributesCmdLetOutputTypeDeprecated" xml:space="preserve">
1724-
<value>The output type '{0}' is being deprecated without a replacement.</value>
1724+
<value>
1725+
The output type '{0}' is being deprecated without a replacement.</value>
17251726
</data>
17261727
<data name="BreakingChangeAttributeParameterTypeChange" xml:space="preserve">
1727-
<value>The type of the parameter is changing from '{0}' to '{1}'.</value>
1728+
<value>
1729+
The type of the parameter is changing from '{0}' to '{1}'.</value>
17281730
</data>
17291731
<data name="BreakingChangesAttributesFooterMessage" xml:space="preserve">
17301732
<value>
@@ -1733,4 +1735,4 @@ Note : Go to {0} for steps to suppress this breaking change warning, and other i
17331735
<data name="PreviewCmdletMessage" xml:space="preserve">
17341736
<value>This cmdlet is in preview. The functionality may not be available in the selected subscription.</value>
17351737
</data>
1736-
</root>
1738+
</root>

0 commit comments

Comments
 (0)