FreeRealmsLocaleTools FreeRealmsLocaleTools
FreeRealmsLocaleTools FreeRealmsLocaleTools
DocFX + Singulink = ♥

Search Results for

    Method UpdateEntries

    UpdateEntries(string, string)

    Replaces the text of all entries that have the specified old text with the new text.

    Declaration
    public int UpdateEntries(string oldText, string newText)
    Parameters
    Type Name Description
    string oldText

    The text that will be replaced.

    string newText

    The text that will replace all occurrences of oldText.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException

    UpdateEntries(Func<LocaleEntry, bool>, string)

    Replaces the text from all entries that match the specified predicate with the specified text.

    Declaration
    public int UpdateEntries(Func<LocaleEntry, bool> predicate, string text)
    Parameters
    Type Name Description
    Func<LocaleEntry, bool> predicate

    A function to test each locale entry for a condition.

    string text

    The text that will replace all entries matching predicate.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException

    UpdateEntries(Func<LocaleEntry, bool>, Func<LocaleEntry, string>)

    Replaces the text from all entries that match the specified predicate with the text from the given selector.

    Declaration
    public int UpdateEntries(Func<LocaleEntry, bool> predicate, Func<LocaleEntry, string> selector)
    Parameters
    Type Name Description
    Func<LocaleEntry, bool> predicate

    A function to test each locale entry for a condition.

    Func<LocaleEntry, string> selector

    A transform function to apply to matching entries' text.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException

    UpdateEntries(IEnumerable<string>, IEnumerable<string>)

    Replaces the text of entries matching the first sequence with the corresponding text from the second sequence.

    Declaration
    public int UpdateEntries(IEnumerable<string> first, IEnumerable<string> second)
    Parameters
    Type Name Description
    IEnumerable<string> first

    A collection of strings whose text will be replaced.

    IEnumerable<string> second

    A collection of text replacements for strings in first.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException

    UpdateEntries(IEnumerable<(string, string)>)

    Replaces the text of entries matching the first item with the second item in the sequence.

    Declaration
    public int UpdateEntries(IEnumerable<(string, string)> items)
    Parameters
    Type Name Description
    IEnumerable<(string, string)> items

    A collection of tuples containing pairs of (oldText, newText) to replace.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException

    UpdateEntries(IDictionary<string, string>)

    Replaces the text of all entries matching keys in the dictionary with the corresponding values.

    Declaration
    public int UpdateEntries(IDictionary<string, string> replacements)
    Parameters
    Type Name Description
    IDictionary<string, string> replacements

    A dictionary mapping text to replacement text.

    Returns
    Type Description
    int

    The number of locale entries with text replaced.

    Remarks

    The stored entries can be written with any of the WriteEntries() methods.

    Exceptions
    Type Condition
    ArgumentNullException