Table of Contents

Class ConstsManager

Namespace
SunamoDevCode
Assembly
SunamoDevCode.dll

Manager for working with constant definitions in XlfKeys.cs file

public class ConstsManager
Inheritance
ConstsManager
Inherited Members
Extension Methods

Constructors

ConstsManager(string, Func<string, bool>)

Initializes a new instance of ConstsManager

public ConstsManager(string pathXlfKeys, Func<string, bool> shouldIncludeInXlfKeys)

Parameters

pathXlfKeys string

Path to XlfKeys.cs file

shouldIncludeInXlfKeys Func<string, bool>

Function to determine if key should be in XlfKeys

Properties

PathXlfKeys

Path to XlfKeys.cs file

public string PathXlfKeys { get; }

Property Value

string

Methods

AddConsts(List<string>, List<string>?)

Add to XlfKeys.cs from xlf Must manually call XlfResourcesH.SaveResouresToRL(BasePathsHelper.sunamoProject) before Called externally from MiAddTranslationWhichIsntInKeys_Click

public Task AddConsts(List<string> keysAll, List<string>? valuesAll = null)

Parameters

keysAll List<string>

List of keys to add

valuesAll List<string>

Optional list of values corresponding to keys. If null, keys will be used as values.

Returns

Task

AddKeysConsts(List<string>, int, List<string>, List<string>?)

Add constant keys to the generated code

public void AddKeysConsts(List<string> keysAll, int first, List<string> lines, List<string>? valuesAll = null)

Parameters

keysAll List<string>

List of all keys to add

first int

Position where to insert the generated code

lines List<string>

List of source code lines to modify

valuesAll List<string>

Optional list of values. If null, keys will be used as values.

GetConsts()

Get consts which exists in XlfKeys.cs

public Task<OutRef3DC<List<string>, int, List<string>>> GetConsts()

Returns

Task<OutRef3DC<List<string>, int, List<string>>>

Tuple containing keys, first line index, and all lines