Click or drag to resize

CategorizedSettingsElementValue Property

Gets or sets the value of the setting.

Namespace: GSF.Configuration
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax
[ConfigurationPropertyAttribute("value", IsRequired = true, DefaultValue = "")]
public string Value { get; set; }
View Source

Return Value

String
The value of the setting.
Remarks
Value can reference the value of another setting using Eval([Section].[Setting]) syntax or the value of a known .NET type's static member (field, non-indexed property or parameterless method) using Eval([Type].[Member]) syntax as shown in the example below:
C#
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="categorizedSettings" type="GSF.Configuration.CategorizedSettingsSection, GSF.Core" />
  </configSections>
  <categorizedSettings>
    <database>
      <add name="SettingsTable" value="dbo.Settings" description="Table that contains the settings." 
        encrypted="false" />
      <add name="AdminEmail" value="SELECT * FROM Eval(Database.SettingsTable) WHERE Name = 'AdminEmail'" 
        description="Email address of the administrator." encrypted="false" />
      <add name="AuditQuery" value="SELECT * FROM dbo.Log WHERE EntryTime < 'Eval(System.DateTime.UtcNow)'" 
        description="Query for retrieving audit records." encrypted="false" />
    </database>
  </categorizedSettings>
</configuration>
See Also