Class LocalizerCollection<T>
- Assembly
- TimeCockpit.Data.dll
Generic localizer collection, replaces specific ones.
public class LocalizerCollection<T> : IEnumerable<T>, IEnumerable where T : ModelElementLocalizer
Type Parameters
Tthe type of localizer the collection is for.
- Inheritance
-
ObjectLocalizerCollection<T>
- Implements
-
IEnumerable<T>IEnumerable
- Inherited Members
-
Object.ToString()Object.Equals(Object)Object.Equals(Object, Object)Object.ReferenceEquals(Object, Object)Object.GetHashCode()Object.GetType()Object.MemberwiseClone()
- Extension Methods
Constructors
LocalizerCollection()
Initializes a new instance of the LocalizerCollection<T> class.
public LocalizerCollection()
LocalizerCollection(LocalizerCollection<T>)
Initializes a new instance of the LocalizerCollection<T> class.
public LocalizerCollection(LocalizerCollection<T> source)
Parameters
sourceLocalizerCollection<T>the source to copy from.
Properties
Item[String]
The indexer to the localizer.
public T this[string name] { get; }
Parameters
nameStringthe name of the property to look up.
Property Value
- T
Returns the PropertyLocalizer of the given name.
Methods
Accept(LocalizerVisitor)
Accepts a visitor.
public void Accept(LocalizerVisitor visitor)
Parameters
visitorLocalizerVisitorthe visitor to accept.
ContainsLocalizer(String)
Returns true if the collection contains an element with the given name.
public bool ContainsLocalizer(string name)
Parameters
nameStringThe name of the element to check.
Returns
- Boolean
Returns true if an element with the given name exists, false otherwise.
GetEnumerator()
Gets the specific enumerator over the properties.
public IEnumerator<T> GetEnumerator()
Returns
- IEnumerator<T>
Returns the enumerator.
MergeFrom(LocalizerCollection<T>)
Merges changes from another localizer collection.
public void MergeFrom(LocalizerCollection<T> source)
Parameters
sourceLocalizerCollection<T>the source to merge from.
RemoveLocalizationsFor(String)
Removes the localizations for the element with the given name.
public bool RemoveLocalizationsFor(string name)
Parameters
nameStringThe name of the element to remove the localizations for.
Returns
- Boolean
Returns true if the element was contained and removed, false if it was not contained.
TryGetLocalizer(String, out T)
Forwards the call to the internal collection.
public bool TryGetLocalizer(string name, out T localizer)
Parameters
nameStringthe name of the localizer to retrieve.
localizerTthe result localizer.
Returns
- Boolean
True if the localizer could be fetched, false otherwise.
Explicit Interface Implementations
IEnumerable.GetEnumerator()
Gets the generic enumerator over the properties.
IEnumerator IEnumerable.GetEnumerator()
Returns
- IEnumerator
Returns the enumerator.