Class MultiplePicklistFieldValue
Represents a field value, which is a combination of a field name, a field value type, and the actual field values. This class is abstract.
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
public class MultiplePicklistFieldValue : FieldValue
Constructors
MultiplePicklistFieldValue()
Initializes a new instance with default values. Required for serialization.
Declaration
public MultiplePicklistFieldValue()
MultiplePicklistFieldValue(MultiplePicklistFieldValue)
Initializes a new instance of the MultiplePicklistFieldValue class from another instance.
Declaration
public MultiplePicklistFieldValue(MultiplePicklistFieldValue other)
Parameters
Type | Name | Description |
---|---|---|
MultiplePicklistFieldValue | other | The other instance. |
MultiplePicklistFieldValue(string)
Initializes a new instance with the specified field name.
Declaration
public MultiplePicklistFieldValue(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The field name. |
MultiplePicklistFieldValue(string, ICollection<PicklistItem>)
Initializes a new instance of the MultiplePicklistFieldValue class with the specified field name and values.
Declaration
public MultiplePicklistFieldValue(string name, ICollection<PicklistItem> values)
Parameters
Type | Name | Description |
---|---|---|
string | name | The field name. |
ICollectionPicklistItem | values | The values. |
Properties
ValueType
Gets the field value type.
Declaration
public override FieldValueType ValueType { get; set; }
Property Value
Type | Description |
---|---|
FieldValueType |
Overrides
Values
Gets or sets the values for this instance.
Declaration
[DataMember]
public List<PicklistItem> Values { get; set; }
Property Value
Type | Description |
---|---|
ListPicklistItem |
Methods
Add(FieldValue)
Adds another field value to the current value. The other value must be of the same type.
Declaration
public override bool Add(FieldValue rhs)
Parameters
Type | Name | Description |
---|---|---|
FieldValue | rhs | The field value to add. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Add(PicklistItem)
Adds a new picklist value to this instance's value list.
Declaration
public bool Add(PicklistItem v)
Parameters
Type | Name | Description |
---|---|---|
PicklistItem | v | The value to add. |
Returns
Type | Description |
---|---|
bool | true if this instance was changed, false otherwise. |
Add(string)
Adds another string to this instance's value list, if this instance is of any of the multiple valued types.
Declaration
public override bool Add(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s | The new value to be added. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Clear()
Resets this instance to the default value.
Declaration
public override void Clear()
Overrides
Duplicate()
Creates a new instance that is a deep copy of this instance.
Declaration
public override FieldValue Duplicate()
Returns
Type | Description |
---|---|
FieldValue | A new instance that is a deep copy of this instance. |
Overrides
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
GetValueString()
Compute a string which represents the field value without the field name in a way which can be reversed through parsing. This should only be used internally by the field expression parser. UI-level presentation should use the field value's .ToString() method to get the field value display string.
Declaration
public override string GetValueString()
Returns
Type | Description |
---|---|
string | A serialized string representation of the field value, which is suitable for persisting, and can be parsed through Parse(string). |
Overrides
HasValue(PicklistItem)
Determines if this instance contains the specified picklist value.
Declaration
public bool HasValue(PicklistItem v)
Parameters
Type | Name | Description |
---|---|---|
PicklistItem | v | The value. |
Returns
Type | Description |
---|---|
bool | true if this instance contains v, false otherwise. |
HasValue(string)
Determines if this instance contains the specified picklist value.
Declaration
public bool HasValue(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s | The value name. |
Returns
Type | Description |
---|---|
bool | true if this instance contains a value with the given name, false otherwise. |
HasValues(MultiplePicklistFieldValue)
Determines if this instance contains all the values of another instance. Note that this property is not necessarily symmetric.
Declaration
public bool HasValues(MultiplePicklistFieldValue other)
Parameters
Type | Name | Description |
---|---|---|
MultiplePicklistFieldValue | other | The other instance. |
Returns
Type | Description |
---|---|
bool | true if this instance contains all the values of other, false otherwise. |
Merge(FieldValue)
Merges this instance with another field value, which must be of the same type.
Declaration
public override bool Merge(FieldValue rhs)
Parameters
Type | Name | Description |
---|---|---|
FieldValue | rhs | The object to merge with. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Parse(string)
Initializes this instance from a string (deserialization).
Declaration
public override void Parse(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s | The string that contains the serialized form. |
Overrides
Remove(PicklistItem)
Removes a picklist value from this instance's value list.
Declaration
public bool Remove(PicklistItem v)
Parameters
Type | Name | Description |
---|---|---|
PicklistItem | v | The value. |
Returns
Type | Description |
---|---|
bool |
Remove(string)
Removes a picklist value from this instance's value list.
Declaration
public bool Remove(string s)
Parameters
Type | Name | Description |
---|---|---|
string | s | The value name. |
Returns
Type | Description |
---|---|
bool |
Substract(FieldValue)
Substracts a field value from this instance's field value. Both field values must be of the same type.
Declaration
public override bool Substract(FieldValue rhs)
Parameters
Type | Name | Description |
---|---|---|
FieldValue | rhs | The field value to substract. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string representation of the object, for display purposes. |