/
veer
/
Zaya.Primitives
Обзор
Документация
Войти
/
veer
/
Zaya.Primitives
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
docs/api/Zaya.Primitives.SettingDescriptor.html
418 строк
23 KB
Vladimir Makarov
docs
29 июл 2026, 13:13
29 июл 2026, 13:13
50b4c9c
Код
Авторство
О чём код?
<!DOCTYPE html> <!--[if IE]><![endif]--> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Class SettingDescriptor </title> <meta name="viewport" content="width=device-width"> <meta name="title" content="Class SettingDescriptor "> <meta name="description" content="Abstract base class for describing a configurable engine setting. Subclasses carry type-specific properties (e.g. , , , ). Hosts use pattern matching on the concrete type to render the appropriate UI control."> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" href="../styles/docfx.vendor.min.css"> <link rel="stylesheet" href="../styles/docfx.css"> <link rel="stylesheet" href="../styles/main.css"> <meta property="docfx:navrel" content="../toc.html"> <meta property="docfx:tocrel" content="toc.html"> </head> <body data-spy="scroll" data-target="#affix" data-offset="120"> <div id="wrapper"> <header> <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"> <img id="logo" class="svg" src="../logo.svg" alt=""> </a> </div> <div class="collapse navbar-collapse" id="navbar"> <form class="navbar-form navbar-right" role="search" id="search"> <div class="form-group"> <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off"> </div> </form> </div> </div> </nav> <div class="subnav navbar navbar-default"> <div class="container hide-when-search" id="breadcrumb"> <ul class="breadcrumb"> <li></li> </ul> </div> </div> </header> <div role="main" class="container body-content hide-when-search"> <div class="sidenav hide-when-search"> <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a> <div class="sidetoggle collapse" id="sidetoggle"> <div id="sidetoc"></div> </div> </div> <div class="article row grid-right"> <div class="col-md-10"> <article class="content wrap" id="_content" data-uid="Zaya.Primitives.SettingDescriptor"> <h1 id="Zaya_Primitives_SettingDescriptor" data-uid="Zaya.Primitives.SettingDescriptor" class="text-break">Class SettingDescriptor</h1> <div class="markdown level0 summary"><p>Abstract base class for describing a configurable engine setting. Subclasses carry type-specific properties (e.g. <a class="xref" href="Zaya.Primitives.StringSettingDescriptor.html#Zaya_Primitives_StringSettingDescriptor_MinLength">MinLength</a>, <a class="xref" href="Zaya.Primitives.IntegerSettingDescriptor.html#Zaya_Primitives_IntegerSettingDescriptor_MinValue">MinValue</a>, <a class="xref" href="Zaya.Primitives.EnumSettingDescriptor.html#Zaya_Primitives_EnumSettingDescriptor_Options">Options</a>, <a class="xref" href="Zaya.Primitives.TableSettingDescriptor.html#Zaya_Primitives_TableSettingDescriptor_Columns">Columns</a>). Hosts use pattern matching on the concrete type to render the appropriate UI control.</p> </div> <div class="markdown level0 conceptual"></div> <div class="inheritance"> <h5>Inheritance</h5> <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div> <div class="level1"><span class="xref">SettingDescriptor</span></div> <div class="level2"><a class="xref" href="Zaya.Primitives.BooleanSettingDescriptor.html">BooleanSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.DirectoryPathSettingDescriptor.html">DirectoryPathSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.EnumSettingDescriptor.html">EnumSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.FilePathSettingDescriptor.html">FilePathSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.IntegerSettingDescriptor.html">IntegerSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.PasswordSettingDescriptor.html">PasswordSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.StringSettingDescriptor.html">StringSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.TableSettingDescriptor.html">TableSettingDescriptor</a></div> <div class="level2"><a class="xref" href="Zaya.Primitives.UrlSettingDescriptor.html">UrlSettingDescriptor</a></div> </div> <div class="inheritedMembers"> <h5>Inherited Members</h5> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a> </div> <div> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a> </div> </div> <h6><strong>Namespace</strong>: <a class="xref" href="Zaya.html">Zaya</a>.<a class="xref" href="Zaya.Primitives.html">Primitives</a></h6> <h6><strong>Assembly</strong>: Zaya.Primitives.dll</h6> <h5 id="Zaya_Primitives_SettingDescriptor_syntax">Syntax</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public abstract class SettingDescriptor</code></pre> </div> <h3 id="constructors">Constructors </h3> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor__ctor_System_String_Zaya_Primitives_LocalizedString_.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.%23ctor(System.String%2CZaya.Primitives.LocalizedString)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L67">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor__ctor_" data-uid="Zaya.Primitives.SettingDescriptor.#ctor*"></a> <h4 id="Zaya_Primitives_SettingDescriptor__ctor_System_String_Zaya_Primitives_LocalizedString_" data-uid="Zaya.Primitives.SettingDescriptor.#ctor(System.String,Zaya.Primitives.LocalizedString)">SettingDescriptor(string, LocalizedString)</h4> <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="Zaya.Primitives.SettingDescriptor.html">SettingDescriptor</a> class.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">protected SettingDescriptor(string key, LocalizedString displayName)</code></pre> </div> <h5 class="parameters">Parameters</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Name</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td> <td><span class="parametername">key</span></td> <td><p>Machine-readable key for this setting.</p> </td> </tr> <tr> <td><a class="xref" href="Zaya.Primitives.LocalizedString.html">LocalizedString</a></td> <td><span class="parametername">displayName</span></td> <td><p>Localizable UI label.</p> </td> </tr> </tbody> </table> <h3 id="properties">Properties </h3> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_Description.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.Description%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L25">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_Description_" data-uid="Zaya.Primitives.SettingDescriptor.Description*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_Description" data-uid="Zaya.Primitives.SettingDescriptor.Description">Description</h4> <div class="markdown level1 summary"><p>Gets or sets the optional localizable description (tooltip / help text).</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public LocalizedString? Description { get; init; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="Zaya.Primitives.LocalizedString.html">LocalizedString</a></td> <td></td> </tr> </tbody> </table> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_DisplayName.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.DisplayName%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L20">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_DisplayName_" data-uid="Zaya.Primitives.SettingDescriptor.DisplayName*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_DisplayName" data-uid="Zaya.Primitives.SettingDescriptor.DisplayName">DisplayName</h4> <div class="markdown level1 summary"><p>Gets the localizable display name shown as the field label in the UI.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public LocalizedString DisplayName { get; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="Zaya.Primitives.LocalizedString.html">LocalizedString</a></td> <td></td> </tr> </tbody> </table> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_IconSvg.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.IconSvg%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L31">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_IconSvg_" data-uid="Zaya.Primitives.SettingDescriptor.IconSvg*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_IconSvg" data-uid="Zaya.Primitives.SettingDescriptor.IconSvg">IconSvg</h4> <div class="markdown level1 summary"><p>Gets or sets optional SVG markup for compact UI (e.g. table column headers). When set, hosts may render the icon and use <a class="xref" href="Zaya.Primitives.SettingDescriptor.html#Zaya_Primitives_SettingDescriptor_DisplayName">DisplayName</a> as a tooltip.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public string? IconSvg { get; init; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td> <td></td> </tr> </tbody> </table> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_IsRequired.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.IsRequired%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L60">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_IsRequired_" data-uid="Zaya.Primitives.SettingDescriptor.IsRequired*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_IsRequired" data-uid="Zaya.Primitives.SettingDescriptor.IsRequired">IsRequired</h4> <div class="markdown level1 summary"><p>Gets or sets a predicate that determines whether this setting must be filled before the engine can be initialized, based on the current values of all settings. Defaults to not required.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public Func<IReadOnlyDictionary<string, object?>, bool> IsRequired { get; init; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td> <td></td> </tr> </tbody> </table> <h5 id="Zaya_Primitives_SettingDescriptor_IsRequired_remarks">Remarks</h5> <div class="markdown level1 remarks"><p>Same contract as <a class="xref" href="Zaya.Primitives.SettingDescriptor.html#Zaya_Primitives_SettingDescriptor_IsVisible">IsVisible</a>: the host passes current values (keys may be absent), and re-evaluates on every change. Hosts evaluate this predicate only for settings whose <a class="xref" href="Zaya.Primitives.SettingDescriptor.html#Zaya_Primitives_SettingDescriptor_IsVisible">IsVisible</a> returned <code>true</code>. Example: <code>IsRequired = s => s.GetValueOrDefault("source") as string == "directory"</code>; unconditional: <code>IsRequired = static _ => true</code>.</p> </div> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_IsVisible.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.IsVisible%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L46">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_IsVisible_" data-uid="Zaya.Primitives.SettingDescriptor.IsVisible*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_IsVisible" data-uid="Zaya.Primitives.SettingDescriptor.IsVisible">IsVisible</h4> <div class="markdown level1 summary"><p>Gets or sets a predicate that determines whether this setting is currently relevant, based on the current values of all settings (keyed by <a class="xref" href="Zaya.Primitives.SettingDescriptor.html#Zaya_Primitives_SettingDescriptor_Key">Key</a>). Defaults to always visible.</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public Func<IReadOnlyDictionary<string, object?>, bool> IsVisible { get; init; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a>></td> <td></td> </tr> </tbody> </table> <h5 id="Zaya_Primitives_SettingDescriptor_IsVisible_remarks">Remarks</h5> <div class="markdown level1 remarks"><p>The host invokes the predicate with the dictionary of current setting values; keys may be absent when a setting has not been set — the predicate should fall back to the default value. Hosts should re-evaluate the predicate whenever any setting value changes, hide the field when it returns <code>false</code>, and skip <a class="xref" href="Zaya.Primitives.SettingDescriptor.html#Zaya_Primitives_SettingDescriptor_IsRequired">IsRequired</a> validation for hidden settings. Example: <code>IsVisible = s => s.GetValueOrDefault("source") as string == "url"</code>.</p> </div> <span class="small pull-right mobile-hide"> <span class="divider">|</span> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor_Key.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor.Key%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Edit this page</a> </span> <span class="small pull-right mobile-hide"> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L15">View Source</a> </span> <a id="Zaya_Primitives_SettingDescriptor_Key_" data-uid="Zaya.Primitives.SettingDescriptor.Key*"></a> <h4 id="Zaya_Primitives_SettingDescriptor_Key" data-uid="Zaya.Primitives.SettingDescriptor.Key">Key</h4> <div class="markdown level1 summary"><p>Gets the machine-readable key for this setting (e.g. "source", "directoryPath").</p> </div> <div class="markdown level1 conceptual"></div> <h5 class="declaration">Declaration</h5> <div class="codewrapper"> <pre><code class="lang-csharp hljs">public string Key { get; }</code></pre> </div> <h5 class="propertyValue">Property Value</h5> <table class="table table-bordered table-condensed"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td> <td></td> </tr> </tbody> </table> </article> </div> <div class="hidden-sm col-md-2" role="complementary"> <div class="sideaffix"> <div class="contribution"> <ul class="nav"> <li> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/new/main/apiSpec/new?filename=Zaya_Primitives_SettingDescriptor.md&value=---%0Auid%3A%20Zaya.Primitives.SettingDescriptor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Edit this page</a> </li> <li> <a href="https://github.com/shtrasser-dev/Zaya.Primitives/blob/main/src/Zaya.Primitives/SettingDescriptor.cs/#L10" class="contribution-link">View Source</a> </li> </ul> </div> <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix"> <h5>In this article</h5> <div></div> </nav> </div> </div> </div> </div> <footer> <div class="grad-bottom"></div> <div class="footer"> <div class="container"> <span class="pull-right"> <a href="#top">Back to top</a> </span> <span>Generated by <strong>DocFX</strong></span> </div> </div> </footer> </div> <script type="text/javascript" src="../styles/docfx.vendor.min.js"></script> <script type="text/javascript" src="../styles/docfx.js"></script> <script type="text/javascript" src="../styles/main.js"></script> </body> </html>