Table of Contents

Class Culture

Inheritance
Culture
Implements
Inherited Members
Namespace
TabularEditor.TOMWrapper
Assembly
TOMWrapper.dll

Represents a user culture. It is a child of a Model object, used for translating strings and formatting values.

public sealed class Culture : TabularNamedObject, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
Extension Methods

Properties

Altered

public bool? Altered { get; set; }

Property Value

Type Description
bool?

Annotations

The collection of Annotations on the current Culture.

[Browsable(true)]
public AnnotationCollection Annotations { get; }

Property Value

Type Description
AnnotationCollection

Content

A string that contains the natural language synonyms.

[Browsable(true)]
public string Content { get; set; }

Property Value

Type Description
string

ContentType

Specifies the type of the linguistic metadata from the Content property. E.g. XML or JSON.

[Browsable(true)]
public ContentType? ContentType { get; }

Property Value

Type Description
ContentType?

DisplayName

[Browsable(false)]
public string DisplayName { get; }

Property Value

Type Description
string

ExtendedProperties

The collection of Extended Properties on the current Culture.

public ExtendedPropertyCollection ExtendedProperties { get; }

Property Value

Type Description
ExtendedPropertyCollection

Name

The name of this object. Warning: Changing the name can break formula logic, if Automatic Formula Fix-up is disabled.

[TypeConverter(typeof(CultureConverter))]
public override string Name { get; set; }

Property Value

Type Description
string

ObjectTranslations

[Browsable(false)]
public ObjectTranslationCollection ObjectTranslations { get; }

Property Value

Type Description
ObjectTranslationCollection

Parent

The parent Model of the current Culture.

public Model Parent { get; }

Property Value

Type Description
Model

StatsColumnCaptions

[Browsable(true)]
public string StatsColumnCaptions { get; }

Property Value

Type Description
string

StatsColumnDisplayFolders

[Browsable(true)]
public string StatsColumnDisplayFolders { get; }

Property Value

Type Description
string

StatsHierarchyCaptions

[Browsable(true)]
public string StatsHierarchyCaptions { get; }

Property Value

Type Description
string

StatsHierarchyDisplayFolders

[Browsable(true)]
public string StatsHierarchyDisplayFolders { get; }

Property Value

Type Description
string

StatsLevelCaptions

[Browsable(true)]
public string StatsLevelCaptions { get; }

Property Value

Type Description
string

StatsMeasureCaptions

[Browsable(true)]
public string StatsMeasureCaptions { get; }

Property Value

Type Description
string

StatsMeasureDisplayFolders

[Browsable(true)]
public string StatsMeasureDisplayFolders { get; }

Property Value

Type Description
string

StatsTableCaptions

[Browsable(true)]
public string StatsTableCaptions { get; }

Property Value

Type Description
string

Unassigned

[Browsable(false)]
public bool Unassigned { get; }

Property Value

Type Description
bool

Methods

CanEditName()

protected override bool CanEditName()

Returns

Type Description
bool

ClearAnnotations()

Removes all annotations from this object.

public void ClearAnnotations()

ClearExtendedProperties()

Removes all Extended Properties from this object.

public void ClearExtendedProperties()

Clone(string)

Creates an exact copy of this Culture object.

public Culture Clone(string newName = null)

Parameters

Type Name Description
string newName

Returns

Type Description
Culture

CreateNew(Model, string)

Creates a new Culture and adds it to the parent Model. Also creates the underlying metadataobject and adds it to the TOM tree.

public static Culture CreateNew(Model parent, string name = null)

Parameters

Type Name Description
Model parent
string name

Returns

Type Description
Culture

GetAnnotation(int)

Gets the value of the annotation with the given index, assuming it exists.

public string GetAnnotation(int index)

Parameters

Type Name Description
int index

Returns

Type Description
string

GetAnnotation(string)

Gets the value of the annotation with the given name. Returns null if no such annotation exists.

public string GetAnnotation(string name)

Parameters

Type Name Description
string name

Returns

Type Description
string

GetAnnotations()

Gets a collection of all annotation names on the current Culture.

public IEnumerable<string> GetAnnotations()

Returns

Type Description
IEnumerable<string>

GetAnnotationsCount()

Gets the number of annotations on the current Culture.

public int GetAnnotationsCount()

Returns

Type Description
int

GetExtendedProperties()

Gets a collection of all ExtendedProperty names on the current object.

public IEnumerable<string> GetExtendedProperties()

Returns

Type Description
IEnumerable<string>

GetExtendedProperty(int)

Gets the value of the ExtendedProperty with the given index, assuming it exists.

public string GetExtendedProperty(int index)

Parameters

Type Name Description
int index

Returns

Type Description
string

GetExtendedProperty(string)

Gets the value of the ExtendedProperty with the given name. Returns null if no such ExtendedProperty exists.

public string GetExtendedProperty(string name)

Parameters

Type Name Description
string name

Returns

Type Description
string

GetExtendedPropertyCount()

Gets the number of ExtendedProperties on the current object.

public int GetExtendedPropertyCount()

Returns

Type Description
int

GetExtendedPropertyType(int)

Gets the type of the ExtendedProperty with the given index, assuming it exists.

public ExtendedPropertyType GetExtendedPropertyType(int index)

Parameters

Type Name Description
int index

Returns

Type Description
ExtendedPropertyType

GetExtendedPropertyType(string)

Gets the type of the ExtendedProperty with the given name, assuming it exists.

public ExtendedPropertyType GetExtendedPropertyType(string name)

Parameters

Type Name Description
string name

Returns

Type Description
ExtendedPropertyType

GetNewAnnotationName()

Returns a unique name for a new annotation.

public string GetNewAnnotationName()

Returns

Type Description
string

GetNewExtendedPropertyName()

Returns a unique name for a new ExtendedProperty.

public string GetNewExtendedPropertyName()

Returns

Type Description
string

HasAnnotation(string)

Returns true if an annotation with the given name exists. Otherwise false.

public bool HasAnnotation(string name)

Parameters

Type Name Description
string name

Returns

Type Description
bool

HasExtendedProperty(string)

Returns true if an ExtendedProperty with the given name exists. Otherwise false.

public bool HasExtendedProperty(string name)

Parameters

Type Name Description
string name

Returns

Type Description
bool

Init()

Derived members should override this method to instantiate child objects

protected override void Init()

OnPropertyChanged(string, object, object)

Fired after a property is changed

protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)

Parameters

Type Name Description
string propertyName
object oldValue
object newValue

RemoveAnnotation(string)

Remove an annotation by the given name.

public void RemoveAnnotation(string name)

Parameters

Type Name Description
string name

RemoveExtendedProperty(string)

Remove an ExtendedProperty by the given name.

public void RemoveExtendedProperty(string name)

Parameters

Type Name Description
string name

SetAnnotation(int, string)

Sets the value of the annotation with the given index, assuming it exists.

public void SetAnnotation(int index, string value)

Parameters

Type Name Description
int index
string value

SetAnnotation(string, string)

Sets the value of the annotation having the given name. If no such annotation exists, it will be created. If value is set to null, the annotation will be removed.

public void SetAnnotation(string name, string value)

Parameters

Type Name Description
string name
string value

SetExtendedProperty(int, string, ExtendedPropertyType)

Sets the value of the ExtendedProperty with the given index, optionally specifiying the type (string or JSON) of the ExtendedProperty.

public void SetExtendedProperty(int index, string value, ExtendedPropertyType type)

Parameters

Type Name Description
int index
string value
ExtendedPropertyType type

SetExtendedProperty(string, string, ExtendedPropertyType)

Sets the value of the ExtendedProperty having the given name. If no such ExtendedProperty exists, it will be created. If value is set to null, the ExtendedProperty will be removed.

public void SetExtendedProperty(string name, string value, ExtendedPropertyType type)

Parameters

Type Name Description
string name
string value
ExtendedPropertyType type

ShouldSerializeAltered()

public bool ShouldSerializeAltered()

Returns

Type Description
bool