Skip to content

Commit cf2c19d

Browse files
fanglfangl
authored andcommitted
Update Remove cmdlets and changelog
1 parent 9549223 commit cf2c19d

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

src/ResourceManager/Sql/ChangeLog.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
* Overview of change #1
22-
- Add Data Sync PowerShell Cmdlets to AzureRM.Sql
21+
* Add Data Sync PowerShell Cmdlets to AzureRM.Sql
2322

2423
## Version 3.1.0
2524
* Restore-AzureRmSqlDatabase: Update documentation examples

src/ResourceManager/Sql/Commands.Sql/Data Sync/Cmdlet/RemoveAzureSqlSyncAgent.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ protected override IEnumerable<AzureSqlSyncAgentModel> PersistChanges(IEnumerabl
8181
/// </summary>
8282
public override void ExecuteCmdlet()
8383
{
84-
if (!Force.IsPresent && !ShouldProcess(
85-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncAgentDescription, this.Name),
86-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncAgentWarning, this.Name, this.ResourceGroupName),
87-
Microsoft.Azure.Commands.Sql.Properties.Resources.ShouldProcessCaption))
84+
if (ShouldProcess(this.Name))
8885
{
89-
return;
86+
if (Force || ShouldContinue(
87+
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncAgentWarning, this.Name, this.ResourceGroupName), ""))
88+
{
89+
base.ExecuteCmdlet();
90+
}
9091
}
91-
base.ExecuteCmdlet();
9292
}
9393
}
9494
}

src/ResourceManager/Sql/Commands.Sql/Data Sync/Cmdlet/RemoveAzureSqlSyncGroup.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ protected override IEnumerable<AzureSqlSyncGroupModel> PersistChanges(IEnumerabl
8181
/// </summary>
8282
public override void ExecuteCmdlet()
8383
{
84-
if (!Force.IsPresent && !ShouldProcess(
85-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncGroupDescription, this.Name),
86-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncGroupWarning, this.Name, this.DatabaseName),
87-
Microsoft.Azure.Commands.Sql.Properties.Resources.ShouldProcessCaption))
84+
if (ShouldProcess(this.Name))
8885
{
89-
return;
86+
if (Force || ShouldContinue(
87+
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncGroupWarning, this.Name, this.DatabaseName), ""))
88+
{
89+
base.ExecuteCmdlet();
90+
}
9091
}
91-
base.ExecuteCmdlet();
9292
}
9393
}
9494
}

src/ResourceManager/Sql/Commands.Sql/Data Sync/Cmdlet/RemoveAzureSqlSyncMember.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ protected override IEnumerable<AzureSqlSyncMemberModel> PersistChanges(IEnumerab
7979
/// </summary>
8080
public override void ExecuteCmdlet()
8181
{
82-
if (!Force.IsPresent && !ShouldProcess(
83-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncMemberDescription, this.Name),
84-
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncMemberWarning, this.Name, this.SyncGroupName),
85-
Microsoft.Azure.Commands.Sql.Properties.Resources.ShouldProcessCaption))
82+
if (ShouldProcess(this.Name))
8683
{
87-
return;
84+
if (Force || ShouldContinue(
85+
string.Format(CultureInfo.InvariantCulture, Microsoft.Azure.Commands.Sql.Properties.Resources.RemoveAzureSqlSyncMemberWarning, this.Name, this.SyncGroupName), ""))
86+
{
87+
base.ExecuteCmdlet();
88+
}
8889
}
89-
base.ExecuteCmdlet();
9090
}
9191
}
9292
}

0 commit comments

Comments
 (0)