Deconflict namespaces

Pluralize namespaces in client to keep from having to qualify domain namespace
This commit is contained in:
Daniel J. Summers 2021-02-07 16:53:36 -05:00
parent 8350d0bddf
commit e63a12b774
12 changed files with 20 additions and 20 deletions

View File

@ -2,7 +2,7 @@
using Microsoft.AspNetCore.WebUtilities;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Citizen
namespace JobsJobsJobs.Client.Pages.Citizens
{
public partial class Authorized : ComponentBase
{

View File

@ -1,10 +1,10 @@
using JobsJobsJobs.Shared.Api;
using JobsJobsJobs.Shared;
using JobsJobsJobs.Shared.Api;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
using Domain = JobsJobsJobs.Shared;
namespace JobsJobsJobs.Client.Pages.Citizen
namespace JobsJobsJobs.Client.Pages.Citizens
{
/// <summary>
/// The first page a user sees after signing in
@ -14,7 +14,7 @@ namespace JobsJobsJobs.Client.Pages.Citizen
/// <summary>
/// The user's profile
/// </summary>
private Domain.Profile? Profile { get; set; } = null;
private Profile? Profile { get; set; } = null;
/// <summary>
/// The number of profiles

View File

@ -6,7 +6,7 @@ using System.Linq;
using System.Net.Http.Json;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Citizen
namespace JobsJobsJobs.Client.Pages.Citizens
{
/// <summary>
/// Profile edit page (called EditProfile so as not to create naming conflicts)

View File

@ -8,7 +8,7 @@ using System.Linq;
using System.Net;
using System.Threading.Tasks;
namespace JobsJobsJobs.Client.Pages.Profile
namespace JobsJobsJobs.Client.Pages.Profiles
{
public partial class Search : ComponentBase
{

View File

@ -1,21 +1,21 @@
using Microsoft.AspNetCore.Components;
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
using Domain = JobsJobsJobs.Shared;
namespace JobsJobsJobs.Client.Pages.Profile
namespace JobsJobsJobs.Client.Pages.Profiles
{
public partial class View : ComponentBase
{
/// <summary>
/// The citizen whose profile is being displayed
/// </summary>
private Domain.Citizen Citizen { get; set; } = default!;
private Citizen Citizen { get; set; } = default!;
/// <summary>
/// The profile to display
/// </summary>
private Domain.Profile Profile { get; set; } = default!;
private Profile Profile { get; set; } = default!;
/// <summary>
/// The work types for the top of the page
@ -55,8 +55,8 @@ namespace JobsJobsJobs.Client.Pages.Profile
public async Task RetrieveProfile(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var citizenTask = ServerApi.RetrieveOne<Domain.Citizen>(http, $"citizen/get/{Id}");
var profileTask = ServerApi.RetrieveOne<Domain.Profile>(http, $"profile/get/{Id}");
var citizenTask = ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{Id}");
var profileTask = ServerApi.RetrieveOne<Profile>(http, $"profile/get/{Id}");
await Task.WhenAll(citizenTask, profileTask);

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Components;
using JobsJobsJobs.Shared;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using System.Threading.Tasks;
using Domain = JobsJobsJobs.Shared;
namespace JobsJobsJobs.Client.Pages.SuccessStory
{
@ -16,12 +16,12 @@ namespace JobsJobsJobs.Client.Pages.SuccessStory
/// <summary>
/// The success story to be displayed
/// </summary>
private Domain.Success Story { get; set; } = default!;
private Success Story { get; set; } = default!;
/// <summary>
/// The citizen who authorized this success story
/// </summary>
private Domain.Citizen Citizen { get; set; } = default!;
private Citizen Citizen { get; set; } = default!;
/// <summary>
/// Retrieve the success story
@ -30,7 +30,7 @@ namespace JobsJobsJobs.Client.Pages.SuccessStory
public async Task RetrieveStory(ICollection<string> errors)
{
ServerApi.SetJwt(http, state);
var story = await ServerApi.RetrieveOne<Domain.Success>(http, $"success/{Id}");
var story = await ServerApi.RetrieveOne<Success>(http, $"success/{Id}");
if (story.IsOk)
{
@ -41,7 +41,7 @@ namespace JobsJobsJobs.Client.Pages.SuccessStory
else
{
Story = story.Ok;
var citizen = await ServerApi.RetrieveOne<Domain.Citizen>(http, $"citizen/get/{Story.CitizenId}");
var citizen = await ServerApi.RetrieveOne<Citizen>(http, $"citizen/get/{Story.CitizenId}");
if (citizen.IsOk)
{
if (citizen.Ok == null)