Skip to content

Commit 5c1fed5

Browse files
committed
Fix static analysis signature issues
1 parent f45b0ed commit 5c1fed5

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ApplicationTypeVersions/NewAzServiceFabricManagedClusterApplicationTypeVersion.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class NewAzServiceFabricManagedClustersApplicationTypeVersion : ManagedAp
5757
public string PackageUrl { get; set; }
5858

5959
[Parameter(Mandatory = false, ValueFromPipeline = true, HelpMessage = "Specify the tags as key/value pairs.")]
60-
public Hashtable Tags { get; set; }
60+
public Hashtable Tag { get; set; }
6161

6262
[Parameter(Mandatory = false, HelpMessage = "Continue without prompts")]
6363
public SwitchParameter Force { get; set; }
@@ -87,7 +87,7 @@ public override void ExecuteCmdlet()
8787
location: cluster.Location,
8888
packageUrl: this.PackageUrl,
8989
force: this.Force.IsPresent,
90-
tags: this.Tags);
90+
tags: this.Tag);
9191
WriteObject(new PSManagedApplicationTypeVersion(managedAppTypeVersion), false);
9292
}
9393
}

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ApplicationTypeVersions/SetAzServiceFabricManagedClusterApplicationTypeVersion.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class SetAzServiceFabricManagedClustersApplicationTypeVersion : ManagedAp
6969
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByResourceGroup, HelpMessage = "Specify the tags as key/value pairs.")]
7070
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByResourceId, HelpMessage = "Specify the tags as key/value pairs.")]
7171
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByInputObject, HelpMessage = "Specify the tags as key/value pairs.")]
72-
public Hashtable Tags { get; set; }
72+
public Hashtable Tag { get; set; }
7373

7474
[Parameter(Mandatory = true, ParameterSetName = ByResourceId, ValueFromPipelineByPropertyName = true,
7575
HelpMessage = "Arm ResourceId of the managed application type version.")]
@@ -154,9 +154,9 @@ private ApplicationTypeVersionResource GetUpdatedAppTypeVersionParams(Applicatio
154154
{
155155
currentAppTypeVersion.AppPackageUrl = this.PackageUrl;
156156
}
157-
if (this.IsParameterBound(c => c.Tags))
157+
if (this.IsParameterBound(c => c.Tag))
158158
{
159-
currentAppTypeVersion.Tags = this.Tags?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
159+
currentAppTypeVersion.Tags = this.Tag?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
160160
}
161161

162162
return currentAppTypeVersion;

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ApplicationTypes/NewAzServiceFabricManagedClusterApplicationType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class NewAzServiceFabricManagedClusterApplicationType : ManagedApplicatio
4646
public string Name { get; set; }
4747

4848
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Specify the tags as key/value pairs.")]
49-
public Hashtable Tags { get; set; }
49+
public Hashtable Tag { get; set; }
5050
#endregion
5151

5252
public override void ExecuteCmdlet()
@@ -63,7 +63,7 @@ public override void ExecuteCmdlet()
6363
}
6464
else
6565
{
66-
var appType = CreateManagedApplicationType(this.Name, cluster.Location, this.Tags);
66+
var appType = CreateManagedApplicationType(this.Name, cluster.Location, this.Tag);
6767
WriteObject(new PSManagedApplicationType(appType), false);
6868
}
6969
}

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/ApplicationTypes/SetAzServiceFabricManagedClusterApplicationType.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class SetAzServiceFabricManagedClusterApplicationType : ManagedApplicatio
5353
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByResourceGroup, HelpMessage = "Specify the tags as key/value pairs.")]
5454
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByInputObject, HelpMessage = "Specify the tags as key/value pairs.")]
5555
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ByResourceId, HelpMessage = "Specify the tags as key/value pairs.")]
56-
public Hashtable Tags { get; set; }
56+
public Hashtable Tag { get; set; }
5757

5858
[Parameter(Mandatory = true, ParameterSetName = ByResourceId, ValueFromPipelineByPropertyName = true,
5959
HelpMessage = "Arm ResourceId of the managed application type.")]
@@ -130,8 +130,8 @@ private ApplicationTypeResource GetUpdatedAppTypeParams(ApplicationTypeResource
130130
}
131131

132132

133-
if (this.IsParameterBound(c => c.Tags)) {
134-
currentAppType.Tags = this.Tags?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
133+
if (this.IsParameterBound(c => c.Tag)) {
134+
currentAppType.Tags = this.Tag?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
135135
}
136136

137137
return currentAppType;

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/Services/NewAzServiceFabricManagedClusterService.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ public class NewAzServiceFabricManagedClusterService : ManagedApplicationCmdletB
344344
public ServicePackageActivationModeEnum ServicePackageActivationMode { get; set; }
345345

346346
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Specify the tags as key/value pairs.")]
347-
public Hashtable Tags { get; set; }
347+
public Hashtable Tag { get; set; }
348348

349349
[Parameter(Mandatory = false, HelpMessage = "Continue without prompts")]
350350
public SwitchParameter Force { get; set; }
@@ -406,7 +406,7 @@ public class NewAzServiceFabricManagedClusterService : ManagedApplicationCmdletB
406406
HelpMessage = "Indicates that the service uses the named partition scheme. Services using this model usually have data that can be bucketed, within a bounded set. Some common examples of data fields used as named partition keys would be regions, postal codes, customer groups, or other business boundaries.")]
407407
[Parameter(Mandatory = true, ParameterSetName = StatefulNamed,
408408
HelpMessage = "Indicates that the service uses the named partition scheme. Services using this model usually have data that can be bucketed, within a bounded set. Some common examples of data fields used as named partition keys would be regions, postal codes, customer groups, or other business boundaries.")]
409-
public string[] PartitionNames { get; set; }
409+
public string[] PartitionName { get; set; }
410410
#endregion
411411

412412
#endregion
@@ -477,7 +477,7 @@ private ServiceResource GetNewServiceParameters(string location)
477477
{
478478
ServiceResource service = new ServiceResource()
479479
{
480-
Tags = this.Tags?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string),
480+
Tags = this.Tag?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string),
481481
Location = location,
482482
Properties = new ServiceResourceProperties()
483483
};
@@ -599,7 +599,7 @@ private Partition SetPartitionDescription()
599599
return new UniformInt64RangePartitionScheme(this.PartitionCount, this.LowKey, this.HighKey);
600600
case StatelessNamed:
601601
case StatefulNamed:
602-
return new NamedPartitionScheme(this.PartitionNames);
602+
return new NamedPartitionScheme(this.PartitionName);
603603
default:
604604
throw new PSArgumentException("Invalid ParameterSetName");
605605
}

src/ServiceFabric/ServiceFabric/Commands/ManagedClusters/Services/SetAzServiceFabricManagedClusterService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public class SetAzServiceFabricManagedClusterService : ManagedApplicationCmdletB
309309
public ServicePackageActivationModeEnum ServicePackageActivationMode { get; set; }
310310

311311
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "Specify the tags as key/value pairs.")]
312-
public Hashtable Tags { get; set; }
312+
public Hashtable Tag { get; set; }
313313

314314
[Parameter(Mandatory = false, HelpMessage = "Continue without prompts")]
315315
public SwitchParameter Force { get; set; }
@@ -386,9 +386,9 @@ private ServiceResource GetUpdatedServiceParams(ServiceResource inputObject = nu
386386

387387
WriteVerbose($"Updating managed service '{this.Name}.'");
388388

389-
if (this.IsParameterBound(c => c.Tags))
389+
if (this.IsParameterBound(c => c.Tag))
390390
{
391-
currentService.Tags = this.Tags?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
391+
currentService.Tags = this.Tag?.Cast<DictionaryEntry>().ToDictionary(d => d.Key as string, d => d.Value as string);
392392
}
393393
ServiceResourceProperties properties = currentService.Properties;
394394

tools/StaticAnalysis/Exceptions/Az.ServiceFabric/SignatureIssues.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
"Microsoft.Azure.PowerShell.Cmdlets.ServiceFabric.dll","Microsoft.Azure.Commands.ServiceFabric.Commands.SetAzureRmServiceFabricSetting","Set-AzServiceFabricSetting","1","8510","Cmdlet 'Set-AzServiceFabricSetting' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."
88
"Microsoft.Azure.PowerShell.Cmdlets.ServiceFabric.dll","Microsoft.Azure.Commands.ServiceFabric.Commands.SetAzureRmServiceFabricUpgradeType","Set-AzServiceFabricUpgradeType","1","8510","Cmdlet 'Set-AzServiceFabricUpgradeType' has multiple parameter sets, but no defined default parameter set.","Define a default parameter set in the cmdlet attribute."
99
"Microsoft.Azure.PowerShell.Cmdlets.ServiceFabric.dll","Microsoft.Azure.Commands.ServiceFabric.Commands.NewAzServiceFabricService","New-AzServiceFabricService","1","8410","Parameter Stateless of cmdlet New-AzServiceFabricService does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
10+
"Microsoft.Azure.PowerShell.Cmdlets.ServiceFabric.dll","Microsoft.Azure.Commands.ServiceFabric.Commands.SetAzServiceFabricManagedClusterService","Set-AzServiceFabricManagedClusterService","1","8410","Parameter Stateless of cmdlet Set-AzServiceFabricManagedClusterService does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."
11+
"Microsoft.Azure.PowerShell.Cmdlets.ServiceFabric.dll","Microsoft.Azure.Commands.ServiceFabric.Commands.NewAzServiceFabricManagedClusterService","New-AzServiceFabricManagedClusterService","1","8410","Parameter Stateless of cmdlet New-AzServiceFabricManagedClusterService does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name."

0 commit comments

Comments
 (0)