Skip to content

Updated Breaking Change Message #1467

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions powershell/resources/psruntime/MessageAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Message.ClientRuntime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
2 changes: 1 addition & 1 deletion powershell/resources/psruntime/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}'</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.AppComplianceAutomation.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a redundant '. Please fix them for the other modules as well.

</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Astro.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.MachineLearningServices.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ComputeFleet.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.AzureLargeInstance.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.CodeSigning.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ComputeSchedule.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"${$project.rootModuleName}") ? @"${$project.moduleName}" : @"${$project.rootModuleName}";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}''</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Loading
Loading