Search Results for

    Show / Hide Table of Contents

    Class PicklistField

    Represents a field declaration that contains a picklist and whose field values can only be chosen from that picklist.

    Inheritance
    System.Object
    PersistentObject
    Field
    PicklistField
    Implements
    System.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
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    public class PicklistField : Field, ICloneable, IField

    Constructors

    PicklistField()

    Initializes a new instance with default values.

    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 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)
    Parameters
    Type Name Description
    System.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
    System.String name

    The field name.

    FieldValueType t

    The field type.

    System.Collections.Generic.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
    System.String name

    The field name.

    FieldValueType t

    The field type.

    System.Collections.Generic.ICollection<System.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
    System.Collections.Generic.IList<System.String>
    Overrides
    Field.PicklistItemNames

    Methods

    Clone()

    System.ICloneable.Clone()
    Declaration
    public override object Clone()
    Returns
    Type Description
    System.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)

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

    The object to compare with the current object.

    Returns
    Type Description
    System.Boolean

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    Field.Equals(Object)

    GetHashCode()

    System.Object.GetHashCode(object)
    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    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
    System.String values

    PicklistToString()

    Serializes the picklist values into a comma separated string.

    Declaration
    public string PicklistToString()
    Returns
    Type Description
    System.String

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

    Implements

    System.ICloneable
    IField

    On this page

    • Constructors
      • PicklistField()
      • PicklistField(PicklistField)
      • PicklistField(String, FieldValueType)
      • PicklistField(String, FieldValueType, ICollection<PicklistItem>)
      • PicklistField(String, FieldValueType, ICollection<String>)
    • Properties
      • Picklist
      • PicklistItemNames
    • Methods
      • Clone()
      • Duplicate()
      • Equals(Object)
      • GetHashCode()
      • PicklistFromString(String)
      • PicklistToString()
    • Implements
    Back to top Generated by DocFX