Search Results for

    Show / Hide Table of Contents

    Class PicklistField

    Represents a field declaration.

    Inheritance
    object
    PersistentObject
    Field
    PicklistField
    Implements
    ICloneable
    IField
    Inherited Members
    Field.StructureContextFieldName
    Field.TextContextFieldName
    Field.CheckName(string)
    Field.RemoveIllegalChars(string)
    Field.IsValidName(string)
    Field.LookupSpecialField(string)
    Field.IsSystemFieldName(string)
    Field.IsPseudoFieldName(string)
    Field.IsReservedName(string)
    Field.GetFieldType(string)
    Field.EqualsDeclaration(Field)
    Field.CreateValue()
    Field.ValueType
    Field.Name
    Field.FieldType
    Field.IsSystemField
    PersistentObject.ResourceId
    object.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    [DataContract]
    public class PicklistField : Field, ICloneable, IField

    Constructors

    PicklistField()

    Initializes a new instance with an empty resource token.

    Declaration
    public PicklistField()

    PicklistField(PicklistField)

    Initializes a new instance with the values of another instance, creating a deep copy.

    Declaration
    public PicklistField(PicklistField other)
    Parameters
    Type Name Description
    PicklistField other

    The other instance

    PicklistField(string, FieldValueType)

    Initializes a new instance, with the specified name and type.

    Declaration
    public PicklistField(string name, FieldValueType t)
    Parameters
    Type Name Description
    string name

    The field name.

    FieldValueType t

    The field type.

    PicklistField(string, FieldValueType, ICollection<PicklistItem>)

    Initializes a new instance of the PicklistField class with a specified name and type. The only valid values for the type are SinglePicklist and MultiplePicklist.

    Declaration
    public PicklistField(string name, FieldValueType t, ICollection<PicklistItem> picklistValues)
    Parameters
    Type Name Description
    string name

    The field name.

    FieldValueType t

    The field type.

    ICollection<PicklistItem> picklistValues

    The seed list of picklist values

    PicklistField(string, FieldValueType, ICollection<string>)

    Initializes a new instance of the PicklistField class with a specified name and type. The only valid values for the type are SinglePicklist and MultiplePicklist.

    Declaration
    public PicklistField(string name, FieldValueType t, ICollection<string> picklistValues)
    Parameters
    Type Name Description
    string name

    The field name.

    FieldValueType t

    The field type.

    ICollection<string> picklistValues

    The seed list of picklist values

    Properties

    Picklist

    Gets the picklist items collection.

    Declaration
    public PicklistItems Picklist { get; }
    Property Value
    Type Description
    PicklistItems

    PicklistItemNames

    The names of all picklist items for this Field. This collection will be empty if this field is not a SinglePicklist or MultiplePicklist.

    Declaration
    public override IList<string> PicklistItemNames { get; }
    Property Value
    Type Description
    IList<string>
    Overrides
    Field.PicklistItemNames

    Methods

    AddPickListItem(PicklistItem)

    Declaration
    public void AddPickListItem(PicklistItem value)
    Parameters
    Type Name Description
    PicklistItem value

    AddPickListItem(string)

    Adds a new pick list item to the list and returns true, false if nothing is added

    Declaration
    public bool AddPickListItem(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    bool

    Clone()

    Clone()

    Declaration
    public override object Clone()
    Returns
    Type Description
    object

    A new object that is a deep copy of this instance.

    Overrides
    Field.Clone()

    Duplicate()

    Creates a new instance that is a deep copy of this instance.

    Declaration
    public override Field Duplicate()
    Returns
    Type Description
    Field

    A new instance that is a deep copy of this instance.

    Overrides
    Field.Duplicate()

    Equals(object)

    Determines whether this instance of Field and a specified object, which must also be a Field object, represent the same field declaration including the picklist according to type.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The other object.

    Returns
    Type Description
    bool

    true if obj represents the same field declaration as this instance; false otherwise.

    Overrides
    Field.Equals(object)

    GetHashCode()

    System.Object.GetHashCode(object)

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    Field.GetHashCode()

    PicklistFromString(string)

    Deserializes the picklist values from the provided string and sets the picklist values accordingly. Existing values will be overwritten.

    Declaration
    public void PicklistFromString(string values)
    Parameters
    Type Name Description
    string values

    PicklistToString()

    Serializes the picklist values into a comma separated string.

    Declaration
    public string PicklistToString()
    Returns
    Type Description
    string

    The picklist as a comma separated string or null if the field declaration is not of one of the picklist types.

    Implements

    ICloneable
    IField
    In this article
    • Constructors
      • PicklistField()
      • PicklistField(PicklistField)
      • PicklistField(string, FieldValueType)
      • PicklistField(string, FieldValueType, ICollection<PicklistItem>)
      • PicklistField(string, FieldValueType, ICollection<string>)
    • Properties
      • Picklist
      • PicklistItemNames
    • Methods
      • AddPickListItem(PicklistItem)
      • AddPickListItem(string)
      • Clone()
      • Duplicate()
      • Equals(object)
      • GetHashCode()
      • PicklistFromString(string)
      • PicklistToString()
    • Implements
    Back to top Generated by DocFX