Skip to content

Commit

Permalink
IDE0028 Collection initialization can be simplified.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnmbond committed Nov 18, 2024
1 parent e4c5ff9 commit a28b16f
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions Meraki.Api.NewTest/MerakiClientUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ protected static NetworkCreationRequest GetValidNetworkCreationRequest(string ne
Name = networkName,
Notes = "Test notes for unit test network.",
TimeZone = "Europe/London",
ProductTypes = new() {
ProductTypes = [
ProductType.Appliance,
ProductType.Camera,
ProductType.CellularGateway,
ProductType.Switch,
ProductType.Wireless },
Tags = new() { "TestTag1", "TestTag2", "TestTag3" }
ProductType.Wireless ],
Tags = ["TestTag1", "TestTag2", "TestTag3"]
};

protected async Task<Network> CreateValidNetworkAsync(string networkName)
Expand Down
4 changes: 2 additions & 2 deletions Meraki.Api.NewTest/WebHookTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ await TestMerakiClient
Body = """
{"event_type":"{{alertTypeId}}","client_payload":{"text":"{{alertData}}"}}
""",
Headers = new(),
Headers = [],
};

var testCreateWebhookPayloadTemplate = await TestMerakiClient
Expand Down Expand Up @@ -302,7 +302,7 @@ await TestMerakiClient
Body = """
{"event_type":"{{alertTypeId}}","client_payload":{"text":"{{alertData}}"}}
""",
Headers = new(),
Headers = [],
};

var testCreateWebhookPayloadTemplate = await TestMerakiClient
Expand Down
4 changes: 2 additions & 2 deletions Meraki.Api/Data/BulkDevicesUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ public class BulkDevicesUpdate
/// </summary>
[ApiAccess(ApiAccess.Update)]
[DataMember(Name = "serials")]
public List<string> Serials { get; set; } = new();
public List<string> Serials { get; set; } = [];

/// <summary>
/// An array of details
/// </summary>
[ApiAccess(ApiAccess.Update)]
[DataMember(Name = "details")]
public List<BulkDevicesUpdateDetail> Details { get; set; } = new();
public List<BulkDevicesUpdateDetail> Details { get; set; } = [];

}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/BulkUpdatedDevices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public class BulkUpdatedDevices
/// </summary>
[ApiAccess(ApiAccess.Update)]
[DataMember(Name = "serials")]
public List<string> Serials { get; set; } = new();
public List<string> Serials { get; set; } = [];

}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/CameraBoundariesAreasBoundaries.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ public class CameraBoundariesAreasBoundaries
/// </summary>
[ApiAccess(ApiAccess.ReadWrite)]
[DataMember(Name = "vertices")]
public List<CameraBoundariesAreasBoundariesVertex> Vertices { get; set; } = new();
public List<CameraBoundariesAreasBoundariesVertex> Vertices { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public class EsimsServiceProvidersAccountsCommunicationPlansItem
/// </summary>
[ApiAccess(ApiAccess.ReadWrite)]
[DataMember(Name = "apns")]
public List<EsimsServiceProvidersAccountsCommunicationPlansItemApn> Apns { get; set; } = new();
public List<EsimsServiceProvidersAccountsCommunicationPlansItemApn> Apns { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/EsimsServiceProvidersAccountsRatePlans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ public class EsimsServiceProvidersAccountsRatePlans
/// List of ESIMs Service Provider Accounts Rate Plans
/// </summary>
[ApiAccess(ApiAccess.ReadWrite)]
public override List<EsimsServiceProvidersAccountsRatePlansItem> Items { get; set; } = new();
public override List<EsimsServiceProvidersAccountsRatePlansItem> Items { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LiveToolPingCableTestCreate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class LiveToolsCableTestCreate
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "ports")]
public List<string> Ports { get; set; } = new();
public List<string> Ports { get; set; } = [];

/// <summary>
/// Details for the callback. Please include either an httpServerId OR url and sharedSecret
Expand Down
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LiveToolPingCableTestRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ public class LiveToolsCableTestRequest
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "ports")]
public List<string> Ports { get; set; } = new();
public List<string> Ports { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LiveToolPingCableTestResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ public class LiveToolsCableTestResult
/// Results of the cable test request, one for each requested port.
/// </summary>
[DataMember(Name = "results")]
public List<LiveToolsCableTestResultResult> Results { get; set; } = new();
public List<LiveToolsCableTestResultResult> Results { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LiveToolPingCableTestResultResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ public class LiveToolsCableTestResultResult
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "pairs")]
public List<LiveToolsCableTestResultResultPair> Pairs { get; set; } = new();
public List<LiveToolsCableTestResultResultPair> Pairs { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LiveToolsArpTableResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ public class LiveToolsArpTableResult
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "entries")]
public List<LiveToolsArpTableResultTableEntry> Entries { get; set; } = new();
public List<LiveToolsArpTableResultTableEntry> Entries { get; set; } = [];
}
2 changes: 1 addition & 1 deletion Meraki.Api/Data/LldpCdp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ public class LldpCdp
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "ports")]
public Dictionary<string, LldpCdpPort> Ports { get; set; } = new();
public Dictionary<string, LldpCdpPort> Ports { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ public class OrganizationAssuranceAlertsOverviewByNetwork
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "items")]
public List<OrganizationAssuranceAlertsOverviewByNetworkItem> Items { get; set; } = new();
public List<OrganizationAssuranceAlertsOverviewByNetworkItem> Items { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ public class OrganizationAssuranceAlertsOverviewByType
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "items")]
public List<OrganizationAssuranceAlertsOverviewByTypeItem> Items { get; set; } = new();
public List<OrganizationAssuranceAlertsOverviewByTypeItem> Items { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class OrganizationAssuranceAlertsOverviewCounts
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "bySeverity")]
public List<OrganizationAssuranceAlertsOverviewCountsBySeverity> BySeverity { get; set; } = new();
public List<OrganizationAssuranceAlertsOverviewCountsBySeverity> BySeverity { get; set; } = [];

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ public class OrganizationAssuranceAlertsOverviewHistorical
/// </summary>
[ApiAccess(ApiAccess.Read)]
[DataMember(Name = "items")]
public List<OrganizationAssuranceAlertsOverviewHistoricalItem> Items { get; set; } = new();
public List<OrganizationAssuranceAlertsOverviewHistoricalItem> Items { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ public class OrganizationCellularGatewayEsimSwapCreateRequest
/// </summary>
[ApiAccess(ApiAccess.ReadWrite)]
[DataMember(Name = "swaps")]
public List<OrganizationCellularGatewayEsimSwap> Swaps { get; set; } = new();
public List<OrganizationCellularGatewayEsimSwap> Swaps { get; set; } = [];
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ public class WanTrafficUplinkPreferencesUpdateRequest
/// </summary>
[ApiAccess(ApiAccess.ReadUpdate)]
[DataMember(Name = "wanTrafficUplinkPreferences")]
public List<WanTrafficUplinkPreference> WanTrafficUplinkPreferences { get; set; } = new();
public List<WanTrafficUplinkPreference> WanTrafficUplinkPreferences { get; set; } = [];
}

0 comments on commit a28b16f

Please sign in to comment.