Files
andy 9f22b522df v1.3.0 Restructure Saxonite workspace and upgrade to .NET 10 (#1)
Move Saxonite’s projects into a dedicated `Workspace` folder and align the solution with .NET 10 and the current Common workspace. Update encryption integration, test project structure and coverage, and repository guidance and upgrade notes.

- Relocate application and library projects while retaining Git rename history.
- Split tests into Admin, Online, and Shared projects; add representative behavioral and serialization tests.
- Update Common integration, application version, and repository documentation.

Application version: 1.3.0

Reviewed-on: #1
Co-authored-by: andy <andy@sarand.com>
2026-10-16 18:24:16 +01:00

203 lines
7.2 KiB
C#

using Sarand.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 - C o n f i g
//=======================================================================
static partial class Sax
{
//-------------------------------------------------------------------
// Application configuration defaults.
public static class Config
{
public static String Context_Defaults { get; } = "Defaults";
public static class Security
{
public static class Password
{
}
public static class Activation
{
public static int EmailLinkExpiresMins_Default { get; } = 60 * 6;
public static int EmailLinkExpiresMins_Min { get; } = 30;
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
}
public static class SignIn
{
public static class PasswordRequest
{
public static int EmailLinkExpiresMins_Default { get; } = 60 * 3;
public static int EmailLinkExpiresMins_Min { get; } = 30;
public static int EmailLinkExpiresMins_Max { get; } = 60 * 24;
}
public static class KeepLoggedIn
{
public static bool Allowed_Default { get; } = true;
public static int CookieExpiresDays_Default { get; } = 10;
public static int CookieExpiresDays_Min { get; } = 1;
public static int CookieExpiresDays_Max { get; } = 30;
}
}
}
public static class User
{
public static class Image
{
// Physical image maximum dimensions - reduced on upload.
public static ushort WidthMax { get; } = 240;
public static ushort HeightMax { get; } = 320;
// Maximum image display dimensions - organisation list.
public static ushort DisplayWidthMax_List { get; } = 48;
public static ushort DisplayHeightMax_List { get; } = 48;
// Maximum image display dimensions - organisation edit etc.
public static ushort DisplayWidthMax_Item { get; } = 96;
public static ushort DisplayHeightMax_Item { get; } = 96;
}
}
public static class Organisation
{
public static class Logo
{
// Physical image maximum dimensions - reduced on upload.
public static ushort WidthMax { get; } = 240;
public static ushort HeightMax { get; } = 240;
// Maximum image display dimensions - organisation list.
public static ushort DisplayWidthMax_List { get; } = 48;
public static ushort DisplayHeightMax_List { get; } = 48;
// Maximum image display dimensions - organisation edit etc.
public static ushort DisplayWidthMax_Item { get; } = 96;
public static ushort DisplayHeightMax_Item { get; } = 96;
}
}
public static class Activities
{
public static class Thumbnail
{
// Maximum image display dimensions - activity list (eg. Online Home page).
public static ushort DisplayWidthMax_List { get; } = 180;
public static ushort DisplayHeightMax_List { get; } = 120;
}
}
public static class Articles
{
public static class Segments
{
public static ushort Max { get; } = 12;
public static ushort CharsMax { get; } = 8000;
}
public static class Images
{
// Physical image maximum dimensions - reduced on upload.
public static ushort WidthMax { get; } = 800;
public static ushort HeightMax { get; } = 640;
}
public static ushort PublishMaxDaysBefore { get; } = 7;
public static ushort PublishMaxDaysAhead { get; } = 10;
}
public class Online
{
public static class Session
{
public static class Cookie
{
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
public static String Name { get; } = "Saxonite.Online.Session";
public static bool HttpOnly { get; } = true;
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(60);
public static long RememberMeTimeoutMilis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(1) : TimeSpan.FromMinutes(15)).TotalMilliseconds;
}
public static class DataCommit
{
public static class IntervalSecs
{
public static int Initial { get; } = SacsSystem.DebugMode ? 10 : 10;
public static int DataWaiting { get; } = SacsSystem.DebugMode ? 1 : 2;
public static int NoDataWaiting { get; } = SacsSystem.DebugMode ? 5 : 10;
}
}
}
public static class DataCache
{
public static class RefreshIntervalSecs
{
public static int Initial { get; } = SacsSystem.DebugMode ? 2 : 5;
public static int Periodic { get; } = SacsSystem.DebugMode ? 120 : 1800;
}
}
public static class Search
{
public static class Users
{
public static ushort PageLengthDefault { get; } = 8;
public static ushort PageLengthMax { get; } = 20;
}
public static class Organisations
{
public static ushort PageLengthDefault { get; } = 8;
public static ushort PageLengthMax { get; } = 20;
}
}
}
public class Api
{
public static class Session
{
public static class Cookie
{
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
public static String Name { get; } = "Saxonite.Api.Session";
public static bool HttpOnly { get; } = true;
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(15);
public static long KeepLoggedInTimeoutMillis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(1) : TimeSpan.FromMinutes(5)).TotalMilliseconds;
}
}
}
public class Admin
{
public static class Session
{
public static class Cookie
{
/// <summary>Default cookie name: '.AspNetCore.Session'</summary>
public static String Name { get; } = "Saxonite.Admin.Session";
public static bool HttpOnly { get; } = true;
public static TimeSpan IdleTimeout { get; } = SacsSystem.DebugMode ? TimeSpan.FromMinutes(5) : TimeSpan.FromMinutes(15);
public static long KeepLoggedInTimeoutMillis { get; } = (long)(SacsSystem.DebugMode ? TimeSpan.FromMinutes(1) : TimeSpan.FromMinutes(5)).TotalMilliseconds;
}
}
public static class Processes
{
public static class Scheduled
{
public static class UsgaGolfDataLookup
{
public static bool Enabled { get; set; } = SacsSystem.DebugMode ? true : true;
public static int MinsBetweenExecution { get; set; } = SacsSystem.DebugMode ? 8 : 12;
public static int HoursBetweenCountryLookup { get; set; } = SacsSystem.DebugMode ? 24 : 24 * 5;
}
}
}
}
public static class Links
{
public static class Targets
{
public static String Website { get; } = "sax-lnk-web";
public static String Wikipedia { get; } = "sax-lnk-wikip";
public static String Facebook { get; } = "sax-lnk-fbook";
public static String Twitter { get; } = "sax-lnk-twit";
public static String Instagram { get; } = "sax-lnk-insta";
public static String LinkedIn { get; } = "sax-lnk-lnkin";
public static String Article { get; } = "sax-art-lnk";
}
}
}
//-------------------------------------------------------------------
}
}