Skip to content

Commit

Permalink
Merge pull request #230 from pticostaricags/development
Browse files Browse the repository at this point in the history
Applying SonarCloud recommendations
  • Loading branch information
efonsecab authored Nov 18, 2024
2 parents ac2e6da + 7e0c791 commit a4b5801
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// <summary>
/// Check https://learn.microsoft.com/en-us/azure/azure-maps/supported-search-categories
/// </summary>
public enum POICategories
public enum PointOfInterestCategory
{
ACCESS_GATEWAY,
ADMINISTRATIVE_DIVISION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ private static void Execute(SourceProductionContext context, (Compilation Left,
var attributes = symbol.GetAttributes();
if (attributes.Length > 0)
{
foreach (var attribute in attributes)
foreach (var attributeClass in attributes
.Select(p=>p.AttributeClass))
{
var attributeClass = attribute.AttributeClass as INamedTypeSymbol;
if (attributeClass?.Name == "ServiceOfTAttribute")
{
var createModel = attributeClass.TypeArguments[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async Task<SearchPointsOfInterestResponse> GetNearbyPointsOfInterestAsync
public async Task<SearchByPOICategoryResponse> GetNearbyAirportsAsync(double latitude, double longitude, CancellationToken cancellationToken)
{
string format = "json";
string query = POICategories.AIRPORT.ToString();
string query = PointOfInterestCategory.AIRPORT.ToString();
string requestUrl = $"{azureMapsConfiguration.Endpoint}" +
$"/search/poi/category/{format}" +
$"?api-version=1.0" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
param storageAccountName string
param videoIndexerAccountName string

var storageBlobDataContributorRoleId = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
var roleAssignmentGuid = guid('FairPlayCombined','VideoIndexer','Storage Blob Data Contributor')

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-06-01' = {
name: storageAccountName
location: location
Expand Down Expand Up @@ -29,12 +32,9 @@ resource videoIndexer 'Microsoft.VideoIndexer/accounts@2024-01-01' = {
}
}

var storageBlobDataContributorRoleId = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
var roleAssignmentGuid = guid('FairPlayCombined','VideoIndexer','Storage Blob Data Contributor')

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
scope: storageAccount
name: roleAssignmentGuid
scope: storageAccount

properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', storageBlobDataContributorRoleId)
Expand Down

0 comments on commit a4b5801

Please sign in to comment.