Class LocString
Inheritance
System.Object
LocString
Implements
System.IComparable
Assembly: Eco.Shared.dll
Syntax
public sealed class LocString : ValueType, IComparable, IEquatable<LocString>
Constructors
LocString(String)
Declaration
public LocString(string s)
Parameters
| Type |
Name |
Description |
| System.String |
s |
|
Fields
Empty
Declaration
public static readonly LocString Empty
Field Value
Properties
DebugString
Declaration
public string DebugString { get; }
Property Value
| Type |
Description |
| System.String |
|
Inlinable
Checks if LocString may be inlined (resolved to string without information lose). It is true if the LocString shouldn't be localized and wraps string.
Declaration
public bool Inlinable { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Length
Declaration
public int Length { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
NotTranslated
Returns not translated string. If System.FormattableString was used then it will be resolved to string.
Declaration
public string NotTranslated { get; }
Property Value
| Type |
Description |
| System.String |
|
Methods
ApplyParams(Dictionary<String, String>)
Declaration
public LocString ApplyParams(Dictionary<string, string> customParams)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.Dictionary<System.String, System.String> |
customParams |
|
Returns
CompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Int32 |
|
Equals(LocString)
Declaration
public bool Equals(LocString other)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object other)
Parameters
| Type |
Name |
Description |
| System.Object |
other |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
HaveUnresolvedParams()
Declaration
public bool HaveUnresolvedParams()
Returns
| Type |
Description |
| System.Boolean |
|
IsNullOrEmpty(LocString)
Declaration
public static bool IsNullOrEmpty(LocString l)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
IsSet()
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Prepend(String)
Declaration
public LocString Prepend(string prefix)
Parameters
| Type |
Name |
Description |
| System.String |
prefix |
|
Returns
ToLower()
Declaration
public LocString ToLower()
Returns
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Trim()
Declaration
Returns
TrimEnd()
Declaration
public LocString TrimEnd()
Returns
TryGetInlineValue(out String)
If the loc string is Inlinable then returns inline value which then may be used for result string building.
Declaration
public bool TryGetInlineValue(out string value)
Parameters
| Type |
Name |
Description |
| System.String |
value |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public LocString Wrap(Func<object, FormattableString> wrapper)
Parameters
| Type |
Name |
Description |
| System.Func<System.Object, System.FormattableString> |
wrapper |
|
Returns
Wrap(String, String)
Declaration
public LocString Wrap(string prefix, string suffix = "")
Parameters
| Type |
Name |
Description |
| System.String |
prefix |
|
| System.String |
suffix |
|
Returns
WrapNL(String, String)
Declaration
public LocString WrapNL(string prefix, string suffix = "")
Parameters
| Type |
Name |
Description |
| System.String |
prefix |
|
| System.String |
suffix |
|
Returns
Operators
Addition(LocString, LocString)
Declaration
public static LocString operator +(LocString left, LocString right)
Parameters
Returns
Addition(LocString, String)
Declaration
public static LocString operator +(LocString left, string right)
Parameters
| Type |
Name |
Description |
| LocString |
left |
|
| System.String |
right |
|
Returns
Addition(String, LocString)
Declaration
public static LocString operator +(string left, LocString right)
Parameters
| Type |
Name |
Description |
| System.String |
left |
|
| LocString |
right |
|
Returns
Equality(LocString, LocString)
Declaration
public static bool operator ==(LocString left, LocString right)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implicit(LocString to String)
Declaration
public static implicit operator string (LocString l)
Parameters
Returns
| Type |
Description |
| System.String |
|
Inequality(LocString, LocString)
Declaration
public static bool operator !=(LocString left, LocString right)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IComparable
System.IEquatable<>
Extension Methods