Skip to content

Commit 15a6f49

Browse files
greathongtuHongtu Zhang (FA Talent)
and
Hongtu Zhang (FA Talent)
authored
deprecate methods to ensure version as a must (#383)
Co-authored-by: Hongtu Zhang (FA Talent) <[email protected]>
1 parent dc4939e commit 15a6f49

4 files changed

+5
-1
lines changed

src/Common/CustomAttributes/CmdletDeprecationAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class CmdletDeprecationAttribute : GenericBreakingChangeAttribute
2828
{
2929
public string ReplacementCmdletName { get; set; }
3030

31+
[Obsolete("Please provide the deprecate version", false)]
3132
public CmdletDeprecationAttribute() :
3233
base(string.Empty)
3334
{

src/Common/CustomAttributes/CmdletOutputBreakingChangeAttribute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public class CmdletOutputBreakingChangeAttribute : GenericBreakingChangeAttribut
3535
public string[] DeprecatedOutputProperties { get; set; }
3636

3737
public string[] NewOutputProperties { get; set; }
38-
38+
39+
[Obsolete("Please provide the deprecate version", false)]
3940
public CmdletOutputBreakingChangeAttribute(Type deprecatedCmdletOutputTypeName) :
4041
base(string.Empty)
4142
{

src/Common/CustomAttributes/CmdletParameterBreakingChangeAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class CmdletParameterBreakingChangeAttribute : GenericBreakingChangeAttri
3838

3939
public String NewParameterTypeName { get; set; }
4040

41+
[Obsolete("Please provide the deprecate version", false)]
4142
public CmdletParameterBreakingChangeAttribute(string nameOfParameterChanging) :
4243
base(string.Empty)
4344
{

src/Common/CustomAttributes/GenericBreakingChangeAttribute.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class GenericBreakingChangeAttribute : System.Attribute
5151
//New way fo calling the cmdlet
5252
public string NewWay { get; set; }
5353

54+
[Obsolete("Please provide the deprecate version", false)]
5455
public GenericBreakingChangeAttribute(string message)
5556
{
5657
_message = message;

0 commit comments

Comments
 (0)