Search Results for

    Show / Hide Table of Contents

    Class Culture

    Represents a culture. A culture can also have a fallback culture.

    Inheritance
    System.Object
    DynamicObject
    NamedDynamicObject
    ModelElement
    Culture
    Implements
    System.Dynamic.IDynamicMetaObjectProvider
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IDataErrorInfo
    Inherited Members
    ModelElement.IsValidIdentifier(String)
    ModelElement.OnDeserializing(StreamingContext)
    ModelElement.Attach(ModelElement)
    ModelElement.Detach()
    ModelElement.SetOwnershipPrefix(String)
    ModelElement.UpdateChildren(NotifyCollectionChangedEventArgs)
    ModelElement.SetPersistBehavior(PersistBehavior)
    ModelElement.SetName(String)
    ModelElement.SetOwnership(Ownership)
    ModelElement.ElementGuid
    ModelElement.Name
    ModelElement.Parent
    ModelElement.Children
    ModelElement.PersistBehavior
    ModelElement.IsFullPersistBehavior
    ModelElement.IsNonePersistBehavior
    ModelElement.IsSystemElement
    ModelElement.IsApplicationSpecificElement
    ModelElement.IsUserElement
    ModelElement.IsSystemOrApplicationSpecificElement
    ModelElement.InvariantFriendlyName
    ModelElement.CreationVersion
    ModelElement.LastUpdateVersion
    ModelElement.Error
    ModelElement.ErrorSummary
    ModelElement.IsValid
    ModelElement.Ownership
    ModelElement.OwnershipPrefix
    ModelElement.NonPrefixedName
    NamedDynamicObject.OnPropertyChanged(String)
    NamedDynamicObject.PropertyChanged
    DynamicObject.SetMember(String, Object)
    DynamicObject.GetMetaObject(Expression)
    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.DataModel
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class Culture : ModelElement, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo

    Constructors

    Culture()

    Initializes a new instance of the Culture class

    Declaration
    public Culture()

    Culture(IEnumerable<KeyValuePair<Object, Object>>)

    Initializes a new instance of the Culture class.

    Declaration
    public Culture(IEnumerable<KeyValuePair<object, object>> properties)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, System.Object>> properties

    Collection of properties.

    Remarks

    You can use this constructor to initialize a new instance of the ModelRelation class by specifying its properties in a list of key/value pairs. This is especially useful for dynamic languages like python.

    Culture(Culture)

    Initializes a new instance of the Culture class

    Declaration
    public Culture(Culture element)
    Parameters
    Type Name Description
    Culture element

    The culture to copy.

    Remarks

    This copy constructor creates copies of all value-typed properties. StorageColumns and Permissions from element are just added to the corresponding collections of the new Culture. No copying is performed.

    Properties

    DatabaseName

    Gets the database column name.

    Declaration
    public string DatabaseName { get; }
    Property Value
    Type Description
    System.String

    FallbackCulture

    Gets the fallback culture.

    Declaration
    public Culture FallbackCulture { get; }
    Property Value
    Type Description
    Culture

    The fallback culture.

    IsDefaultCulture

    Gets a value indicating whether this instance is default culture.

    Declaration
    public bool IsDefaultCulture { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance is default culture; otherwise, false.

    Methods

    Accept(ModelElementVisitor)

    Dispatches the correct visit handler in the visitor.

    Declaration
    public override void Accept(ModelElementVisitor visitor)
    Parameters
    Type Name Description
    ModelElementVisitor visitor

    the visitor to accept.

    Overrides
    ModelElement.Accept(ModelElementVisitor)

    BuildFallbackCultures(IEnumerable<Culture>)

    builds the string fallback dictionary.

    Declaration
    public static Dictionary<string, string> BuildFallbackCultures(IEnumerable<Culture> cultures)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<Culture> cultures

    the cultures to convert to a dictionary.

    Returns
    Type Description
    System.Collections.Generic.Dictionary<System.String, System.String>

    Returns a dictionary containing the fallback culture tree, represented as a key value dictionary.

    GetMember(String)

    Gets the value of a CLR property.

    Declaration
    public override object GetMember(string name)
    Parameters
    Type Name Description
    System.String name

    Name of the member to get.

    Returns
    Type Description
    System.Object

    Reference to the dynamic member.

    Overrides
    DynamicObject.GetMember(String)

    RemoveFallbackCulture()

    Removes the fallback culture.

    Declaration
    public void RemoveFallbackCulture()

    SetFallbackCulture(Culture)

    Sets the fallback culture.

    Declaration
    public void SetFallbackCulture(Culture fallbackCulture)
    Parameters
    Type Name Description
    Culture fallbackCulture

    The fallback culture.

    Validate(ref IList<PropertyValidationMessage>, Boolean)

    Validates a ModelElement according to certain rules.

    Declaration
    protected override void Validate(ref IList<PropertyValidationMessage> messages, bool validateRecursively)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<PropertyValidationMessage> messages

    An list of strings that stores that picks up the validation errors of a model element.

    System.Boolean validateRecursively

    Indicates wheter to validate only the current model element or all its children (recursively) as well.

    Overrides
    ModelElement.Validate(ref IList<PropertyValidationMessage>, Boolean)
    Remarks

    The rules the ModelElement is validated against are dependent on the type of ModelElement that is validated. This method can be overridden to provide custom validation behavior for subclasses of ModelElement

    When Validate(ref IList<PropertyValidationMessage>, Boolean) is called on a modelelement, the Validate(ref IList<PropertyValidationMessage>, Boolean) method of all children attatched to the modelelemnt are validated recursivly.

    In This Article
    • Constructors
      • Culture()
      • Culture(IEnumerable<KeyValuePair<Object, Object>>)
      • Culture(Culture)
    • Properties
      • DatabaseName
      • FallbackCulture
      • IsDefaultCulture
    • Methods
      • Accept(ModelElementVisitor)
      • BuildFallbackCultures(IEnumerable<Culture>)
      • GetMember(String)
      • RemoveFallbackCulture()
      • SetFallbackCulture(Culture)
      • Validate(ref IList<PropertyValidationMessage>, Boolean)
    Back to top Copyright © 2020 software architects gmbh