@@ -79,6 +79,16 @@ public DateTime getInEffectByDate()
7979 * We get the cmdlet name from the passed in Type (it is expected to have the Cmdlet attribute decorated on the class)
8080 */
8181 public string GetBreakingChangeTextFromAttribute ( Type type , bool withCmdletName )
82+ {
83+ return GetBreakingChangeTextFromAttributeInternal ( type , withCmdletName , null ) ;
84+ }
85+
86+ internal string GetBreakingChangeTextFromAttribute ( Type type , bool withCmdletName , String moduleName )
87+ {
88+ return GetBreakingChangeTextFromAttributeInternal ( type , withCmdletName , moduleName ) ;
89+ }
90+
91+ private string GetBreakingChangeTextFromAttributeInternal ( Type type , bool withCmdletName , String moduleName )
8292 {
8393 StringBuilder breakingChangeMessage = new StringBuilder ( ) ;
8494
@@ -104,7 +114,14 @@ public string GetBreakingChangeTextFromAttribute(Type type, bool withCmdletName)
104114
105115 if ( ! string . IsNullOrWhiteSpace ( DeprecateByVersion ) )
106116 {
107- breakingChangeMessage . Append ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion , this . DeprecateByVersion ) ) ;
117+ if ( moduleName != null )
118+ {
119+ breakingChangeMessage . Append ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion2 , moduleName , this . DeprecateByVersion ) ) ;
120+ }
121+ else
122+ {
123+ breakingChangeMessage . Append ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion , this . DeprecateByVersion ) ) ;
124+ }
108125 }
109126
110127 if ( ! string . IsNullOrWhiteSpace ( OldWay ) && ! string . IsNullOrWhiteSpace ( NewWay ) )
@@ -123,6 +140,16 @@ public string GetBreakingChangeTextFromAttribute(Type type, bool withCmdletName)
123140 * We get the cmdlet name from the passed in Type (it is expected to have the Cmdlet attribute decorated on the class)
124141 * */
125142 public void PrintCustomAttributeInfo ( Type type , bool withCmdletName , Action < string > writeOutput )
143+ {
144+ PrintCustomAttributeInfoInternal ( type , withCmdletName , null , writeOutput ) ;
145+ }
146+
147+ internal void PrintCustomAttributeInfo ( Type type , bool withCmdletName , String moduleName , Action < string > writeOutput )
148+ {
149+ PrintCustomAttributeInfoInternal ( type , withCmdletName , moduleName , writeOutput ) ;
150+ }
151+
152+ private void PrintCustomAttributeInfoInternal ( Type type , bool withCmdletName , String moduleName , Action < string > writeOutput )
126153 {
127154 if ( ! withCmdletName )
128155 {
@@ -146,11 +173,18 @@ public void PrintCustomAttributeInfo(Type type, bool withCmdletName, Action<stri
146173 {
147174 writeOutput ( string . Format ( Resources . BreakingChangesAttributesInEffectByDateMessage , this . ChangeInEffectByDate . ToShortDateString ( ) ) ) ;
148175 }
149-
176+
150177 writeOutput ( string . Format ( Resources . BreakingChangesAttributesInEffectByAzVersion , this . DeprecateByAzVersion ) ) ;
151-
152- writeOutput ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion , this . DeprecateByVersion ) ) ;
153-
178+
179+ if ( moduleName != null )
180+ {
181+ writeOutput ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion2 , moduleName , this . DeprecateByVersion ) ) ;
182+ }
183+ else
184+ {
185+ writeOutput ( string . Format ( Resources . BreakingChangesAttributesInEffectByVersion , this . DeprecateByVersion ) ) ;
186+ }
187+
154188 if ( OldWay != null && NewWay != null )
155189 {
156190 writeOutput ( string . Format ( Resources . BreakingChangesAttributesUsageChangeMessageConsole , OldWay , NewWay ) ) ;
0 commit comments