Skip to content
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
2 changes: 1 addition & 1 deletion packages/typespec-powershell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@
"PowerShell",
"Cmdlet"
]
}
}
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(@"") ? @"Az.AppComplianceAutomation" : @"";

//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.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(@"") ? @"Az.Astro" : @"";

//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(@"") ? @"Az.MachineLearningServices" : @"";

//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(@"") ? @"Az.ComputeFleet" : @"";

//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(@"") ? @"Az.AzureLargeInstance" : @"";

//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(@"") ? @"Az.CodeSigning" : @"";

//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(@"") ? @"Az.ComputeSchedule" : @"";

//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