Skip to content

final version #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected override string GetAttributeSpecificMessage()
//See if the type of the param is changing
if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterTypeName))
{
message.Append("\n" + string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType.FullName, NewParameterTypeName));
message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType.FullName, NewParameterTypeName));
}
return message.ToString();
}
Expand Down
6 changes: 4 additions & 2 deletions src/Common/CustomAttributes/GenericBreakingChangeAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ public string GetBreakingChangeTextFromAttribute(Type type, bool withCmdletName)
public void PrintCustomAttributeInfo(Type type, bool withCmdletName, Action<string> writeOutput)
{
if (!withCmdletName) {
if(!string.IsNullOrEmpty(GetAttributeSpecificMessage())){
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage()));
if (!GetAttributeSpecificMessage().StartsWith("\r\n"))
{
writeOutput("\r\n");
}
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage()));
} else
{
writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessageWithCmdletName, Utilities.GetNameFromCmdletType(type), GetAttributeSpecificMessage()));
Expand Down
20 changes: 11 additions & 9 deletions src/Common/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
- The parameter : '{0}' is becoming mandatory.</value>
</data>
<data name="BreakingChangeAttributeParameterReplaced" xml:space="preserve">
<value>
<value>
- The parameter : '{0}' is being replaced by parameter : '{1}'.</value>
</data>
<data name="BreakingChangeAttributeParameterReplacedMandatory" xml:space="preserve">
Expand Down Expand Up @@ -1686,8 +1686,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
- The following properties in the output type are being deprecated :</value>
</data>
<data name="BreakingChangesAttributesDeclarationMessage" xml:space="preserve">
<value>
{0}</value>
<value>{0}</value>
</data>
<data name="BreakingChangesAttributesDeclarationMessageWithCmdletName" xml:space="preserve">
<value>
Expand Down Expand Up @@ -1716,15 +1715,18 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessageConsole" xml:space="preserve">
<value>Cmdlet invocation changes :
Old Way : {0}
New Way : {1}</value>
<value>
Cmdlet invocation changes :
Old Way : {0}
New Way : {1}</value>
</data>
<data name="BreakingChangesAttributesCmdLetOutputTypeDeprecated" xml:space="preserve">
<value>The output type '{0}' is being deprecated without a replacement.</value>
<value>
The output type '{0}' is being deprecated without a replacement.</value>
</data>
<data name="BreakingChangeAttributeParameterTypeChange" xml:space="preserve">
<value>The type of the parameter is changing from '{0}' to '{1}'.</value>
<value>
The type of the parameter is changing from '{0}' to '{1}'.</value>
</data>
<data name="BreakingChangesAttributesFooterMessage" xml:space="preserve">
<value>
Expand All @@ -1733,4 +1735,4 @@ Note : Go to {0} for steps to suppress this breaking change warning, and other i
<data name="PreviewCmdletMessage" xml:space="preserve">
<value>This cmdlet is in preview. The functionality may not be available in the selected subscription.</value>
</data>
</root>
</root>