Class Culture
Represents a user culture. It is a child of a Model object, used for translating strings and formatting values.
Assembly: TOMWrapper.dll
Syntax
public sealed class Culture : TabularNamedObject, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, IClonableObject
Properties
Altered
Declaration
public bool? Altered { get; set; }
Property Value
Annotations
The collection of Annotations on the current Culture.
Declaration
[Browsable(true)]
public AnnotationCollection Annotations { get; }
Property Value
Content
A string that contains the natural language synonyms.
Declaration
[Browsable(true)]
public string Content { get; set; }
Property Value
ContentType
Specifies the type of the linguistic metadata from the Content property. E.g. XML or JSON.
Declaration
[Browsable(true)]
public ContentType? ContentType { get; }
Property Value
DisplayName
Declaration
[Browsable(false)]
public string DisplayName { get; }
Property Value
ExtendedProperties
The collection of Extended Properties on the current Culture.
Declaration
public ExtendedPropertyCollection ExtendedProperties { get; }
Property Value
Name
The name of this object. Warning: Changing the name can break formula logic, if Automatic Formula Fix-up is disabled.
Declaration
[TypeConverter(typeof(CultureConverter))]
public override string Name { get; set; }
Property Value
Overrides
ObjectTranslations
Declaration
[Browsable(false)]
public ObjectTranslationCollection ObjectTranslations { get; }
Property Value
Type |
Description |
ObjectTranslationCollection |
|
Parent
The parent Model of the current Culture.
Declaration
public Model Parent { get; }
Property Value
StatsColumnCaptions
Declaration
[Browsable(true)]
public string StatsColumnCaptions { get; }
Property Value
StatsColumnDisplayFolders
Declaration
[Browsable(true)]
public string StatsColumnDisplayFolders { get; }
Property Value
StatsHierarchyCaptions
Declaration
[Browsable(true)]
public string StatsHierarchyCaptions { get; }
Property Value
StatsHierarchyDisplayFolders
Declaration
[Browsable(true)]
public string StatsHierarchyDisplayFolders { get; }
Property Value
StatsLevelCaptions
Declaration
[Browsable(true)]
public string StatsLevelCaptions { get; }
Property Value
StatsMeasureCaptions
Declaration
[Browsable(true)]
public string StatsMeasureCaptions { get; }
Property Value
StatsMeasureDisplayFolders
Declaration
[Browsable(true)]
public string StatsMeasureDisplayFolders { get; }
Property Value
StatsTableCaptions
Declaration
[Browsable(true)]
public string StatsTableCaptions { get; }
Property Value
Unassigned
Declaration
[Browsable(false)]
public bool Unassigned { get; }
Property Value
Methods
CanEditName()
Declaration
protected override bool CanEditName()
Returns
Overrides
ClearAnnotations()
Removes all annotations from this object.
Declaration
public void ClearAnnotations()
ClearExtendedProperties()
Removes all Extended Properties from this object.
Declaration
public void ClearExtendedProperties()
Clone(string)
Creates an exact copy of this Culture object.
Declaration
public Culture Clone(string newName = null)
Parameters
Type |
Name |
Description |
string |
newName |
|
Returns
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.
Declaration
public static Culture CreateNew(Model parent, string name = null)
Parameters
Returns
GetAnnotation(int)
Gets the value of the annotation with the given index, assuming it exists.
Declaration
public string GetAnnotation(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetAnnotation(string)
Gets the value of the annotation with the given name. Returns null if no such annotation exists.
Declaration
public string GetAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetAnnotations()
Gets a collection of all annotation names on the current Culture.
Declaration
public IEnumerable<string> GetAnnotations()
Returns
GetAnnotationsCount()
Gets the number of annotations on the current Culture.
Declaration
public int GetAnnotationsCount()
Returns
GetExtendedProperties()
Gets a collection of all ExtendedProperty names on the current object.
Declaration
public IEnumerable<string> GetExtendedProperties()
Returns
GetExtendedProperty(int)
Gets the value of the ExtendedProperty with the given index, assuming it exists.
Declaration
public string GetExtendedProperty(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedProperty(string)
Gets the value of the ExtendedProperty with the given name. Returns null if no such ExtendedProperty exists.
Declaration
public string GetExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetExtendedPropertyCount()
Gets the number of ExtendedProperties on the current object.
Declaration
public int GetExtendedPropertyCount()
Returns
GetExtendedPropertyType(int)
Gets the type of the ExtendedProperty with the given index, assuming it exists.
Declaration
public ExtendedPropertyType GetExtendedPropertyType(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedPropertyType(string)
Gets the type of the ExtendedProperty with the given name, assuming it exists.
Declaration
public ExtendedPropertyType GetExtendedPropertyType(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetNewAnnotationName()
Returns a unique name for a new annotation.
Declaration
public string GetNewAnnotationName()
Returns
GetNewExtendedPropertyName()
Returns a unique name for a new ExtendedProperty.
Declaration
public string GetNewExtendedPropertyName()
Returns
HasAnnotation(string)
Returns true if an annotation with the given name exists. Otherwise false.
Declaration
public bool HasAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
HasExtendedProperty(string)
Returns true if an ExtendedProperty with the given name exists. Otherwise false.
Declaration
public bool HasExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
Init()
Derived members should override this method to instantiate child objects
Declaration
protected override void Init()
Overrides
OnPropertyChanged(string, object, object)
Fired after a property is changed
Declaration
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
Overrides
RemoveAnnotation(string)
Remove an annotation by the given name.
Declaration
public void RemoveAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
RemoveExtendedProperty(string)
Remove an ExtendedProperty by the given name.
Declaration
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.
Declaration
public void SetAnnotation(int index, string value)
Parameters
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.
Declaration
public void SetAnnotation(string name, string value)
Parameters
SetExtendedProperty(int, string, ExtendedPropertyType)
Sets the value of the ExtendedProperty with the given index, optionally specifiying the type (string or JSON) of the ExtendedProperty.
Declaration
public void SetExtendedProperty(int index, string value, ExtendedPropertyType type)
Parameters
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.
Declaration
public void SetExtendedProperty(string name, string value, ExtendedPropertyType type)
Parameters
ShouldSerializeAltered()
Declaration
public bool ShouldSerializeAltered()
Returns
Implements
Extension Methods