Files
Saxonite/SaxoniteStandardBase/Base/App/SaxSystem.cs
T
2021-11-20 15:17:48 +00:00

83 lines
3.4 KiB
C#

using Sarand.Net.Standard.Base.App;
using Sarand.Net.Standard.Base.Core;
using Saxonite.Net.Standard.Base.Mgr;
using Saxonite.Net.Standard.Base.App;
using System;
using System.Collections.Generic;
using System.Text;
namespace Saxonite.Net.Standard.Base.App
{
//=======================================================================
public abstract partial class SaxSystem : SacsSystem
{
//-------------------------------------------------------------------
// Data members.
//-------------------------------------------------------------------
// Protected Construction.
protected SaxSystem() : base()
{
}
//-------------------------------------------------------------------
// Business components.
//-------------------------------------------------------------------
public abstract SaxReferenceMgr CreateReferenceMgr(SaxSessionContext sessionContext, SaxInternals internals);
public abstract SaxAccountMgr CreateAccountMgr(SaxSessionContext sessionContext, SaxInternals internals);
public abstract SaxItemDataMgr CreateItemDataMgr(SaxSessionContext sessionContext, SaxInternals internals);
public abstract SaxActivityMgr CreateActivityMgr(SaxSessionContext sessionContext, SaxInternals internals);
//-------------------------------------------------------------------
// S y s t e m C o d e s
//-------------------------------------------------------------------
public static List<TypeCodeDesc> GetCodesOfType(Sax.CodeType systemCode)
{
// Lists are cloned to avoid modifications to the internal static lists.
switch (systemCode)
{
case Sax.CodeType.YesNo:
return new List<TypeCodeDesc>(yesNoCodes);
case Sax.CodeType.DataItemType:
return new List<TypeCodeDesc>(dataItemTypeCodes);
case Sax.CodeType.Gender:
return new List<TypeCodeDesc>(genderCodes);
case Sax.CodeType.SportSpecialityLabel:
return new List<TypeCodeDesc>(sportSpecialityLabelCodes);
case Sax.CodeType.SportParticipation:
return new List<TypeCodeDesc>(sportParticipationCodes);
case Sax.CodeType.SportOfficiating:
return new List<TypeCodeDesc>(sportOfficiatingCodes);
case Sax.CodeType.RegionType:
return new List<TypeCodeDesc>(regionTypeCodes);
case Sax.CodeType.UserRole:
return new List<TypeCodeDesc>(userRoleCodes);
case Sax.CodeType.Title:
return new List<TypeCodeDesc>(titleCodes);
case Sax.CodeType.ImageType:
return new List<TypeCodeDesc>(imageTypeCodes);
case Sax.CodeType.OrganisationType:
return new List<TypeCodeDesc>(organisationTypeCodes);
case Sax.CodeType.OrganisationCategory:
return new List<TypeCodeDesc>(organisationCategoryCodes);
case Sax.CodeType.OrganisationRole:
return new List<TypeCodeDesc>(organisationRoleCodes);
case Sax.CodeType.AddressType:
return new List<TypeCodeDesc>(addressTypeCodes);
case Sax.CodeType.EventType:
return new List<TypeCodeDesc>(eventTypeCodes);
case Sax.CodeType.OpportunityType:
return new List<TypeCodeDesc>(opportunityTypeCodes);
case Sax.CodeType.ActivityReaction:
return new List<TypeCodeDesc>(activityReactionCodes);
default:
throw new NotSupportedException(nameof(SaxSystem) + ".GetCodesOfType Unexpected code type: " + systemCode.ToString());
}
}
//-------------------------------------------------------------------
}
//=======================================================================
}