Base solution for your next web application
Open Closed

Settings definitions #4646


User avatar
0
BobIngham created

.Net Core, Angular I have searched source code to no avail to find out usage of the settings definitions:

new SettingDefinition(
    name: NuageSettings.NuageTenantManagement.RegistrationCode,
    defaultValue: null,
    scopes: SettingScopes.Tenant,
    displayName: null,
    description: null,
    group: null,
    isVisibleToClients: true,
    isInherited: true,
    customData: null),

I have carefully read the documentation at https://aspnetboilerplate.com/Pages/Documents/Setting-Management but the following explanation gives me only reason to scratch my head: Name (required): A setting must have a system-wide unique name. It's a good idea to define a const string for a setting name instead of using a magic string. Default value: A setting may have a default value. This value can be null or an empty string. Scopes: A setting should define it's scope (see below). Display name: A localizable string that can be used to show setting's name later in the UI. Description: A localizable string that can be used to show a setting's description later in the UI. Group: Can be used to group settings. This is just for the UI, and not used in setting management. IsVisibleToClients: Set true to make a setting usable on the client-side. isInherited: Used to set if this setting is inherited by tenant and users (See setting scope section). customData: Can be used to set custom data for this setting definition. My question is:

Is there anywhere i can find examples of implementation of these properties, in particular displayName, description, group, isInherited and customData???


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @BobIngham as I checked those fields are not used at all. I think those are designed for future usage when needed.

  • User Avatar
    0
    BobIngham created

    @ismcagdas, that's a shame. I was hoping to extend the usage of settings to reduce the number of extensibility points for upgrades. That is to say, my aim is to use existing Zero functionality wherever possible as opposed to extending entities. This means that when it comes to upgrading I can merge my code and make as few changes to the Zero system as possible. This applies both to the core and to angular, in the latter I have created my own module which is lazy loaded.