192 lines
11 KiB
C#
192 lines
11 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> genderCodes = new List<TypeCodeDesc>();
|
|
private static readonly List<TypeCodeDesc> sportSpecialityLabelCodes = 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> addressTypeCodes = new List<TypeCodeDesc>();
|
|
private static readonly List<TypeCodeDesc> eventTypeCodes = 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.Article, "Article", "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");
|
|
|
|
//---------------------------------------------------------------
|
|
// Gender.
|
|
genderCodes.Add(Sax.Gender.Female, "Female", "Female");
|
|
genderCodes.Add(Sax.Gender.Male, "Male", "Male");
|
|
genderCodes.Add(Sax.Gender.TransFemale, "TransFemale", "TransFemale");
|
|
genderCodes.Add(Sax.Gender.TransMale, "TransMale", "TransMale");
|
|
genderCodes.Add(Sax.Gender.Nonconforming, "Nonconforming", "Nonconforming");
|
|
genderCodes.Add(Sax.Gender.PreferNotToSay, "PreferNotToSay", "Prefer not to say");
|
|
|
|
//---------------------------------------------------------------
|
|
// Sport speciality label.
|
|
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.Positon, "POS", "Positon");
|
|
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.Discipline, "DIS", "Discipline");
|
|
sportSpecialityLabelCodes.Add(Sax.SportSpecialityLabel.NotRelevant, "NRE", "Not relevant");
|
|
|
|
//---------------------------------------------------------------
|
|
// 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.Universe, "UNIV", "Universe");
|
|
regionTypeCodes.Add(Sax.RegionType.Galaxy, "GALAX", "Galaxy");
|
|
regionTypeCodes.Add(Sax.RegionType.World, "WORLD", "World");
|
|
regionTypeCodes.Add(Sax.RegionType.Continent, "CONT", "Continent");
|
|
regionTypeCodes.Add(Sax.RegionType.SubContinent, "SUBC", "Sub-Continent");
|
|
regionTypeCodes.Add(Sax.RegionType.Country, "COUN", "Country");
|
|
regionTypeCodes.Add(Sax.RegionType.State, "STAT", "State");
|
|
regionTypeCodes.Add(Sax.RegionType.Province, "PROV", "Province");
|
|
|
|
//---------------------------------------------------------------
|
|
// 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");
|
|
imageTypeCodes.Add(Sax.ImageType.Article, "Article", "Article");
|
|
imageTypeCodes.Add(Sax.ImageType.ArticleUpload, "ArticleUpload", "Article - 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.Society, "SOC", "Society");
|
|
organisationCategoryCodes.Add(Sax.OrganisationCategory.Education, "EDU", "Education");
|
|
organisationCategoryCodes.Add(Sax.OrganisationCategory.SportDepartment, "SPD", "Sport Department");
|
|
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.Admin, "ADM", "Admin");
|
|
organisationRoleCodes.Add(Sax.OrganisationRole.MemberAdmin, "MBA", "Members");
|
|
organisationRoleCodes.Add(Sax.OrganisationRole.ScheduleAdmin, "SCA", "Schedule");
|
|
organisationRoleCodes.Add(Sax.OrganisationRole.OpportunityAdmin, "OPA", "Opportunities");
|
|
organisationRoleCodes.Add(Sax.OrganisationRole.ArticleAdmin, "ARA", "Articles");
|
|
|
|
//---------------------------------------------------------------
|
|
// Event types.
|
|
eventTypeCodes.Add(Sax.EventType.Playing, "PLG", "Playing");
|
|
eventTypeCodes.Add(Sax.EventType.Training, "TRN", "Training");
|
|
eventTypeCodes.Add(Sax.EventType.Organisation, "ORG", "Organisation");
|
|
eventTypeCodes.Add(Sax.EventType.Social, "SCL", "Social");
|
|
|
|
//---------------------------------------------------------------
|
|
// 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");
|
|
|
|
//---------------------------------------------------------------
|
|
// Address Types.
|
|
addressTypeCodes.Add(Sax.AddressType.Location, "Location", "Location");
|
|
addressTypeCodes.Add(Sax.AddressType.Home, "Home", "Home");
|
|
addressTypeCodes.Add(Sax.AddressType.Office, "Office", "Office");
|
|
addressTypeCodes.Add(Sax.AddressType.Delivery, "Delivery", "Delivery");
|
|
|
|
//---------------------------------------------------------------
|
|
// Activity Reactions.
|
|
activityReactionCodes.Add(Sax.ActivityReaction.Good, "Good", "Good");
|
|
activityReactionCodes.Add(Sax.ActivityReaction.VeryGood, "VeryGood", "Very Good");
|
|
activityReactionCodes.Add(Sax.ActivityReaction.Exceptional, "Exceptional", "Exceptional");
|
|
|
|
//---------------------------------------------------------------
|
|
}
|
|
|
|
//-------------------------------------------------------------------
|
|
}
|
|
//=======================================================================
|
|
}
|