Search Results for

    Show / Hide Table of Contents

    Class LocalizerCollection<T>

    Generic localizer collection, replaces specific ones.

    Inheritance
    System.Object
    LocalizerCollection<T>
    Implements
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.Localization.Default
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class LocalizerCollection<T> : IEnumerable<T>, IEnumerable where T : ModelElementLocalizer
    Type Parameters
    Name Description
    T

    the type of localizer the collection is for.

    Constructors

    LocalizerCollection()

    Initializes a new instance of the LocalizerCollection<T> class.

    Declaration
    public LocalizerCollection()

    LocalizerCollection(LocalizerCollection<T>)

    Initializes a new instance of the LocalizerCollection<T> class.

    Declaration
    public LocalizerCollection(LocalizerCollection<T> source)
    Parameters
    Type Name Description
    LocalizerCollection<T> source

    the source to copy from.

    Properties

    Item[String]

    The indexer to the localizer.

    Declaration
    public T this[string name] { get; }
    Parameters
    Type Name Description
    System.String name

    the name of the property to look up.

    Property Value
    Type Description
    T

    Returns the PropertyLocalizer of the given name.

    Methods

    Accept(LocalizerVisitor)

    Accepts a visitor.

    Declaration
    public void Accept(LocalizerVisitor visitor)
    Parameters
    Type Name Description
    LocalizerVisitor visitor

    the visitor to accept.

    ContainsLocalizer(String)

    Returns true if the collection contains an element with the given name.

    Declaration
    public bool ContainsLocalizer(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the element to check.

    Returns
    Type Description
    System.Boolean

    Returns true if an element with the given name exists, false otherwise.

    GetEnumerator()

    Gets the specific enumerator over the properties.

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    Returns the enumerator.

    Implements
    System.Collections.Generic.IEnumerable<T>.GetEnumerator()

    MergeFrom(LocalizerCollection<T>)

    Merges changes from another localizer collection.

    Declaration
    public void MergeFrom(LocalizerCollection<T> source)
    Parameters
    Type Name Description
    LocalizerCollection<T> source

    the source to merge from.

    RemoveLocalizationsFor(String)

    Removes the localizations for the element with the given name.

    Declaration
    public bool RemoveLocalizationsFor(string name)
    Parameters
    Type Name Description
    System.String name

    The name of the element to remove the localizations for.

    Returns
    Type Description
    System.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.

    Declaration
    public bool TryGetLocalizer(string name, out T localizer)
    Parameters
    Type Name Description
    System.String name

    the name of the localizer to retrieve.

    T localizer

    the result localizer.

    Returns
    Type Description
    System.Boolean

    True if the localizer could be fetched, false otherwise.

    Explicit Interface Implementations

    IEnumerable.GetEnumerator()

    Gets the generic enumerator over the properties.

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    Returns the enumerator.

    Implements
    System.Collections.IEnumerable.GetEnumerator()

    Extension Methods

    DistinctCultureCollectVisitorHelper.GetCultures<T>(LocalizerCollection<T>)
    In This Article
    Back to top Copyright © 2020 software architects gmbh