-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update namespaces and interfaces for CentralPennIncidentsFunc
- Loading branch information
Showing
23 changed files
with
519 additions
and
611 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace CentralPennIncidentsFunc.Dtos | ||
namespace CentralPennIncidentsFunc.Dtos; | ||
|
||
public class Incident | ||
{ | ||
public class Incident | ||
{ | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("incident_dt")] | ||
public DateTime IncidentDate { get; set; } | ||
[JsonPropertyName("incident_dt")] | ||
public DateTime IncidentDate { get; set; } | ||
|
||
[JsonPropertyName("type")] | ||
public string Type { get; set; } | ||
[JsonPropertyName("type")] | ||
public string Type { get; set; } | ||
|
||
[JsonPropertyName("subType")] | ||
public string SubType { get; set; } | ||
[JsonPropertyName("subType")] | ||
public string SubType { get; set; } | ||
|
||
[JsonPropertyName("location")] | ||
public string Location { get; set; } | ||
[JsonPropertyName("location")] | ||
public string Location { get; set; } | ||
|
||
[JsonPropertyName("area")] | ||
public string Area { get; set; } | ||
[JsonPropertyName("area")] | ||
public string Area { get; set; } | ||
|
||
[JsonPropertyName("units_assigned")] | ||
public string[] UnitsAssigned { get; set; } | ||
[JsonPropertyName("units_assigned")] | ||
public string[] UnitsAssigned { get; set; } | ||
|
||
[JsonPropertyName("geocode_location")] | ||
public Location GeocodeLocation { get; set; } | ||
} | ||
[JsonPropertyName("geocode_location")] | ||
public Location GeocodeLocation { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace CentralPennIncidentsFunc.Dtos | ||
namespace CentralPennIncidentsFunc.Dtos; | ||
|
||
public class Location | ||
{ | ||
public class Location | ||
{ | ||
[JsonPropertyName("lat")] | ||
public double Lat { get; set; } | ||
[JsonPropertyName("lat")] | ||
public double Lat { get; set; } | ||
|
||
[JsonPropertyName("lng")] | ||
public double Lng { get; set; } | ||
} | ||
[JsonPropertyName("lng")] | ||
public double Lng { get; set; } | ||
} |
13 changes: 6 additions & 7 deletions
13
apps/func/src/CentralPennIncidentsFunc/Dtos/Mappings/IncidentProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
using AutoMapper; | ||
|
||
namespace CentralPennIncidentsFunc.Dtos.Mappings | ||
namespace CentralPennIncidentsFunc.Dtos.Mappings; | ||
|
||
public class IncidentProfile : Profile | ||
{ | ||
public class IncidentProfile : Profile | ||
public IncidentProfile() | ||
{ | ||
public IncidentProfile() | ||
{ | ||
CreateMap<Models.Incident, Incident>() | ||
.ForMember(dst => dst.Id, opt => opt.MapFrom(src => src.GlobalId.Uid)); | ||
} | ||
CreateMap<Models.Incident, Incident>() | ||
.ForMember(dst => dst.Id, opt => opt.MapFrom(src => src.GlobalId.Uid)); | ||
} | ||
} |
15 changes: 7 additions & 8 deletions
15
apps/func/src/CentralPennIncidentsFunc/Dtos/Mappings/LocationProfile.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
using AutoMapper; | ||
|
||
namespace CentralPennIncidentsFunc.Dtos.Mappings | ||
namespace CentralPennIncidentsFunc.Dtos.Mappings; | ||
|
||
public class LocationProfile : Profile | ||
{ | ||
public class LocationProfile : Profile | ||
public LocationProfile() | ||
{ | ||
public LocationProfile() | ||
{ | ||
CreateMap<Models.LocationEntity, Location>() | ||
.ForMember(d => d.Lat, opt => opt.MapFrom(src => src.Lat_VC)) | ||
.ForMember(d => d.Lng, opt => opt.MapFrom(src => src.Lng_VC)); | ||
} | ||
CreateMap<Models.LocationEntity, Location>() | ||
.ForMember(d => d.Lat, opt => opt.MapFrom(src => src.Lat_VC)) | ||
.ForMember(d => d.Lng, opt => opt.MapFrom(src => src.Lng_VC)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
apps/func/src/CentralPennIncidentsFunc/Interfaces/IDataCache.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
using System.Collections.Generic; | ||
using CentralPennIncidentsFunc.Models; | ||
namespace CentralPennIncidentsFunc.Interfaces; | ||
|
||
namespace CentralPennIncidentsFunc.Interfaces | ||
public interface IDataCache<TKey, TValue> | ||
{ | ||
public interface IDataCache<TKey, TValue> | ||
{ | ||
bool TryGetValue(TKey key, out TValue value); | ||
void SaveValue(TKey key, TValue value); | ||
} | ||
bool TryGetValue(TKey key, out TValue value); | ||
void SaveValue(TKey key, TValue value); | ||
} |
15 changes: 7 additions & 8 deletions
15
apps/func/src/CentralPennIncidentsFunc/Interfaces/IEnvironmentProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
using System; | ||
|
||
namespace CentralPennIncidentsFunc.Interfaces | ||
namespace CentralPennIncidentsFunc.Interfaces; | ||
|
||
public interface IEnvironmentProvider | ||
{ | ||
public interface IEnvironmentProvider | ||
{ | ||
string GetEnvironmentVariable( | ||
string variable, | ||
EnvironmentVariableTarget target = EnvironmentVariableTarget.Process | ||
); | ||
} | ||
string GetEnvironmentVariable( | ||
string variable, | ||
EnvironmentVariableTarget target = EnvironmentVariableTarget.Process | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
apps/func/src/CentralPennIncidentsFunc/Interfaces/ILocationService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
using System.Threading.Tasks; | ||
using CentralPennIncidentsFunc.Models; | ||
|
||
namespace CentralPennIncidentsFunc.Interfaces | ||
namespace CentralPennIncidentsFunc.Interfaces; | ||
|
||
public interface ILocationService | ||
{ | ||
public interface ILocationService | ||
{ | ||
Task<LocationEntity> GetLocationAsync(string location, string area); | ||
} | ||
Task<LocationEntity> GetLocationAsync(string location, string area); | ||
} |
Oops, something went wrong.