Click or drag to resize
weroSoft AG, Software
LocalizedPropertyTPropertyType Class
The documentation is integral part of the weroSoft product documentation. This part is intended to be used by developers only.
Represent a localized property.
Inheritance Hierarchy
SystemObject
  WeroSoft.CommonTypesLocalizedPropertyTPropertyType
    WeroSoft.CommonTypesLocalizedString

Namespace:  WeroSoft.CommonTypes
Assembly:  WeroSoft.Core.Library (in WeroSoft.Core.Library.dll) Version: 3.0 Pre-Release
Syntax
C#
[SerializableAttribute]
public class LocalizedProperty<TPropertyType> : ILocalizedProperty, 
	IDictionary<string, TPropertyType>, ICollection<KeyValuePair<string, TPropertyType>>, 
	IEnumerable<KeyValuePair<string, TPropertyType>>, IEnumerable

Type Parameters

TPropertyType
Type of property to localize.
Remarks
A localized property supports to store data in different languages. It is possible to store numbers, texts, colors, pictures and many more. The localized property is basically implemented generic. That generic argument shall represent the type of value to store in a specific language. LocalizedString to store only texts.

Take a look on following code how to define a localized property.

public LocalizedProperty<int> MyProperty { get; set; } = new LocalizedProperty<int>();

We recommend to initialize the localized property by object creation. So it will be every time accessible and you don't have a NullReferenceException.

The LocalizedPropertyTPropertyType type exposes the following members.

Constructors
  NameDescription
Public methodLocalizedPropertyTPropertyType
Initializes a new instance of the LocalizedPropertyTPropertyType class
Top
Properties
Methods
  NameDescription
Public methodAdd(KeyValuePairString, TPropertyType)
Public methodAdd(String, TPropertyType)
Public methodClear
Public methodContains
Public methodContainsKey
Public methodCopyTo
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGet
Get value from current culture.
Public methodGet(CultureInfo)
Gets a value.
Public methodGet(String)
Gets a value.
Public methodGetContainingCultureInfos
Gets all available culture infos.
Public methodGetContainingLanguages
Get all available languages.
Public methodGetContainingValues
Gets all containing values.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Get value from current culture.
Public methodGetValue(CultureInfo)
Get property value in specified culture.
Public methodGetValue(String)
Gets a property value in specified language.
Public methodGetValues
Gets an enumerable of localized property values.
Public methodHasContent
Gets whether at least one value is set.
Public methodHasContent(CultureInfo)
Gets whether the property has a value for cultureInfo.
Public methodHasContent(String)
Gets whether the property has a value for the defined language.
Public methodHasNotInvariantContent
Gets whether any value is set in a language other than the invariant.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemove(CultureInfo)
Removes an entry by language.
Public methodRemove(KeyValuePairString, TPropertyType)
Public methodRemove(String)
Removes an entry by language.
Public methodRemoveAllExceptCurrentCulture
Remove all values excepting that from current culture.
Public methodSet(TPropertyType)
Sets the value in current language.
Public methodSet(Object)
Sets the content of the localized property by the given thread neutral culture language.
Public methodSet(CultureInfo, TPropertyType)
Add or updates an value.
Public methodSet(CultureInfo, Object)
Add or updates an value.
Public methodSet(String, TPropertyType)
Add or updates an value.
Public methodSet(String, Object)
Add or updates an value.
Public methodSet(Type, String, String)
Adds a value from resources.
Public methodSort
Sorts the values of localized property.
Public methodSort(IComparerTPropertyType)
Sorts the values of localized property.
Public methodSort(String)
Sorts the values in order of given language code.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Public methodTryGetValue
Gets the value associated with the specified key.
Top
Extension Methods
  NameDescription
Public Extension MethodClone(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodCloneT(CloneWorkingMode, IEnumerableType)Overloaded.
Clones an object by serialization.
(Defined by RuntimeExtensions.)
Public Extension MethodConvert (Defined by DataConverterExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String)Overloaded.
Creates a data entry into a string builder according to the giving parameters.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry for a data element.
(Defined by TraceExtensions.)
Public Extension MethodCreateTraceDataEntry(StringBuilder, SourceLevels, TraceableKind, String, String, Int32)Overloaded.
Creates a trace entry into a string builder.
(Defined by TraceExtensions.)
Public Extension MethodDynamicCast
Dynamically casts a reference to another type.
(Defined by TypeManagerHelper.)
Public Extension MethodExtractSystemParametersFromTrigger
Extracts the system parameters from a collection of trigger parameter and transform them to a dictionary using string keys and string values.
(Defined by TriggerExtensions.)
Public Extension MethodGetFieldValue(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetFieldValueT(String)Overloaded.
Gets the data object held by a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValue(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodGetPropertyValueT(String)Overloaded.
Gets the data object held by a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodInject(Type, Object)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInject(Type, Object, Boolean)Overloaded.
Injects all fields or properties which are marked with the defined attribute type name.
(Defined by DataInjection.)
Public Extension MethodInjectField
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInjectProperty(String, Type, Object)Overloaded.
Injects a value to a property within a data object.
(Defined by DataInjection.)
Public Extension MethodInvoke(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodInvokeTResult(String, Object)Overloaded.
Invokes a method on an object by reflection.
(Defined by UnitTest.)
Public Extension MethodIsContentEqualT
Checks the content of localized property using the "Equals" method.
(Defined by LocalizedPropertyExtensions.)
Public Extension MethodSetFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetPropertyValue
Sets the data object on a defined property of a particular type.
(Defined by UnitTest.)
Public Extension MethodSetReadOnlyFieldValue
Sets the data object on a defined field of a particular type.
(Defined by UnitTest.)
Public Extension MethodTryInjectProperty
Tries to Inject a value to a property within a data object.
(Defined by DataInjection.)
Top
See Also