Files
Saxonite/SaxoniteStandardBase/Base/App/SaxSystem-Statics.cs
T
2021-06-15 15:16:50 +01:00

148 lines
8.2 KiB
C#

using Sarand.Net.Standard.Base.Core;
using Saxonite.Net.Standard.Base.App;
using System;
using System.Collections.Generic;
using System.Text;
namespace Saxonite.Net.Standard.Base.App
{
//=======================================================================
// S A X S y s t e m - S t a t i c s
//=======================================================================
partial class SaxSystem
{
//-------------------------------------------------------------------
// Data members.
// Code types.
private static readonly List<TypeCodeDesc> yesNoCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> dataItemTypeCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> sportParticipationCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> sportOfficiatingCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> regionTypeCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> userRoleCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> titleCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> imageTypeCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> organisationTypeCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> organisationCategoryCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> organisationRoleCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> opportunityTypeCodes = new List<TypeCodeDesc>();
private static readonly List<TypeCodeDesc> activityReactionCodes = new List<TypeCodeDesc>();
//-------------------------------------------------------------------
/// <summary>Static initialisation.</summary>
static SaxSystem()
{
//---------------------------------------------------------------
// Yes No options.
yesNoCodes.Add(Sax.YesNo.Yes, "YES", "Yes");
yesNoCodes.Add(Sax.YesNo.No, "NO", "No");
//---------------------------------------------------------------
// Data item types.
// Reference data.
dataItemTypeCodes.Add(Sax.DataItemType.Region, "Region", "Region");
dataItemTypeCodes.Add(Sax.DataItemType.Sport, "Sport", "Sport");
// Accounts.
dataItemTypeCodes.Add(Sax.DataItemType.UserAccount, "UserAccount", "User Account");
dataItemTypeCodes.Add(Sax.DataItemType.UserRole, "UserRole", "User Role");
dataItemTypeCodes.Add(Sax.DataItemType.UserOrganisation, "UserOrganisation", "User Organisation");
dataItemTypeCodes.Add(Sax.DataItemType.UserSport, "UserSport", "User Sport");
dataItemTypeCodes.Add(Sax.DataItemType.Organisation, "Organisation", "Organisation");
// Activty data.
dataItemTypeCodes.Add(Sax.DataItemType.ActivityIndex, "ActivityIndex", "Activity Index");
dataItemTypeCodes.Add(Sax.DataItemType.UserActivity, "UserActivity", "User Activity");
dataItemTypeCodes.Add(Sax.DataItemType.JournalistArticle, "JournalistArticle", "Journalist Article");
dataItemTypeCodes.Add(Sax.DataItemType.OrganisationOpportunity, "OrganisationOpportunity", "Organisation Opportunity");
dataItemTypeCodes.Add(Sax.DataItemType.OrganisationEvent, "OrganisationEvent", "Organisation Event");
// Item link components.
dataItemTypeCodes.Add(Sax.DataItemType.ItemSport, "ItemSport", "Item Sport");
dataItemTypeCodes.Add(Sax.DataItemType.ItemImage, "ItemImage", "Item Image");
//---------------------------------------------------------------
// Sport participation.
sportParticipationCodes.Add(Sax.SportParticipation.Professional, "PRO", "Professional");
sportParticipationCodes.Add(Sax.SportParticipation.Regular, "REG", "Regular");
sportParticipationCodes.Add(Sax.SportParticipation.Occasional, "OCC", "Occasional");
sportParticipationCodes.Add(Sax.SportParticipation.Spectator, "SPC", "Spectator");
sportParticipationCodes.Add(Sax.SportParticipation.Interested, "INT", "Interested");
//---------------------------------------------------------------
// Sport officiating.
sportOfficiatingCodes.Add(Sax.SportParticipation.Professional, "PRO", "Professional");
sportOfficiatingCodes.Add(Sax.SportParticipation.Regular, "REG", "Regular");
sportOfficiatingCodes.Add(Sax.SportParticipation.Occasional, "OCC", "Occasional");
//---------------------------------------------------------------
// Region types.
regionTypeCodes.Add(Sax.RegionType.Continent, "CONT", "Continent");
regionTypeCodes.Add(Sax.RegionType.SubContinent, "SUBC", "SubContinent");
regionTypeCodes.Add(Sax.RegionType.Country, "COUN", "Country");
//---------------------------------------------------------------
// User roles.
userRoleCodes.Add(Sax.UserRole.Journalist, "JRNLST", "Journalist");
userRoleCodes.Add(Sax.UserRole.SystemAdmin, "SYSADM", "System Admin");
//---------------------------------------------------------------
// Titles.
titleCodes.Add(Sax.Title.Mr, "Mr", "Mr");
titleCodes.Add(Sax.Title.Mrs, "Mrs", "Mrs");
titleCodes.Add(Sax.Title.Miss, "Miss", "Miss");
titleCodes.Add(Sax.Title.Mx, "Mx", "Mx");
titleCodes.Add(Sax.Title.Dr, "Dr", "Dr");
titleCodes.Add(Sax.Title.Sir, "Sir", "Sir");
titleCodes.Add(Sax.Title.Lord, "Lord", "Lord");
titleCodes.Add(Sax.Title.Lady, "Lady", "Lady");
//---------------------------------------------------------------
// Image types.
imageTypeCodes.Add(Sax.ImageType.Avatar, "Avatar", "Avatar");
imageTypeCodes.Add(Sax.ImageType.AvatarUpload, "AvatarUpload", "Avatar - upload");
//---------------------------------------------------------------
// Organisation types.
organisationTypeCodes.Add(Sax.OrganisationType.SocialEnterprise, "SEN", "Social Enterprise");
organisationTypeCodes.Add(Sax.OrganisationType.CommunityGroup, "CGR", "Community Group");
organisationTypeCodes.Add(Sax.OrganisationType.Charity, "CTY", "Charity");
organisationTypeCodes.Add(Sax.OrganisationType.Commercial, "CMC", "Commercial");
organisationTypeCodes.Add(Sax.OrganisationType.PublicSector, "PBS", "Public Sector");
//---------------------------------------------------------------
// Organisation categories.
organisationCategoryCodes.Add(Sax.OrganisationCategory.Association, "ASC", "Association");
organisationCategoryCodes.Add(Sax.OrganisationCategory.Club, "CLB", "Club");
organisationCategoryCodes.Add(Sax.OrganisationCategory.Education, "EDU", "Education");
organisationCategoryCodes.Add(Sax.OrganisationCategory.Syndicate, "SYN", "Syndicate");
organisationCategoryCodes.Add(Sax.OrganisationCategory.Partner, "PRT", "Partner");
organisationCategoryCodes.Add(Sax.OrganisationCategory.Other, "OTH", "Other");
//---------------------------------------------------------------
// Organisation roles.
organisationRoleCodes.Add(Sax.OrganisationRole.Member, "MBR", "Member");
organisationRoleCodes.Add(Sax.OrganisationRole.MemberAdmin, "MBA", "Member Admin");
organisationRoleCodes.Add(Sax.OrganisationRole.ScheduleAdmin, "SCA", "Schedule Admin");
organisationRoleCodes.Add(Sax.OrganisationRole.OpportunityAdmin, "OPA", "Opportunity Admin");
//---------------------------------------------------------------
// Opportunity types.
opportunityTypeCodes.Add(Sax.OpportunityType.Playing, "PLG", "Playing");
opportunityTypeCodes.Add(Sax.OpportunityType.Official, "OFL", "Official");
opportunityTypeCodes.Add(Sax.OpportunityType.Coaching, "CHG", "Coaching");
opportunityTypeCodes.Add(Sax.OpportunityType.Volunteer, "VTR", "Volunteer");
opportunityTypeCodes.Add(Sax.OpportunityType.Staff, "STF", "Staff");
opportunityTypeCodes.Add(Sax.OpportunityType.Board, "BRD", "Board");
//---------------------------------------------------------------
// Opportunity types.
activityReactionCodes.Add(Sax.ActivityReaction.Good, "Good", "Good");
activityReactionCodes.Add(Sax.ActivityReaction.VeryGood, "VeryGood", "Very Good");
activityReactionCodes.Add(Sax.ActivityReaction.Exceptional, "Exceptional", "Exceptional");
//---------------------------------------------------------------
}
//-------------------------------------------------------------------
}
//=======================================================================
}